diff options
Diffstat (limited to 'src/gpu/gl/GrGLGpu.h')
-rw-r--r-- | src/gpu/gl/GrGLGpu.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h index a4706c79ed..cf3d38fa6b 100644 --- a/src/gpu/gl/GrGLGpu.h +++ b/src/gpu/gl/GrGLGpu.h @@ -163,6 +163,9 @@ private: GrTexture* onCreateTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted, const SkTArray<GrMipLevel>& texels) override; + GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, + SkBudgeted budgeted, + const SkTArray<GrMipLevel>& texels) override; GrBuffer* onCreateBuffer(size_t size, GrBufferType intendedType, GrAccessPattern, const void* data) override; @@ -363,6 +366,18 @@ private: int top, int width, int height, GrPixelConfig dataConfig, const SkTArray<GrMipLevel>& texels); + // helper for onCreateCompressedTexture. If width and height are + // set to -1, then this function will use desc.fWidth and desc.fHeight + // for the size of the data. The isNewTexture flag should be set to true + // whenever a new texture needs to be created. Otherwise, we assume that + // the texture is already in GPU memory and that it's going to be updated + // with new data. + bool uploadCompressedTexData(GrPixelConfig texAndDataConfig, int texWidth, int texHeight, + GrSurfaceOrigin texOrigin, GrGLenum target, + const SkTArray<GrMipLevel>& texels, + UploadType uploadType = kNewTexture_UploadType, int left = 0, + int top = 0, int width = -1, int height = -1); + bool createRenderTargetObjects(const GrSurfaceDesc&, const GrGLTextureInfo& texInfo, GrGLRenderTarget::IDDesc*); |