DescriptionTexture Draw Calls Coalescing
This patch batches multiple calls to DrawQuad inside GlRenderer when the calls draw textured quads that have the same texture. These quads differ only in transform for both position and UV. This patch extends the vertex shader used for drawing textures to use one of 8 matrices and UV transforms. By batching up to 8 DrawQuads into a single draw quad, we reduce the number of times many different OpenGL ES state calls are made.
The implementation maintains a cache of up to 8 quads that contain the same texture and drawing parameters (e.g. opacity). If a 9th textured quad with the same parameters or a different kind of quad is drawn or any GL state (e.g. scissor rect) is changed or the new finishDrawingQuadList() function is called then the the quads are drawn in a single call and the cache is flushed.
BUG=161372
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=170409
Patch Set 1 #
Total comments: 30
Patch Set 2 : Addressing first round of comments. #Patch Set 3 : addressing Shawn's comments #Patch Set 4 : Added a fix for a unit test that was incorrectly failing with the new patch. #Patch Set 5 : "appeasing the trybot gods: added a .cc file to go with gl_renderer_drawcache.h" #Patch Set 6 : Removed redundant call to activeTexture to pass unit test #Patch Set 7 : forgot to actually add gl_renderer_drawcache.cc #
Total comments: 23
Patch Set 8 : addressing James' style comments and changing a file name #
Total comments: 7
Patch Set 9 : fixing hacker-case naming #Patch Set 10 : moved { to line above #
Messages
Total messages: 16 (0 generated)
|