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

Unified Diff: cc/layers/layer.cc

Issue 834343004: cc: Add frame timing request plumbing through the layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 3817115f709780042a40cecba6ec00312185b0b2..b45998e1b375dac52d6ae39e3352e86a141497b5 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -79,7 +79,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);
@@ -1016,6 +1017,11 @@ void Layer::PushPropertiesTo(LayerImpl* layer) {
layer_animation_controller_->PushAnimationUpdatesTo(
layer->layer_animation_controller());
+ if (frame_timing_requests_dirty_) {
danakj 2015/01/23 18:08:45 what's the reason for these dirty flags? in case
vmpstr 2015/01/23 18:41:57 It's just so we don't keep copying the same vector
danakj 2015/01/23 18:43:29 I see, you need them to stick around for multiple
vmpstr 2015/01/23 18:45:58 They really only need to be on the active layer..
+ layer->SetFrameTimingRequests(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();
@@ -1294,4 +1300,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') | cc/layers/layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698