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

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

Issue 12545018: Move context-related callbacks into OutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unit test Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/output/renderer.h ('k') | cc/output/software_renderer_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 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/software_renderer.h" 5 #include "cc/output/software_renderer.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/base/math_util.h" 8 #include "cc/base/math_util.h"
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/compositor_frame_ack.h" 10 #include "cc/output/compositor_frame_ack.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 119
120 bool SoftwareRenderer::SwapBuffers() { 120 bool SoftwareRenderer::SwapBuffers() {
121 if (Settings().compositor_frame_message) 121 if (Settings().compositor_frame_message)
122 output_surface_->SendFrameToParentCompositor(&compositor_frame_); 122 output_surface_->SendFrameToParentCompositor(&compositor_frame_);
123 return true; 123 return true;
124 } 124 }
125 125
126 void SoftwareRenderer::ReceiveCompositorFrameAck( 126 void SoftwareRenderer::ReceiveCompositorFrameAck(
127 const CompositorFrameAck& ack) { 127 const CompositorFrameAck& ack) {
128 if (capabilities_.using_swap_complete_callback)
129 client_->OnSwapBuffersComplete();
130 output_device_->ReclaimDIB(ack.last_dib_id); 128 output_device_->ReclaimDIB(ack.last_dib_id);
131 } 129 }
132 130
133 bool SoftwareRenderer::FlippedFramebuffer() const { 131 bool SoftwareRenderer::FlippedFramebuffer() const {
134 return false; 132 return false;
135 } 133 }
136 134
137 void SoftwareRenderer::EnsureScissorTestEnabled() { 135 void SoftwareRenderer::EnsureScissorTestEnabled() {
138 is_scissor_enabled_ = true; 136 is_scissor_enabled_ = true;
139 SetClipRect(scissor_rect_); 137 SetClipRect(scissor_rect_);
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 4 * rect.width()); 416 4 * rect.width());
419 } 417 }
420 418
421 void SoftwareRenderer::SetVisible(bool visible) { 419 void SoftwareRenderer::SetVisible(bool visible) {
422 if (visible_ == visible) 420 if (visible_ == visible)
423 return; 421 return;
424 visible_ = visible; 422 visible_ = visible;
425 } 423 }
426 424
427 } // namespace cc 425 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/renderer.h ('k') | cc/output/software_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698