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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 2845143002: cc: Allow changing mask type when pushing properties. (Closed)
Patch Set: Disable mask tiling. 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 | « cc/layers/picture_layer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index f385bddd8003344734c5ee27c144d901da007d3e..b9bc09304aac231d8b3e137f86117039f16c8269 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -120,6 +120,14 @@ PictureLayerImpl::~PictureLayerImpl() {
layer_tree_impl()->UnregisterPictureLayerImpl(this);
}
+void PictureLayerImpl::SetLayerMaskType(Layer::LayerMaskType mask_type) {
+ if (mask_type_ == mask_type)
+ return;
+ DCHECK(mask_type_ != Layer::LayerMaskType::NOT_MASK &&
enne (OOO) 2017/04/28 17:08:30 Maybe leave a comment here saying that it's expect
sunxd 2017/04/28 17:53:20 Done.
+ mask_type != Layer::LayerMaskType::NOT_MASK);
+ mask_type_ = mask_type;
+}
+
const char* PictureLayerImpl::LayerTypeAsString() const {
return "cc::PictureLayerImpl";
}
@@ -131,10 +139,10 @@ std::unique_ptr<LayerImpl> PictureLayerImpl::CreateLayerImpl(
void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer);
- DCHECK_EQ(layer_impl->mask_type_, mask_type_);
LayerImpl::PushPropertiesTo(base_layer);
+ layer_impl->SetLayerMaskType(mask_type());
// Twin relationships should never change once established.
DCHECK(!twin_layer_ || twin_layer_ == layer_impl);
DCHECK(!twin_layer_ || layer_impl->twin_layer_ == this);
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698