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

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

Issue 2701663003: CompositorFrameSinkSupportClient::WillDraw needs to take in arguments (Closed)
Patch Set: c Created 3 years, 10 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
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 "components/exo/compositor_frame_sink_holder.h" 5 #include "components/exo/compositor_frame_sink_holder.h"
6 6
7 #include "cc/resources/returned_resource.h" 7 #include "cc/resources/returned_resource.h"
8 #include "components/exo/surface.h" 8 #include "components/exo/surface.h"
9 9
10 namespace exo { 10 namespace exo {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 for (auto& resource : resources) { 69 for (auto& resource : resources) {
70 auto it = release_callbacks_.find(resource.id); 70 auto it = release_callbacks_.find(resource.id);
71 DCHECK(it != release_callbacks_.end()); 71 DCHECK(it != release_callbacks_.end());
72 if (it != release_callbacks_.end()) { 72 if (it != release_callbacks_.end()) {
73 it->second.Run(resource.sync_token, resource.lost); 73 it->second.Run(resource.sync_token, resource.lost);
74 release_callbacks_.erase(it); 74 release_callbacks_.erase(it);
75 } 75 }
76 } 76 }
77 } 77 }
78 78
79 void CompositorFrameSinkHolder::WillDrawSurface() { 79 void CompositorFrameSinkHolder::WillDrawSurface(
80 const cc::LocalSurfaceId& local_surface_id,
81 const gfx::Rect& damage_rect) {
80 if (surface_) 82 if (surface_)
81 surface_->WillDraw(); 83 surface_->WillDraw();
82 84
83 UpdateNeedsBeginFrame(); 85 UpdateNeedsBeginFrame();
84 } 86 }
85 87
86 //////////////////////////////////////////////////////////////////////////////// 88 ////////////////////////////////////////////////////////////////////////////////
87 // cc::BeginFrameObserver overrides: 89 // cc::BeginFrameObserver overrides:
88 90
89 const cc::BeginFrameArgs& CompositorFrameSinkHolder::LastUsedBeginFrameArgs() 91 const cc::BeginFrameArgs& CompositorFrameSinkHolder::LastUsedBeginFrameArgs()
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 124
123 bool needs_begin_frame = surface_ && surface_->NeedsBeginFrame(); 125 bool needs_begin_frame = surface_ && surface_->NeedsBeginFrame();
124 if (needs_begin_frame == needs_begin_frame_) 126 if (needs_begin_frame == needs_begin_frame_)
125 return; 127 return;
126 128
127 needs_begin_frame_ = needs_begin_frame; 129 needs_begin_frame_ = needs_begin_frame;
128 OnNeedsBeginFrames(needs_begin_frame_); 130 OnNeedsBeginFrames(needs_begin_frame_);
129 } 131 }
130 132
131 } // namespace exo 133 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/compositor_frame_sink_holder.h ('k') | content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698