diff options
author | 2018-01-29 09:33:59 -0500 | |
---|---|---|
committer | 2018-01-29 15:00:29 +0000 | |
commit | 9d86f1d11d1b7a43eb65aed90c437100c2f78f11 (patch) | |
tree | 4d0500d22743a8259df92d4123598367bb059a5a /src/gpu/GrProxyProvider.h | |
parent | 26a8d90d3c40385be71b3876ec2cbf6c5397a39c (diff) |
Add createTextureProxy function to ProxyProvider that takes an SkImage
Bug: skia:
Change-Id: I46c66dc5b58839596c639b130f19a57cb85529d6
Reviewed-on: https://skia-review.googlesource.com/99700
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrProxyProvider.h')
-rw-r--r-- | src/gpu/GrProxyProvider.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpu/GrProxyProvider.h b/src/gpu/GrProxyProvider.h index 8ddd61ce7c..0ac7d4994b 100644 --- a/src/gpu/GrProxyProvider.h +++ b/src/gpu/GrProxyProvider.h @@ -18,6 +18,7 @@ class GrCaps; class GrResourceProvider; class GrSingleOwner; class GrBackendRenderTarget; +class SkImage; /* * A factory for creating GrSurfaceProxy-derived objects. @@ -75,6 +76,17 @@ public: const void* srcData, size_t rowBytes); /* + * Create an un-mipmapped texture proxy with data. The SkImage must be a raster backend image. + * Since the SkImage is ref counted, we simply take a ref on it to keep the data alive until we + * actually upload the data to the gpu. + */ + sk_sp<GrTextureProxy> createTextureProxy(sk_sp<SkImage> srcImage, + GrSurfaceFlags flags, + GrSurfaceOrigin origin, + int sampleCnt, + SkBudgeted budgeted); + + /* * Create a mipmapped texture proxy with data. * * @param desc Description of the texture properties. |