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

Unified Diff: cc/output/gl_renderer.cc

Issue 2821903004: Disable the direct-drawing optimization for quads with opacity. (Closed)
Patch Set: Created 3 years, 8 months 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 | third_party/WebKit/LayoutTests/compositing/opacity-with-mask.html » ('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 612c31564878454e01636cf365f22a615440907e..3446cc7d7214fa82c136451b5bc62837bd99648f 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -1005,6 +1005,11 @@ const TileDrawQuad* GLRenderer::CanPassBeDrawnDirectly(const RenderPass* pass) {
if (quad->material != DrawQuad::TILED_CONTENT)
return nullptr;
+ // TODO(chrishtr): support could be added for opacity, but care needs
+ // to be taken to make sure it is correct w.r.t. non-commutative filters etc.
+ if (quad->shared_quad_state->opacity != 1.0f)
+ return nullptr;
+
const TileDrawQuad* tile_quad = TileDrawQuad::MaterialCast(quad);
// Hack: this could be supported by passing in a subrectangle to draw
// render pass, although in practice if there is only one quad there
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/compositing/opacity-with-mask.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698