Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Unified Diff: src/image/SkSurface_Gpu.cpp

Issue 1956473002: Retract GrRenderTarget a bit within SkGpuDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove possible regressor Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698