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

Unified Diff: cc/layers/layer_impl.cc

Issue 1946403003: Add fixed raster scale use counter histograms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+fix 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
« no previous file with comments | « cc/layers/layer_impl.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/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 040f73add67bba73e3defc7e8ac54a1426f81f57..a12963f2ac14849b375456a8497a7ee60e72182d 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -82,7 +82,8 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id)
element_id_(0),
mutable_properties_(MutableProperty::kNone),
debug_info_(nullptr),
- scrolls_drawn_descendant_(false) {
+ scrolls_drawn_descendant_(false),
+ has_will_change_transform_hint_(false) {
DCHECK_GT(layer_id_, 0);
DCHECK(layer_tree_impl_);
@@ -145,6 +146,13 @@ void LayerImpl::ClearLinksToOtherLayers() {
replica_layer_ = nullptr;
}
+void LayerImpl::SetHasWillChangeTransformHint(bool has_will_change) {
+ if (has_will_change_transform_hint_ == has_will_change)
+ return;
+ has_will_change_transform_hint_ = has_will_change;
+ SetNeedsPushProperties();
+}
+
void LayerImpl::SetDebugInfo(
std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info) {
owned_debug_info_ = std::move(debug_info);
@@ -492,6 +500,8 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
if (owned_debug_info_)
layer->SetDebugInfo(std::move(owned_debug_info_));
+ layer->SetHasWillChangeTransformHint(has_will_change_transform_hint());
+
// Reset any state that should be cleared for the next update.
layer_property_changed_ = false;
update_rect_ = gfx::Rect();
@@ -1258,6 +1268,9 @@ void LayerImpl::AsValueInto(base::trace_event::TracedValue* state) const {
state->SetBoolean("has_animation_bounds",
layer_tree_impl_->HasAnimationThatInflatesBounds(this));
+ state->SetBoolean("has_will_change_transform_hint",
+ has_will_change_transform_hint());
+
gfx::BoxF box;
if (LayerUtils::GetAnimationBounds(*this, &box))
MathUtil::AddToTracedValue("animation_bounds", box, state);
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698