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

Unified Diff: cc/layers/picture_layer.cc

Issue 181063022: cc: Trigger GPU rasterization based on a per-layer hint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits Created 6 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 | « cc/layers/picture_layer.h ('k') | 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 ec73e0913d91cecf324ad6c6cf601d274f15da46..d6ad15dccc9fab9813775ed373214e54a7fe3ac3 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -20,6 +20,7 @@ PictureLayer::PictureLayer(ContentLayerClient* client)
pile_(make_scoped_refptr(new PicturePile())),
instrumentation_object_tracker_(id()),
is_mask_(false),
+ has_gpu_rasterization_hint_(false),
update_source_frame_number_(-1) {
}
@@ -51,6 +52,8 @@ void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) {
}
layer_impl->SetIsMask(is_mask_);
+ layer_impl->SetHasGpuRasterizationHint(has_gpu_rasterization_hint_);
+
// Unlike other properties, invalidation must always be set on layer_impl.
// See PictureLayerImpl::PushPropertiesTo for more details.
layer_impl->invalidation_.Clear();
@@ -134,6 +137,14 @@ void PictureLayer::SetIsMask(bool is_mask) {
is_mask_ = is_mask;
}
+void PictureLayer::SetHasGpuRasterizationHint(bool has_hint) {
+ DCHECK(IsPropertyChangeAllowed());
+ if (has_gpu_rasterization_hint_ == has_hint)
+ return;
+ has_gpu_rasterization_hint_ = has_hint;
+ SetNeedsCommit();
+}
+
bool PictureLayer::SupportsLCDText() const {
return true;
}
« no previous file with comments | « cc/layers/picture_layer.h ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698