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

Side by Side Diff: cc/blimp/layer_tree_host_remote.cc

Issue 2527283003: cc: Introduce BeginFrame sequence numbers and acknowledgements.
Patch Set: . Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/blimp/layer_tree_host_remote.h" 5 #include "cc/blimp/layer_tree_host_remote.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/blimp/compositor_proto_state.h" 10 #include "cc/blimp/compositor_proto_state.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // Start the main frame. It should go till the requested pipeline stage. 364 // Start the main frame. It should go till the requested pipeline stage.
365 max_pipeline_stage_for_current_frame_ = 365 max_pipeline_stage_for_current_frame_ =
366 requested_pipeline_stage_for_next_frame_; 366 requested_pipeline_stage_for_next_frame_;
367 requested_pipeline_stage_for_next_frame_ = FramePipelineStage::NONE; 367 requested_pipeline_stage_for_next_frame_ = FramePipelineStage::NONE;
368 368
369 client_->WillBeginMainFrame(); 369 client_->WillBeginMainFrame();
370 370
371 current_pipeline_stage_ = FramePipelineStage::ANIMATE; 371 current_pipeline_stage_ = FramePipelineStage::ANIMATE;
372 base::TimeTicks now = base::TimeTicks::Now(); 372 base::TimeTicks now = base::TimeTicks::Now();
373 client_->BeginMainFrame(BeginFrameArgs::Create( 373 client_->BeginMainFrame(BeginFrameArgs::Create(
374 BEGINFRAME_FROM_HERE, now, now + kDefaultFrameInterval, 374 BEGINFRAME_FROM_HERE,
375 static_cast<uint64_t>(reinterpret_cast<std::uintptr_t>(this)),
376 begin_frame_number_++, now, now + kDefaultFrameInterval,
375 kDefaultFrameInterval, BeginFrameArgs::NORMAL)); 377 kDefaultFrameInterval, BeginFrameArgs::NORMAL));
376 // We don't run any animations on the layer because threaded animations are 378 // We don't run any animations on the layer because threaded animations are
377 // disabled. 379 // disabled.
378 // TODO(khushalsagar): Revisit this when adding support for animations. 380 // TODO(khushalsagar): Revisit this when adding support for animations.
379 client_->UpdateLayerTreeHost(); 381 client_->UpdateLayerTreeHost();
380 382
381 current_pipeline_stage_ = FramePipelineStage::UPDATE_LAYERS; 383 current_pipeline_stage_ = FramePipelineStage::UPDATE_LAYERS;
382 LayerList layer_list; 384 LayerList layer_list;
383 if (max_pipeline_stage_for_current_frame_ >= 385 if (max_pipeline_stage_for_current_frame_ >=
384 FramePipelineStage::UPDATE_LAYERS) { 386 FramePipelineStage::UPDATE_LAYERS) {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 layer->ToLayerPropertiesProto(layer_properties); 528 layer->ToLayerPropertiesProto(layer_properties);
527 } 529 }
528 530
529 std::vector<PictureData> pictures = 531 std::vector<PictureData> pictures =
530 engine_picture_cache_->CalculateCacheUpdateAndFlush(); 532 engine_picture_cache_->CalculateCacheUpdateAndFlush();
531 proto::PictureDataVectorToSkPicturesProto( 533 proto::PictureDataVectorToSkPicturesProto(
532 pictures, layer_tree_host_proto->mutable_pictures()); 534 pictures, layer_tree_host_proto->mutable_pictures());
533 } 535 }
534 536
535 } // namespace cc 537 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698