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

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 | cc/layers/picture_layer_impl.h » ('j') | 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..6cf58ba6bae3dd6a887a390dd6ce34a7f60d69b4 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -103,7 +103,13 @@ bool PictureLayer::Update() {
gfx::Size layer_size = paint_properties().bounds;
- recording_source_->SetBackgroundColor(SafeOpaqueBackgroundColor());
+ // When transformed rasterization is used, we try to match the rendering
enne (OOO) 2017/03/29 13:01:42 I'm not sure I agree with this. I think if a laye
trchen 2017/03/29 21:50:36 I thought layer opaqueness is more of a hint than
+ // without a compositing layer, thus we don't over draw background to fill
+ // snapped edges.
+ SkColor background_color = ShouldUseTransformedRasterization()
+ ? SK_ColorTRANSPARENT
+ : SafeOpaqueBackgroundColor();
+ recording_source_->SetBackgroundColor(background_color);
recording_source_->SetRequiresClear(
!contents_opaque() &&
!picture_layer_inputs_.client->FillsBoundsCompletely());
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698