Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1055)

Unified Diff: cc/output/gl_renderer.cc

Issue 2558393002: cc: Only use single quad pass optimization when quad rect matches pass rect (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/test/data/translated_blue_green_alpha_gl.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 002f32c4ab21a854ea6fea6602830842d28940aa..71861fb361d8b7dac8789e2fa311af09b4f014d7 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -996,8 +996,10 @@ const TileDrawQuad* GLRenderer::CanPassBeDrawnDirectly(const RenderPass* pass) {
const DrawQuad* quad = *pass->quad_list.BackToFrontBegin();
// Hack: this could be supported by concatenating transforms, but
- // in practice if there is one quad, it is at the origin of the render pass.
- if (!quad->shared_quad_state->quad_to_target_transform.IsIdentity())
+ // in practice if there is one quad, it is at the origin of the render pass
+ // and has the same size as the pass.
+ if (!quad->shared_quad_state->quad_to_target_transform.IsIdentity() ||
+ quad->rect != pass->output_rect)
return nullptr;
// The quad is expected to be the entire layer so that AA edges are correct.
if (gfx::Rect(quad->shared_quad_state->quad_layer_bounds) != quad->rect)
« no previous file with comments | « no previous file | cc/test/data/translated_blue_green_alpha_gl.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698