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

Unified Diff: cc/layers/picture_layer.cc

Issue 2681183002: cc: Add flag to disable future mask tiling. (Closed)
Patch Set: Fix unit tests. Created 3 years, 10 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 | « cc/layers/picture_layer.h ('k') | cc/layers/picture_layer_impl.cc » ('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 dc93c4d901a56d019c59220aad7fc0ae96474839..b4fa3257ebb976248f3e16b6dca3602288728130 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -27,7 +27,7 @@ scoped_refptr<PictureLayer> PictureLayer::Create(ContentLayerClient* client) {
PictureLayer::PictureLayer(ContentLayerClient* client)
: instrumentation_object_tracker_(id()),
update_source_frame_number_(-1),
- mask_type_(Layer::LayerMaskType::NOT_MASK) {
+ mask_type_(LayerMaskType::NOT_MASK) {
picture_layer_inputs_.client = client;
}
@@ -68,6 +68,10 @@ void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) {
void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) {
Layer::SetLayerTreeHost(host);
+ if (host && !host->GetSettings().enable_mask_tiling &&
+ mask_type_ == LayerMaskType::MULTI_TEXTURE_MASK)
+ mask_type_ = LayerMaskType::SINGLE_TEXTURE_MASK;
trchen 2017/02/16 23:52:30 nit: Move after line 77 then null-check for host c
+
if (!host)
return;
@@ -137,7 +141,7 @@ bool PictureLayer::Update() {
return updated;
}
-void PictureLayer::SetLayerMaskType(Layer::LayerMaskType mask_type) {
+void PictureLayer::SetLayerMaskType(LayerMaskType mask_type) {
mask_type_ = mask_type;
}
« no previous file with comments | « cc/layers/picture_layer.h ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698