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/output/output_surface.cc

Issue 628703005: Remove GpuHostMsg_FrameDrawn and replace with client channel swap ack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, fix cros/threaded Created 6 years, 2 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 | « no previous file | content/browser/compositor/gpu_browser_compositor_output_surface.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/output_surface.h" 5 #include "cc/output/output_surface.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 gfx::Size OutputSurface::SurfaceSize() const { 216 gfx::Size OutputSurface::SurfaceSize() const {
217 return surface_size_; 217 return surface_size_;
218 } 218 }
219 219
220 void OutputSurface::BindFramebuffer() { 220 void OutputSurface::BindFramebuffer() {
221 DCHECK(context_provider_.get()); 221 DCHECK(context_provider_.get());
222 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); 222 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0);
223 } 223 }
224 224
225 void OutputSurface::SwapBuffers(CompositorFrame* frame) { 225 void OutputSurface::SwapBuffers(CompositorFrame* frame) {
226 // TODO(sievers): Make OutputSurface::SwapBuffers() pure virtual.
227 // The implementation here is used for tests only.
226 if (frame->software_frame_data) { 228 if (frame->software_frame_data) {
227 PostSwapBuffersComplete(); 229 PostSwapBuffersComplete();
228 client_->DidSwapBuffers(); 230 client_->DidSwapBuffers();
229 return; 231 return;
230 } 232 }
231 233
232 DCHECK(context_provider_.get()); 234 DCHECK(context_provider_.get());
233 DCHECK(frame->gl_frame_data); 235 DCHECK(frame->gl_frame_data);
234 236
235 if (frame->gl_frame_data->sub_buffer_rect == 237 if (frame->gl_frame_data->sub_buffer_rect ==
(...skipping 30 matching lines...) Expand all
266 TRACE_EVENT1("cc", "OutputSurface::SetMemoryPolicy", 268 TRACE_EVENT1("cc", "OutputSurface::SetMemoryPolicy",
267 "bytes_limit_when_visible", policy.bytes_limit_when_visible); 269 "bytes_limit_when_visible", policy.bytes_limit_when_visible);
268 // Just ignore the memory manager when it says to set the limit to zero 270 // Just ignore the memory manager when it says to set the limit to zero
269 // bytes. This will happen when the memory manager thinks that the renderer 271 // bytes. This will happen when the memory manager thinks that the renderer
270 // is not visible (which the renderer knows better). 272 // is not visible (which the renderer knows better).
271 if (policy.bytes_limit_when_visible) 273 if (policy.bytes_limit_when_visible)
272 client_->SetMemoryPolicy(policy); 274 client_->SetMemoryPolicy(policy);
273 } 275 }
274 276
275 } // namespace cc 277 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/gpu_browser_compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698