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

Side by Side Diff: components/exo/surface.cc

Issue 2779633002: [cc] Remove remaining_frames from BeginFrameAck. (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | components/exo/surface_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/exo/surface.h" 5 #include "components/exo/surface.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 633
634 needs_begin_frame_ = needs_begin_frame; 634 needs_begin_frame_ = needs_begin_frame;
635 if (needs_begin_frame_) 635 if (needs_begin_frame_)
636 begin_frame_source_->AddObserver(this); 636 begin_frame_source_->AddObserver(this);
637 else 637 else
638 begin_frame_source_->RemoveObserver(this); 638 begin_frame_source_->RemoveObserver(this);
639 } 639 }
640 640
641 bool Surface::OnBeginFrameDerivedImpl(const cc::BeginFrameArgs& args) { 641 bool Surface::OnBeginFrameDerivedImpl(const cc::BeginFrameArgs& args) {
642 current_begin_frame_ack_ = cc::BeginFrameAck( 642 current_begin_frame_ack_ = cc::BeginFrameAck(
643 args.source_id, args.sequence_number, args.sequence_number, 0, false); 643 args.source_id, args.sequence_number, args.sequence_number, false);
644 while (!active_frame_callbacks_.empty()) { 644 while (!active_frame_callbacks_.empty()) {
645 active_frame_callbacks_.front().Run(args.frame_time); 645 active_frame_callbacks_.front().Run(args.frame_time);
646 active_frame_callbacks_.pop_front(); 646 active_frame_callbacks_.pop_front();
647 } 647 }
648 return true; 648 return true;
649 } 649 }
650 650
651 void Surface::CheckIfSurfaceHierarchyNeedsCommitToNewSurfaces() { 651 void Surface::CheckIfSurfaceHierarchyNeedsCommitToNewSurfaces() {
652 if (HasLayerHierarchyChanged()) 652 if (HasLayerHierarchyChanged())
653 SetSurfaceHierarchyNeedsCommitToNewSurfaces(); 653 SetSurfaceHierarchyNeedsCommitToNewSurfaces();
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 render_pass->CreateAndAppendDrawQuad<cc::SolidColorDrawQuad>(); 876 render_pass->CreateAndAppendDrawQuad<cc::SolidColorDrawQuad>();
877 solid_quad->SetNew(quad_state, quad_rect, quad_rect, SK_ColorBLACK, false); 877 solid_quad->SetNew(quad_state, quad_rect, quad_rect, SK_ColorBLACK, false);
878 } 878 }
879 879
880 frame.render_pass_list.push_back(std::move(render_pass)); 880 frame.render_pass_list.push_back(std::move(render_pass));
881 compositor_frame_sink_holder_->GetCompositorFrameSink() 881 compositor_frame_sink_holder_->GetCompositorFrameSink()
882 ->SubmitCompositorFrame(local_surface_id_, std::move(frame)); 882 ->SubmitCompositorFrame(local_surface_id_, std::move(frame));
883 } 883 }
884 884
885 } // namespace exo 885 } // namespace exo
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | components/exo/surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698