DescriptionAndroid: Refactor renderers to allow apps to inject custom shaders
This CL:
* Abstracts the functions in GlRectDrawer to an interface.
* Adds viewport location as argument to the draw() functions, because this information may be needed by some shaders. This also moves the responsibility of calling GLES20.glViewport() to the drawer.
* Moves uploadYuvData() into a separate helper class.
* Adds new SurfaceViewRenderer.init() function and new VideoRendererGui.create() function that takes a custom drawer as argument. Each YuvImageRenderer in VideoRendererGui now has their own drawer instead of a common one.
BUG=b/25694445
R=nisse@webrtc.org, perkj@webrtc.org
Committed: https://crrev.com/51254331ccb3838b03ed0c630f7e3d5d402d1919
Cr-Commit-Position: refs/heads/master@{#11031}
Patch Set 1 : #
Total comments: 4
Patch Set 2 : Need to call glUseProgram() every frame because of the change in VideoRendererGui #Patch Set 3 : Address Nisses comments #Messages
Total messages: 22 (13 generated)
|