Index: src/image/SkSurface_Gpu.cpp |
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp |
index 5d1555f32364a04d3ea6223336dbd1d8bbbd955a..c5a8ffe23ee56512c8b17c92b7cee8c574c0a3c6 100644 |
--- a/src/image/SkSurface_Gpu.cpp |
+++ b/src/image/SkSurface_Gpu.cpp |
@@ -34,7 +34,7 @@ static GrRenderTarget* prepare_rt_for_external_access(SkSurface_Gpu* surface, |
case SkSurface::kDiscardWrite_BackendHandleAccess: |
// for now we don't special-case on Discard, but we may in the future. |
surface->notifyContentWillChange(SkSurface::kRetain_ContentChangeMode); |
- // legacy: need to dirty the bitmap's genID in our device (curse it) |
+ // legacy: need to dirty the bitmap's genID in our device (curse it) |
surface->getDevice()->accessBitmap(false).notifyPixelsChanged(); |
break; |
} |
@@ -135,7 +135,8 @@ void SkSurface_Gpu::onPrepareForExternalIO() { |
sk_sp<SkSurface> SkSurface::MakeRenderTargetDirect(GrRenderTarget* target, |
const SkSurfaceProps* props) { |
sk_sp<SkGpuDevice> device( |
- SkGpuDevice::Make(sk_ref_sp(target), props, SkGpuDevice::kUninit_InitContents)); |
+ SkGpuDevice::Make(target->width(), target->height(), |
+ sk_ref_sp(target), props, SkGpuDevice::kUninit_InitContents)); |
if (!device) { |
return nullptr; |
} |
@@ -167,7 +168,8 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendTexture(GrContext* context, |
if (!surface) { |
return nullptr; |
} |
- sk_sp<SkGpuDevice> device(SkGpuDevice::Make(sk_ref_sp(surface->asRenderTarget()), props, |
+ sk_sp<SkGpuDevice> device(SkGpuDevice::Make(desc.fWidth, desc.fHeight, |
+ sk_ref_sp(surface->asRenderTarget()), props, |
SkGpuDevice::kUninit_InitContents)); |
if (!device) { |
return nullptr; |
@@ -185,7 +187,8 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendRenderTarget(GrContext* context, |
if (!rt) { |
return nullptr; |
} |
- sk_sp<SkGpuDevice> device(SkGpuDevice::Make(std::move(rt), props, |
+ sk_sp<SkGpuDevice> device(SkGpuDevice::Make(desc.fWidth, desc.fHeight, |
+ std::move(rt), props, |
SkGpuDevice::kUninit_InitContents)); |
if (!device) { |
return nullptr; |
@@ -203,7 +206,8 @@ sk_sp<SkSurface> SkSurface::MakeFromBackendTextureAsRenderTarget(GrContext* cont |
if (!rt) { |
return nullptr; |
} |
- sk_sp<SkGpuDevice> device(SkGpuDevice::Make(std::move(rt), props, |
+ sk_sp<SkGpuDevice> device(SkGpuDevice::Make(desc.fWidth, desc.fHeight, |
+ std::move(rt), props, |
SkGpuDevice::kUninit_InitContents)); |
if (!device) { |
return nullptr; |