Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Unified Diff: src/gpu/gl/GrGLGpu.h

Issue 1249543003: Creating functions for uploading a mipmapped texture. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Style changes based on CL feedback. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGLGpu.h
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index 45337ddb3cae4ec793cbaeca6551f2db1e9c5e4a..1db850cef8902fa5b2cf69efe1d7c0fa8e49856c 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -128,6 +128,13 @@ private:
GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc,
GrGpuResource::LifeCycle lifeCycle,
const void* srcData) override;
+ GrTexture* onCreateMipmappedTexture(const GrSurfaceDesc& desc,
+ GrGpuResource::LifeCycle lifeCycle,
+ const SkMipMap& srcData) override;
+ GrTexture* onCreateCompressedMipmappedTexture(const GrSurfaceDesc& desc,
+ GrGpuResource::LifeCycle lifeCycle,
+ const SkMipMap& srcData) override;
+
GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override;
GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override;
GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership) override;
@@ -291,6 +298,14 @@ private:
int left = 0, int top = 0,
int width = -1, int height = -1);
+ // helper for onCreateMipmappedTexture
+ bool uploadMipmappedTexData(const GrSurfaceDesc& desc,
+ const SkMipMap& data);
+
+ // helper for onCreateCompressedMipmappedTexture
+ bool uploadCompressedMipmappedTexData(const GrSurfaceDesc& desc,
+ const SkMipMap& data);
+
bool createRenderTargetObjects(const GrSurfaceDesc&, GrGpuResource::LifeCycle lifeCycle,
GrGLuint texID, GrGLRenderTarget::IDDesc*);

Powered by Google App Engine
This is Rietveld 408576698