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

Side by Side Diff: cc/output/delegating_renderer.cc

Issue 23097005: cc: return resources via a ReturnedResource struct rather than TransferableResource (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review nits Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « cc/output/compositor_frame_ack.h ('k') | cc/resources/resource_provider.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/output/delegating_renderer.h" 5 #include "cc/output/delegating_renderer.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 output_surface_->SwapBuffers(&frame_for_swap_buffers_); 161 output_surface_->SwapBuffers(&frame_for_swap_buffers_);
162 frame_for_swap_buffers_.delegated_frame_data.reset(); 162 frame_for_swap_buffers_.delegated_frame_data.reset();
163 } 163 }
164 164
165 void DelegatingRenderer::GetFramebufferPixels(void* pixels, gfx::Rect rect) { 165 void DelegatingRenderer::GetFramebufferPixels(void* pixels, gfx::Rect rect) {
166 NOTREACHED(); 166 NOTREACHED();
167 } 167 }
168 168
169 void DelegatingRenderer::ReceiveSwapBuffersAck( 169 void DelegatingRenderer::ReceiveSwapBuffersAck(
170 const CompositorFrameAck& ack) { 170 const CompositorFrameAck& ack) {
171 resource_provider_->ReceiveFromParent(ack.resources); 171 resource_provider_->ReceiveReturnsFromParent(ack.resources);
172 } 172 }
173 173
174 bool DelegatingRenderer::IsContextLost() { 174 bool DelegatingRenderer::IsContextLost() {
175 ContextProvider* context_provider = output_surface_->context_provider(); 175 ContextProvider* context_provider = output_surface_->context_provider();
176 if (!context_provider) 176 if (!context_provider)
177 return false; 177 return false;
178 return context_provider->Context3d()->getGraphicsResetStatusARB() != 178 return context_provider->Context3d()->getGraphicsResetStatusARB() !=
179 GL_NO_ERROR; 179 GL_NO_ERROR;
180 } 180 }
181 181
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 stats.bytesAllocated = bytes_allocated; 215 stats.bytesAllocated = bytes_allocated;
216 stats.backbufferRequested = false; 216 stats.backbufferRequested = false;
217 context_provider->Context3d()->sendManagedMemoryStatsCHROMIUM(&stats); 217 context_provider->Context3d()->sendManagedMemoryStatsCHROMIUM(&stats);
218 } 218 }
219 219
220 void DelegatingRenderer::SetDiscardBackBufferWhenNotVisible(bool discard) { 220 void DelegatingRenderer::SetDiscardBackBufferWhenNotVisible(bool discard) {
221 // Nothing to do, we don't have a back buffer. 221 // Nothing to do, we don't have a back buffer.
222 } 222 }
223 223
224 } // namespace cc 224 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/compositor_frame_ack.h ('k') | cc/resources/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698