diff options
author | Robert Phillips <robertphillips@google.com> | 2017-07-25 08:37:16 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-25 14:00:43 +0000 |
commit | 22115b4fc6ab169d45a1cfb65dae2dc7e544c80a (patch) | |
tree | 2f71b5d3593b3ebaf8c11ebda91f42f195d7a277 /src/gpu/GrResourceProvider.cpp | |
parent | 866124894209437085bca26228a342e8a4a077ce (diff) |
Reduce dependence on GrSurface's origin field (take 2)
TBR=bsalomon@google.com
Change-Id: Ia238fc66b0fe10a3626c7967b2ac1f1a4bf4cd71
Reviewed-on: https://skia-review.googlesource.com/25800
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrResourceProvider.cpp')
-rw-r--r-- | src/gpu/GrResourceProvider.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp index cc9ec2a315..6061b33e1b 100644 --- a/src/gpu/GrResourceProvider.cpp +++ b/src/gpu/GrResourceProvider.cpp @@ -140,7 +140,7 @@ sk_sp<GrTextureProxy> GrResourceProvider::createTextureProxy(const GrSurfaceDesc if (make_info(desc.fWidth, desc.fHeight, desc.fConfig, &srcInfo)) { sk_sp<GrTexture> tex = this->getExactScratch(desc, budgeted, 0); - sk_sp<GrTextureProxy> proxy = GrSurfaceProxy::MakeWrapped(std::move(tex)); + sk_sp<GrTextureProxy> proxy = GrSurfaceProxy::MakeWrapped(std::move(tex), desc.fOrigin); if (proxy) { sk_sp<GrSurfaceContext> sContext = context->contextPriv().makeWrappedSurfaceContext(std::move(proxy), nullptr); @@ -153,7 +153,7 @@ sk_sp<GrTextureProxy> GrResourceProvider::createTextureProxy(const GrSurfaceDesc } sk_sp<GrTexture> tex(fGpu->createTexture(desc, budgeted, &mipLevel, 1)); - return GrSurfaceProxy::MakeWrapped(std::move(tex)); + return GrSurfaceProxy::MakeWrapped(std::move(tex), desc.fOrigin); } sk_sp<GrTexture> GrResourceProvider::createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted, @@ -312,7 +312,8 @@ void GrResourceProvider::assignUniqueKeyToProxy(const GrUniqueKey& key, GrTextur } // MDB TODO (caching): this side-steps the issue of texture proxies with unique IDs -sk_sp<GrTextureProxy> GrResourceProvider::findProxyByUniqueKey(const GrUniqueKey& key) { +sk_sp<GrTextureProxy> GrResourceProvider::findProxyByUniqueKey(const GrUniqueKey& key, + GrSurfaceOrigin origin) { ASSERT_SINGLE_OWNER sk_sp<GrTexture> texture(this->findAndRefTextureByUniqueKey(key)); @@ -320,7 +321,7 @@ sk_sp<GrTextureProxy> GrResourceProvider::findProxyByUniqueKey(const GrUniqueKey return nullptr; } - return GrSurfaceProxy::MakeWrapped(std::move(texture)); + return GrSurfaceProxy::MakeWrapped(std::move(texture), origin); } const GrBuffer* GrResourceProvider::createPatternedIndexBuffer(const uint16_t* pattern, |