diff options
author | 2018-03-07 15:20:21 -0500 | |
---|---|---|
committer | 2018-03-07 21:23:30 +0000 | |
commit | 02bd2950e04952398930ed179bb72e08ad5ed3d3 (patch) | |
tree | e7be26df052023b0e3d4504917e923dcccf54b53 /src/gpu/GrProxyProvider.cpp | |
parent | 88df8d2e5a87df5605b1d5530408cc6f534d8feb (diff) |
Make ProxyUtils::MakeTextureProxyFromData use wrapped textures when origin is kBottomLeft
This is to prepare for only supporting kBottomLeft origin for wrapped texture/render targets.
Change-Id: Iecb2e463867f746186695893276ebb5dc47a9d90
Reviewed-on: https://skia-review.googlesource.com/112860
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrProxyProvider.cpp')
-rw-r--r-- | src/gpu/GrProxyProvider.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp index 5091228a60..758a0d1601 100644 --- a/src/gpu/GrProxyProvider.cpp +++ b/src/gpu/GrProxyProvider.cpp @@ -456,7 +456,8 @@ sk_sp<GrTextureProxy> GrProxyProvider::wrapBackendTexture(const GrBackendTexture } sk_sp<GrTextureProxy> GrProxyProvider::wrapRenderableBackendTexture( - const GrBackendTexture& backendTex, GrSurfaceOrigin origin, int sampleCnt) { + const GrBackendTexture& backendTex, GrSurfaceOrigin origin, int sampleCnt, + GrWrapOwnership ownership) { if (this->isAbandoned()) { return nullptr; } @@ -483,13 +484,13 @@ sk_sp<GrTextureProxy> GrProxyProvider::wrapRenderableBackendTexture( } sk_sp<GrTextureProxy> proxy = this->createLazyProxy( - [backendTex, sampleCnt](GrResourceProvider* resourceProvider) { + [backendTex, sampleCnt, ownership](GrResourceProvider* resourceProvider) { if (!resourceProvider) { return sk_sp<GrTexture>(); } - sk_sp<GrTexture> tex = resourceProvider->wrapRenderableBackendTexture(backendTex, - sampleCnt); + sk_sp<GrTexture> tex = resourceProvider->wrapRenderableBackendTexture( + backendTex, sampleCnt, ownership); if (!tex) { return sk_sp<GrTexture>(); } |