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

Unified Diff: cc/layers/layer.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 11 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.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 45e8a83bffd7e02df055d7aaa70f4c8c25f1846a..feb23fa8d84f4e800c135e606335a47d103d03ff 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -78,7 +78,8 @@ Layer::Layer()
clip_parent_(nullptr),
replica_layer_(nullptr),
raster_scale_(0.f),
- client_(nullptr) {
+ client_(nullptr),
+ frame_timing_requests_dirty_(false) {
layer_animation_controller_ = LayerAnimationController::Create(layer_id_);
layer_animation_controller_->AddValueObserver(this);
layer_animation_controller_->set_value_provider(this);
@@ -1013,6 +1014,11 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
layer_animation_controller_->PushAnimationUpdatesTo(
layer->layer_animation_controller());
+ if (frame_timing_requests_dirty_) {
+ layer->PassFrameTimingRequests(&frame_timing_requests_);
+ frame_timing_requests_dirty_ = false;
+ }
+
// Reset any state that should be cleared for the next update.
stacking_order_changed_ = false;
update_rect_ = gfx::Rect();
@@ -1287,4 +1293,11 @@ gfx::Transform Layer::draw_transform_from_property_trees(
return xform;
}
+void Layer::SetFrameTimingRequests(
+ const std::vector<FrameTimingRequest>& requests) {
+ frame_timing_requests_ = requests;
+ frame_timing_requests_dirty_ = true;
+ SetNeedsCommit();
+}
+
} // namespace cc
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698