Tighten up GrSurfaceProxy typing
This may reduce the number of "why not GrTextureProxy" issues
Change-Id: I9e0e5042f5801ba9a933b697a380cb0cb54b4522
Reviewed-on: https://skia-review.googlesource.com/8510
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index a08cb26..16220e0 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -168,6 +168,7 @@
class GrSurfaceProxy : public GrIORefProxy {
public:
static sk_sp<GrSurfaceProxy> MakeWrapped(sk_sp<GrSurface>);
+ static sk_sp<GrTextureProxy> MakeWrapped(sk_sp<GrTexture>);
static sk_sp<GrSurfaceProxy> MakeDeferred(const GrCaps&, const GrSurfaceDesc&,
SkBackingFit, SkBudgeted);
@@ -282,14 +283,12 @@
}
// Helper function that creates a temporary SurfaceContext to perform the copy
- static sk_sp<GrSurfaceProxy> Copy(GrContext*, GrSurfaceProxy* src,
+ static sk_sp<GrTextureProxy> Copy(GrContext*, GrSurfaceProxy* src,
SkIRect srcRect, SkBudgeted);
// Copy the entire 'src'
- static sk_sp<GrSurfaceProxy> Copy(GrContext* context, GrSurfaceProxy* src,
- SkBudgeted budgeted) {
- return Copy(context, src, SkIRect::MakeWH(src->width(), src->height()), budgeted);
- }
+ static sk_sp<GrTextureProxy> Copy(GrContext* context, GrSurfaceProxy* src,
+ SkBudgeted budgeted);
// Test-only entry point - should decrease in use as proxies propagate
static sk_sp<GrSurfaceContext> TestCopy(GrContext* context, const GrSurfaceDesc& dstDesc,