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

Unified Diff: cc/layers/picture_layer.cc

Issue 192973002: Add a GPU rasterization hint to cc::PictureLayer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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..6f08b088ff0f630017688b9db32d8b7d95900075 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -16,12 +16,12 @@ scoped_refptr<PictureLayer> PictureLayer::Create(ContentLayerClient* client) {
}
PictureLayer::PictureLayer(ContentLayerClient* client)
- : client_(client),
- pile_(make_scoped_refptr(new PicturePile())),
- instrumentation_object_tracker_(id()),
- is_mask_(false),
- update_source_frame_number_(-1) {
-}
+ : client_(client),
+ pile_(make_scoped_refptr(new PicturePile())),
+ instrumentation_object_tracker_(id()),
+ is_mask_(false),
+ has_gpu_rasterization_hint_(false),
+ update_source_frame_number_(-1) {}
PictureLayer::~PictureLayer() {
}
@@ -51,6 +51,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 +136,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