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

Unified Diff: cc/layers/picture_layer.cc

Issue 2681183002: cc: Add flag to disable future mask tiling. (Closed)
Patch Set: Correct my mistake in rebase. 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..e5bd641e8e7a1fd40097a454af2f0feb938cb9ed 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,9 +68,14 @@ void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) {
void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) {
Layer::SetLayerTreeHost(host);
+
if (!host)
return;
+ if (!host->GetSettings().enable_mask_tiling &&
+ mask_type_ == LayerMaskType::MULTI_TEXTURE_MASK)
+ mask_type_ = LayerMaskType::SINGLE_TEXTURE_MASK;
+
if (!recording_source_)
recording_source_.reset(new RecordingSource);
recording_source_->SetSlowdownRasterScaleFactor(
@@ -137,7 +142,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