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

Side by Side Diff: cc/surfaces/direct_compositor_frame_sink.cc

Issue 2720803002: Pass returned resources to DidReceiveCompositorFrameAck (Closed)
Patch Set: c Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/surfaces/direct_compositor_frame_sink.h" 5 #include "cc/surfaces/direct_compositor_frame_sink.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "cc/output/compositor_frame.h" 8 #include "cc/output/compositor_frame.h"
9 #include "cc/output/compositor_frame_sink_client.h" 9 #include "cc/output/compositor_frame_sink_client.h"
10 #include "cc/surfaces/display.h" 10 #include "cc/surfaces/display.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 const RenderPassList& render_passes) { 124 const RenderPassList& render_passes) {
125 // This notification is not relevant to our client outside of tests. 125 // This notification is not relevant to our client outside of tests.
126 } 126 }
127 127
128 void DirectCompositorFrameSink::DisplayDidDrawAndSwap() { 128 void DirectCompositorFrameSink::DisplayDidDrawAndSwap() {
129 // This notification is not relevant to our client outside of tests. We 129 // This notification is not relevant to our client outside of tests. We
130 // unblock the client from DidDrawCallback() when the surface is going to 130 // unblock the client from DidDrawCallback() when the surface is going to
131 // be drawn. 131 // be drawn.
132 } 132 }
133 133
134 void DirectCompositorFrameSink::DidReceiveCompositorFrameAck() { 134 void DirectCompositorFrameSink::DidReceiveCompositorFrameAck(
135 const ReturnedResourceArray& resources) {
136 client_->ReclaimResources(resources);
135 client_->DidReceiveCompositorFrameAck(); 137 client_->DidReceiveCompositorFrameAck();
136 } 138 }
137 139
138 void DirectCompositorFrameSink::OnBeginFrame(const BeginFrameArgs& args) { 140 void DirectCompositorFrameSink::OnBeginFrame(const BeginFrameArgs& args) {
139 begin_frame_source_->OnBeginFrame(args); 141 begin_frame_source_->OnBeginFrame(args);
140 } 142 }
141 143
142 void DirectCompositorFrameSink::ReclaimResources( 144 void DirectCompositorFrameSink::ReclaimResources(
143 const ReturnedResourceArray& resources) { 145 const ReturnedResourceArray& resources) {
144 client_->ReclaimResources(resources); 146 client_->ReclaimResources(resources);
145 } 147 }
146 148
147 void DirectCompositorFrameSink::WillDrawSurface( 149 void DirectCompositorFrameSink::WillDrawSurface(
148 const LocalSurfaceId& local_surface_id, 150 const LocalSurfaceId& local_surface_id,
149 const gfx::Rect& damage_rect) { 151 const gfx::Rect& damage_rect) {
150 // TODO(staraz): Implement this. 152 // TODO(staraz): Implement this.
151 } 153 }
152 154
153 void DirectCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frame) { 155 void DirectCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frame) {
154 support_->SetNeedsBeginFrame(needs_begin_frame); 156 support_->SetNeedsBeginFrame(needs_begin_frame);
155 } 157 }
156 158
157 void DirectCompositorFrameSink::OnDidFinishFrame(const BeginFrameAck& ack) { 159 void DirectCompositorFrameSink::OnDidFinishFrame(const BeginFrameAck& ack) {
158 // If there was damage, SubmitCompositorFrame includes the ack. 160 // If there was damage, SubmitCompositorFrame includes the ack.
159 if (!ack.has_damage) 161 if (!ack.has_damage)
160 support_->BeginFrameDidNotSwap(ack); 162 support_->BeginFrameDidNotSwap(ack);
161 } 163 }
162 164
163 } // namespace cc 165 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698