diff options
author | 2017-12-04 11:23:19 -0500 | |
---|---|---|
committer | 2017-12-04 16:43:39 +0000 | |
commit | e7d8da4b20babbe17abc8f95dd2dea56ee8f9af5 (patch) | |
tree | 100e00396f82be2352ff064763f657be9806f8f6 /include/gpu/gl | |
parent | 8da3655c6e077c2977a0d3b92aef1de6701277ba (diff) |
Add support for internal gl format in GrGLTextureInfo
This gives clients the ability to wrap GL textures with just the GL Format.
This enables us to distinquish between wrapping in Alpha8 texture that is
implented with Alpha or Red format
Bug: skia:
Change-Id: Iacbea60a149c436c270b7ff9ce5d019947678793
Reviewed-on: https://skia-review.googlesource.com/72600
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/gpu/gl')
-rw-r--r-- | include/gpu/gl/GrGLTypes.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/gpu/gl/GrGLTypes.h b/include/gpu/gl/GrGLTypes.h index a615888980..24e50d833e 100644 --- a/include/gpu/gl/GrGLTypes.h +++ b/include/gpu/gl/GrGLTypes.h @@ -105,12 +105,14 @@ typedef unsigned int GrEGLBoolean; /////////////////////////////////////////////////////////////////////////////// /** * Types for interacting with GL resources created externally to Skia. GrBackendObjects for GL - * textures are really const GrGLTexture* + * textures are really const GrGLTexture*. The fFormat here should be a sized, internal format + * for the texture. We will try to use the sized format if the GL Context supports it, otherwise + * we will internally fall back to using the base internal formats. */ - struct GrGLTextureInfo { GrGLenum fTarget; GrGLuint fID; + GrGLenum fFormat = 0; }; GR_STATIC_ASSERT(sizeof(GrBackendObject) >= sizeof(const GrGLTextureInfo*)); |