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

Unified Diff: cc/layers/picture_layer.cc

Issue 2560723006: [2/5] Disable transformed rasterization if layer is opaque (Closed)
Patch Set: rebase Created 3 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer.cc
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index 40742e50ea8b845178c2eeeb20a37e59219a473a..6cacd6fca499d11388277351b805970c77e541e6 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -248,6 +248,14 @@ bool PictureLayer::ShouldUseTransformedRasterization() const {
if (!picture_layer_inputs_.allow_transformed_rasterization)
return false;
+ // Background color overfill is undesirable with transformed rasterization.
+ // However, without background overfill, the tiles will be non-opaque on
+ // external edges, and layer opaque region can't be computed in layer space
+ // due to rounding under extreme scaling. This defeats many opaque layer
+ // optimization. Prefer optimization over quality for this particular case.
+ if (contents_opaque())
+ return false;
+
const TransformTree& transform_tree =
layer_tree_host()->property_trees()->transform_tree;
DCHECK(!transform_tree.needs_update());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698