Index: src/image/SkSurface_Gpu.cpp |
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp |
index 110d614d9b311dbee70ffc179ade7719f94eac97..1e4bd87661a1a0ec10562ec8f86e6fc216b51dfd 100644 |
--- a/src/image/SkSurface_Gpu.cpp |
+++ b/src/image/SkSurface_Gpu.cpp |
@@ -68,8 +68,7 @@ SkCanvas* SkSurface_Gpu::onNewCanvas() { |
} |
sk_sp<SkSurface> SkSurface_Gpu::onNewSurface(const SkImageInfo& info) { |
- GrRenderTarget* rt = fDevice->accessRenderTarget(); |
- int sampleCount = rt->numColorSamples(); |
+ int sampleCount = fDevice->accessDrawContext()->numColorSamples(); |
// TODO: Make caller specify this (change virtual signature of onNewSurface). |
static const SkBudgeted kBudgeted = SkBudgeted::kNo; |
return SkSurface::MakeRenderTarget(fDevice->context(), kBudgeted, info, sampleCount, |
@@ -85,7 +84,7 @@ sk_sp<SkImage> SkSurface_Gpu::onNewImageSnapshot(SkBudgeted budgeted, ForceCopyM |
// want to ever retarget the SkSurface at another buffer we create. Force a copy now to avoid |
// copy-on-write. |
if (kYes_ForceCopyMode == forceCopyMode || !tex || rt->resourcePriv().refsWrappedObjects()) { |
- GrSurfaceDesc desc = fDevice->accessRenderTarget()->desc(); |
+ GrSurfaceDesc desc = fDevice->accessDrawContext()->desc(); |
GrContext* ctx = fDevice->context(); |
desc.fFlags = desc.fFlags & ~kRenderTarget_GrSurfaceFlag; |
copy.reset(ctx->textureProvider()->createTexture(desc, budgeted)); |