Index: src/image/SkSurface_Gpu.cpp |
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp |
index 1e4bd87661a1a0ec10562ec8f86e6fc216b51dfd..110d614d9b311dbee70ffc179ade7719f94eac97 100644 |
--- a/src/image/SkSurface_Gpu.cpp |
+++ b/src/image/SkSurface_Gpu.cpp |
@@ -68,7 +68,8 @@ |
} |
sk_sp<SkSurface> SkSurface_Gpu::onNewSurface(const SkImageInfo& info) { |
- int sampleCount = fDevice->accessDrawContext()->numColorSamples(); |
+ GrRenderTarget* rt = fDevice->accessRenderTarget(); |
+ int sampleCount = rt->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, |
@@ -84,7 +85,7 @@ |
// 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->accessDrawContext()->desc(); |
+ GrSurfaceDesc desc = fDevice->accessRenderTarget()->desc(); |
GrContext* ctx = fDevice->context(); |
desc.fFlags = desc.fFlags & ~kRenderTarget_GrSurfaceFlag; |
copy.reset(ctx->textureProvider()->createTexture(desc, budgeted)); |