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

Unified Diff: src/gpu/GrTextureParamsAdjuster.cpp

Issue 2215323003: Start using RenderTargetProxy (omnibus) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 1 month 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/GrRenderTargetOpList.cpp ('k') | src/gpu/GrTextureToYUVPlanes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextureParamsAdjuster.cpp
diff --git a/src/gpu/GrTextureParamsAdjuster.cpp b/src/gpu/GrTextureParamsAdjuster.cpp
index 43bfec84631d65b3ad0eaf2ac6bcc916c7d6a9bd..d8673d9df934fe8039cc3393bf3ff0a57293dd37 100644
--- a/src/gpu/GrTextureParamsAdjuster.cpp
+++ b/src/gpu/GrTextureParamsAdjuster.cpp
@@ -17,6 +17,7 @@
#include "GrTexture.h"
#include "GrTextureParams.h"
#include "GrTextureProvider.h"
+#include "GrTextureProxy.h"
#include "SkCanvas.h"
#include "SkGr.h"
#include "SkGrPriv.h"
@@ -85,7 +86,8 @@ static GrTexture* copy_on_gpu(GrTexture* inputTexture, const SkIRect* subset,
SkRect dstRect = SkRect::MakeIWH(copyParams.fWidth, copyParams.fHeight);
copyRTC->fillRectToRect(GrNoClip(), paint, SkMatrix::I(), dstRect, localRect);
- return copyRTC->asTexture().release();
+ sk_sp<GrTextureProxy> tp(copyRTC->asDeferredTexture());
+ return SkRef(tp->instantiate(context->textureProvider()));
}
GrTextureAdjuster::GrTextureAdjuster(GrTexture* original, SkAlphaType alphaType,
« no previous file with comments | « src/gpu/GrRenderTargetOpList.cpp ('k') | src/gpu/GrTextureToYUVPlanes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698