summaryrefslogtreecommitdiffstats
path: root/cc/output/software_renderer.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 23:52:14 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 23:52:14 +0000
commit6bec38a3e9548f6ba73d300a3722581121da818a (patch)
tree2cc537bdd2244329c751087b2de3f373378da689 /cc/output/software_renderer.cc
parent5b6c38455846eef96a706b5a20219e620a26491f (diff)
downloadchromium_src-6bec38a3e9548f6ba73d300a3722581121da818a.zip
chromium_src-6bec38a3e9548f6ba73d300a3722581121da818a.tar.gz
chromium_src-6bec38a3e9548f6ba73d300a3722581121da818a.tar.bz2
cc: Fix readback from non-root layers.
The readback was assuming that it was reading from the root render pass, so using the full viewport size when flipping the result, but it should use the size of the currently bound framebuffer. Also, it should not flip if the readback is already in the correct orientation. Tests: LayerTreeHostReadbackPixelTest.ReadbackRootLayer LayerTreeHostReadbackPixelTest.ReadbackRootLayerWithChild LayerTreeHostReadbackPixelTest.ReadbackNonRootLayer LayerTreeHostReadbackPixelTest.ReadbackSmallNonRootLayer LayerTreeHostReadbackPixelTest.ReadbackSmallNonRootLayerWithChild RendererPixelTest.SimpleGreenRect_NonRootRenderPass R=piman@chromium.org BUG=179896 Review URL: https://codereview.chromium.org/15004009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199055 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output/software_renderer.cc')
-rw-r--r--cc/output/software_renderer.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/cc/output/software_renderer.cc b/cc/output/software_renderer.cc
index abb9bba..0e96c57 100644
--- a/cc/output/software_renderer.cc
+++ b/cc/output/software_renderer.cc
@@ -155,6 +155,7 @@ bool SoftwareRenderer::BindFramebufferToTexture(
DrawingFrame* frame,
const ScopedResource* texture,
gfx::Rect framebuffer_rect) {
+ current_framebuffer_lock_.reset();
current_framebuffer_lock_ = make_scoped_ptr(
new ResourceProvider::ScopedWriteLockSoftware(
resource_provider_, texture->id()));