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

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

Issue 15004009: cc: Fix readback from non-root layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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_pixeltest.cc ('k') | cc/test/layer_tree_pixel_test.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/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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 void SoftwareRenderer::BindFramebufferToOutputSurface(DrawingFrame* frame) { 149 void SoftwareRenderer::BindFramebufferToOutputSurface(DrawingFrame* frame) {
150 current_framebuffer_lock_.reset(); 150 current_framebuffer_lock_.reset();
151 current_canvas_ = root_canvas_; 151 current_canvas_ = root_canvas_;
152 } 152 }
153 153
154 bool SoftwareRenderer::BindFramebufferToTexture( 154 bool SoftwareRenderer::BindFramebufferToTexture(
155 DrawingFrame* frame, 155 DrawingFrame* frame,
156 const ScopedResource* texture, 156 const ScopedResource* texture,
157 gfx::Rect framebuffer_rect) { 157 gfx::Rect framebuffer_rect) {
158 current_framebuffer_lock_.reset();
158 current_framebuffer_lock_ = make_scoped_ptr( 159 current_framebuffer_lock_ = make_scoped_ptr(
159 new ResourceProvider::ScopedWriteLockSoftware( 160 new ResourceProvider::ScopedWriteLockSoftware(
160 resource_provider_, texture->id())); 161 resource_provider_, texture->id()));
161 current_canvas_ = current_framebuffer_lock_->sk_canvas(); 162 current_canvas_ = current_framebuffer_lock_->sk_canvas();
162 InitializeMatrices(frame, framebuffer_rect, false); 163 InitializeMatrices(frame, framebuffer_rect, false);
163 SetDrawViewportSize(framebuffer_rect.size()); 164 SetDrawViewportSize(framebuffer_rect.size());
164 165
165 return true; 166 return true;
166 } 167 }
167 168
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 4 * rect.width()); 428 4 * rect.width());
428 } 429 }
429 430
430 void SoftwareRenderer::SetVisible(bool visible) { 431 void SoftwareRenderer::SetVisible(bool visible) {
431 if (visible_ == visible) 432 if (visible_ == visible)
432 return; 433 return;
433 visible_ = visible; 434 visible_ = visible;
434 } 435 }
435 436
436 } // namespace cc 437 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/test/layer_tree_pixel_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698