diff options
author | 2018-03-07 13:01:25 -0500 | |
---|---|---|
committer | 2018-03-07 18:22:40 +0000 | |
commit | 58389b90cd387533021c109eb28da40c08e0ead5 (patch) | |
tree | 7744ee9c23c74c61aa00a3cc01eff74cedb8f541 /src/gpu/GrResourceProvider.cpp | |
parent | ab6fd7ef91aeca8a3fbbc6c6670cb89a5a7b6d53 (diff) |
Initial texture data is never flipped when uploaded.
The first bytes of the data always refer to the pixel accessed by texture coord (0, 0).
Change-Id: I708702d90f35b3bc896a48c3c3fd6a0be73f505a
Reviewed-on: https://skia-review.googlesource.com/112261
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrResourceProvider.cpp')
-rw-r--r-- | src/gpu/GrResourceProvider.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp index f81eea3884..df848e8d3c 100644 --- a/src/gpu/GrResourceProvider.cpp +++ b/src/gpu/GrResourceProvider.cpp @@ -62,7 +62,6 @@ GrResourceProvider::GrResourceProvider(GrGpu* gpu, GrResourceCache* cache, GrSin } sk_sp<GrTexture> GrResourceProvider::createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted, - GrSurfaceOrigin texelsOrigin, const GrMipLevel texels[], int mipLevelCount, SkDestinationSurfaceColorMode mipColorMode) { ASSERT_SINGLE_OWNER @@ -78,7 +77,7 @@ sk_sp<GrTexture> GrResourceProvider::createTexture(const GrSurfaceDesc& desc, Sk return nullptr; } - sk_sp<GrTexture> tex(fGpu->createTexture(desc, budgeted, texelsOrigin, texels, mipLevelCount)); + sk_sp<GrTexture> tex(fGpu->createTexture(desc, budgeted, texels, mipLevelCount)); if (tex) { tex->texturePriv().setMipColorMode(mipColorMode); } @@ -109,7 +108,6 @@ static bool make_info(int w, int h, GrPixelConfig config, SkImageInfo* ii) { sk_sp<GrTexture> GrResourceProvider::createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted, SkBackingFit fit, - GrSurfaceOrigin mipLevelOrigin, const GrMipLevel& mipLevel) { ASSERT_SINGLE_OWNER @@ -133,8 +131,8 @@ sk_sp<GrTexture> GrResourceProvider::createTexture(const GrSurfaceDesc& desc, if (make_info(desc.fWidth, desc.fHeight, desc.fConfig, &srcInfo)) { // DDL TODO: remove this use of createInstantiatedProxy and convert it to a testing-only // method. - sk_sp<GrTextureProxy> proxy = - proxyProvider->createInstantiatedProxy(desc, mipLevelOrigin, fit, budgeted); + sk_sp<GrTextureProxy> proxy = proxyProvider->createInstantiatedProxy( + desc, kTopLeft_GrSurfaceOrigin, fit, budgeted); if (proxy) { // We use an ephemeral surface context to do the write pixels. Here it isn't clear what // color space to tag it with. That's ok because GrSurfaceContext::writePixels doesn't @@ -155,7 +153,7 @@ sk_sp<GrTexture> GrResourceProvider::createTexture(const GrSurfaceDesc& desc, } } - return fGpu->createTexture(desc, budgeted, mipLevelOrigin, &mipLevel, 1); + return fGpu->createTexture(desc, budgeted, &mipLevel, 1); } sk_sp<GrTexture> GrResourceProvider::createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted, |