Index: src/image/SkSurface_Gpu.cpp |
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp |
index 1555c9a7a8d74f2cab9e0e865d68af7944b558f0..d777e3a99120c431cebb18decfa9bb090ac5970b 100644 |
--- a/src/image/SkSurface_Gpu.cpp |
+++ b/src/image/SkSurface_Gpu.cpp |
@@ -85,8 +85,7 @@ void SkSurface_Gpu::onCopyOnWrite(ContentChangeMode mode) { |
// We call createCompatibleDevice because it uses the texture cache. This isn't |
// necessarily correct (http://skbug.com/2252), but never using the cache causes |
// a Chromium regression. (http://crbug.com/344020) |
- SkGpuDevice* newDevice = static_cast<SkGpuDevice*>( |
- fDevice->createCompatibleDevice(fDevice->imageInfo())); |
+ SkGpuDevice* newDevice = fDevice->cloneDevice(this->props()); |
SkAutoTUnref<SkGpuDevice> aurd(newDevice); |
if (kRetain_ContentChangeMode == mode) { |
fDevice->context()->copySurface(newDevice->accessRenderTarget(), rt->asTexture()); |