aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-02-15 14:19:01 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-15 20:17:29 +0000
commit63c67461ed07b5fca35182ac62657b2cb16afbb4 (patch)
tree461c958cfca8c01c1fba552438a6c05f9da2bb45 /include
parentca4c60f5413ba2af4ddfce7160ddd226e8738e02 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrProcessorUnitTest.h6
-rw-r--r--include/private/GrSurfaceProxy.h9
2 files changed, 6 insertions, 9 deletions
diff --git a/include/gpu/GrProcessorUnitTest.h b/include/gpu/GrProcessorUnitTest.h
index 748a522c57..0f7e8e8d7c 100644
--- a/include/gpu/GrProcessorUnitTest.h
+++ b/include/gpu/GrProcessorUnitTest.h
@@ -64,12 +64,10 @@ struct GrProcessorTestData {
GrContext* context() { return fContext; }
GrTexture* texture(int index) { return fTextures[index]; }
- sk_sp<GrTextureProxy> textureProxy(int index) {
- return sk_ref_sp(fProxies[index]->asTextureProxy());
- }
+ sk_sp<GrTextureProxy> textureProxy(int index) { return fProxies[index]; }
private:
- sk_sp<GrSurfaceProxy> fProxies[2];
+ sk_sp<GrTextureProxy> fProxies[2];
};
#if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index a08cb2654a..16220e06ba 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -168,6 +168,7 @@ private:
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 @@ public:
}
// 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,