Swap render target instead of creating a new gpu device for surface copy-on-write
authorkkinnunen <kkinnunen@nvidia.com>
Mon, 23 Feb 2015 06:53:44 +0000 (22:53 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 23 Feb 2015 06:53:44 +0000 (22:53 -0800)
commitabcfab4d68d53900ef33320bb2622696c14d14b0
tree8ea70d5b22a26ba36811f51bb97361c9bb1e96d6
parent54bf133ca445011e54cd4a98f9be14681869991f
Swap render target instead of creating a new gpu device for surface copy-on-write

Swap render target of the gpu device instead of creating a new gpu
device when making a copy-on-write upon surface modification.

This removes the SkCanvas::setRootDevice which contains problematic code
when trying to increase the use of SkImages internally in Skia.

BUG=skia:3388

Review URL: https://codereview.chromium.org/925343002
include/core/SkCanvas.h
src/core/SkCanvas.cpp
src/gpu/SkGpuDevice.cpp
src/gpu/SkGpuDevice.h
src/image/SkSurface_Gpu.cpp