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

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: suppress lost context notification before renderer initialized Created 7 years, 9 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
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 115 }
116 116
117 bool SoftwareRenderer::SwapBuffers() { 117 bool SoftwareRenderer::SwapBuffers() {
118 if (Settings().compositor_frame_message) 118 if (Settings().compositor_frame_message)
119 output_surface_->SendFrameToParentCompositor(&compositor_frame_); 119 output_surface_->SendFrameToParentCompositor(&compositor_frame_);
120 return true; 120 return true;
121 } 121 }
122 122
123 void SoftwareRenderer::ReceiveCompositorFrameAck( 123 void SoftwareRenderer::ReceiveCompositorFrameAck(
124 const CompositorFrameAck& ack) { 124 const CompositorFrameAck& ack) {
125 if (capabilities_.using_swap_complete_callback)
126 client_->OnSwapBuffersComplete();
127 output_device_->ReclaimDIB(ack.last_content_dib); 125 output_device_->ReclaimDIB(ack.last_content_dib);
128 } 126 }
129 127
130 bool SoftwareRenderer::FlippedFramebuffer() const { 128 bool SoftwareRenderer::FlippedFramebuffer() const {
131 return false; 129 return false;
132 } 130 }
133 131
134 void SoftwareRenderer::EnsureScissorTestEnabled() { 132 void SoftwareRenderer::EnsureScissorTestEnabled() {
135 is_scissor_enabled_ = true; 133 is_scissor_enabled_ = true;
136 SetClipRect(scissor_rect_); 134 SetClipRect(scissor_rect_);
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 4 * rect.width()); 411 4 * rect.width());
414 } 412 }
415 413
416 void SoftwareRenderer::SetVisible(bool visible) { 414 void SoftwareRenderer::SetVisible(bool visible) {
417 if (visible_ == visible) 415 if (visible_ == visible)
418 return; 416 return;
419 visible_ = visible; 417 visible_ = visible;
420 } 418 }
421 419
422 } // namespace cc 420 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698