diff options
author | fmalita <fmalita@chromium.org> | 2014-11-21 15:27:22 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-21 23:27:49 +0000 |
commit | a65b3e15b411c96bc347883b355eb1a045bf5333 (patch) | |
tree | 621c4cc9657f55cd4e3c0faeb45ccdc9fb901397 /cc/output/software_renderer.cc | |
parent | 6caa50693b69a5fb4f4c3f5a4e077d054229836d (diff) | |
download | chromium_src-a65b3e15b411c96bc347883b355eb1a045bf5333.zip chromium_src-a65b3e15b411c96bc347883b355eb1a045bf5333.tar.gz chromium_src-a65b3e15b411c96bc347883b355eb1a045bf5333.tar.bz2 |
Use PlaybackToMemory for BitmapRasterWorkerPool playback
Per comments in http://crbug.com/430617, refactor BitmapRasterWorkerPool
to use RasterWorkerPool::PlaybackToMemory(), similarly to
PixelBufferRasterWorkerPool.
Using PlaybackToMemory() ensures that Skia surface properties reflect
the source LCD settings during rasterization.
BUG=430617
R=danakj@chromium.org,raveman@chromium.org
Review URL: https://codereview.chromium.org/748133002
Cr-Commit-Position: refs/heads/master@{#305315}
Diffstat (limited to 'cc/output/software_renderer.cc')
-rw-r--r-- | cc/output/software_renderer.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cc/output/software_renderer.cc b/cc/output/software_renderer.cc index d209535..ddd3473 100644 --- a/cc/output/software_renderer.cc +++ b/cc/output/software_renderer.cc @@ -108,6 +108,7 @@ void SoftwareRenderer::BeginDrawingFrame(DrawingFrame* frame) { void SoftwareRenderer::FinishDrawingFrame(DrawingFrame* frame) { TRACE_EVENT0("cc", "SoftwareRenderer::FinishDrawingFrame"); current_framebuffer_lock_ = nullptr; + current_framebuffer_canvas_.clear(); current_canvas_ = NULL; root_canvas_ = NULL; @@ -151,6 +152,7 @@ void SoftwareRenderer::Finish() {} void SoftwareRenderer::BindFramebufferToOutputSurface(DrawingFrame* frame) { DCHECK(!output_surface_->HasExternalStencilTest()); current_framebuffer_lock_ = nullptr; + current_framebuffer_canvas_.clear(); current_canvas_ = root_canvas_; } @@ -161,7 +163,9 @@ bool SoftwareRenderer::BindFramebufferToTexture( current_framebuffer_lock_ = make_scoped_ptr( new ResourceProvider::ScopedWriteLockSoftware( resource_provider_, texture->id())); - current_canvas_ = current_framebuffer_lock_->sk_canvas(); + current_framebuffer_canvas_ = + skia::AdoptRef(new SkCanvas(current_framebuffer_lock_->sk_bitmap())); + current_canvas_ = current_framebuffer_canvas_.get(); InitializeViewport(frame, target_rect, gfx::Rect(target_rect.size()), |