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

Unified Diff: cc/layers/layer.cc

Issue 1946403003: Add fixed raster scale use counter histograms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 92492afa97d7fdc4e30719125a8cb325a2227f81..51b245f47ddf4903bf6e29ac59be342c74e0e3dd 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -80,6 +80,7 @@ Layer::Layer()
force_render_surface_for_testing_(false),
has_render_surface_(false),
subtree_property_changed_(false),
+ has_will_change_transform_hint_(false),
background_color_(0),
safe_opaque_background_color_(0),
opacity_(1.f),
@@ -1209,6 +1210,8 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
update_rect_.Union(layer->update_rect());
layer->SetUpdateRect(update_rect_);
+ layer->SetHasWillChangeTransformHint(has_will_change_transform_hint());
+
// Reset any state that should be cleared for the next update.
subtree_property_changed_ = false;
update_rect_ = gfx::Rect();
@@ -1411,6 +1414,8 @@ void Layer::LayerSpecificPropertiesToProto(proto::LayerProperties* proto) {
// See crbug.com/570376.
update_rect_ = gfx::Rect();
+
+ base->set_has_will_change_transform_hint(has_will_change_transform_hint_);
danakj 2016/05/10 22:05:30 move this up with the other calls to base->setfoo.
vmpstr 2016/05/13 00:13:34 Done.
}
void Layer::FromLayerSpecificPropertiesProto(
@@ -1503,6 +1508,8 @@ void Layer::FromLayerSpecificPropertiesProto(
scroll_offset_ = ProtoToScrollOffset(base.scroll_offset());
update_rect_.Union(ProtoToRect(base.update_rect()));
+
+ has_will_change_transform_hint_ = base.has_will_change_transform_hint();
danakj 2016/05/10 22:05:30 ditto move this up with other like things. line 14
vmpstr 2016/05/13 00:13:34 Done.
}
std::unique_ptr<LayerImpl> Layer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
@@ -1672,6 +1679,13 @@ bool Layer::HasActiveAnimationForTesting() const {
: false;
}
+void Layer::SetHasWillChangeTransformHint(bool has_will_change) {
+ if (has_will_change_transform_hint_ == has_will_change)
+ return;
+ has_will_change_transform_hint_ = has_will_change;
+ SetNeedsCommit();
+}
+
ScrollbarLayerInterface* Layer::ToScrollbarLayer() {
return nullptr;
}
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | cc/layers/layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698