diff options
author | Brian Salomon <bsalomon@google.com> | 2018-03-07 13:01:25 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-07 18:22:40 +0000 |
commit | 58389b90cd387533021c109eb28da40c08e0ead5 (patch) | |
tree | 7744ee9c23c74c61aa00a3cc01eff74cedb8f541 /src/gpu/GrGpu.h | |
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/GrGpu.h')
-rw-r--r-- | src/gpu/GrGpu.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h index e7e4ac087f..786fb31107 100644 --- a/src/gpu/GrGpu.h +++ b/src/gpu/GrGpu.h @@ -93,20 +93,18 @@ public: * pixel configs can be used as render targets. Support for configs as textures * or render targets can be checked using GrCaps. * - * @param desc describes the texture to be created. - * @param budgeted does this texture count against the resource cache budget? - * @param texelsOrigin origin of the texel data to be uploaded. Ignored if there is - * no initial texel data. - * @param texels array of mipmap levels containing texel data to load. - * Each level begins with full-size palette data for paletted textures. - * It contains width*height texels. If there is only one - * element and it contains nullptr fPixels, texture data is - * uninitialized. - * @param mipLevelCount the number of levels in 'texels' - * @return The texture object if successful, otherwise nullptr. + * @param desc describes the texture to be created. + * @param budgeted does this texture count against the resource cache budget? + * @param texels array of mipmap levels containing texel data to load. + * Each level begins with full-size palette data for paletted textures. + * It contains width*height texels. If there is only one + * element and it contains nullptr fPixels, texture data is + * uninitialized. + * @param mipLevelCount the number of levels in 'texels' + * @return The texture object if successful, otherwise nullptr. */ - sk_sp<GrTexture> createTexture(const GrSurfaceDesc&, SkBudgeted, GrSurfaceOrigin texelsOrigin, - const GrMipLevel texels[], int mipLevelCount); + sk_sp<GrTexture> createTexture(const GrSurfaceDesc&, SkBudgeted, const GrMipLevel texels[], + int mipLevelCount); /** * Simplified createTexture() interface for when there is no initial texel data to upload. @@ -546,7 +544,6 @@ private: // Texture size and sample size will have already been validated in base class before // onCreateTexture is called. virtual sk_sp<GrTexture> onCreateTexture(const GrSurfaceDesc&, SkBudgeted, - GrSurfaceOrigin texelsOrigin, const GrMipLevel texels[], int mipLevelCount) = 0; virtual sk_sp<GrTexture> onWrapBackendTexture(const GrBackendTexture&, GrWrapOwnership) = 0; |