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

Unified Diff: src/gpu/GrGpu.h

Issue 302783002: Initial work to get ETC1 data up to the GPU (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix some code clarity issues Created 6 years, 7 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/GrGpu.h
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 11f87e0458d9b0b8b0aa3cd386ee7363d4a6028c..f2d0618d6016b0c35d097b2ceef18f72b466f0e1 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -87,6 +87,23 @@ public:
const void* srcData, size_t rowBytes);
/**
+ * Creates a compressed texture object. If desc width or height is not a power of
+ * two but underlying API requires a power of two texture then this function will
+ * return NULL.
+ *
+ * The kRenderTarget_TextureFlag should not be specified
+ *
+ * @param desc describes the texture to be created.
robertphillips 2014/05/27 22:01:50 Mention its compressedness ?
krajcevski 2014/05/27 22:19:29 Done.
+ * @param srcData texel data to load texture. The size of the data is expected
+ * to be large enough to hold as much data as the format expects
+ * with respect to the width and height.
robertphillips 2014/05/27 22:01:50 format ?
krajcevski 2014/05/27 22:19:29 Done.
krajcevski 2014/05/27 22:19:29 Done.
+ *
+ * @return The texture object if successful, otherwise NULL.
+ */
+ GrTexture* createCompressedTexture(const GrTextureDesc& desc,
+ const void* srcData, GrCompressedFormat format);
+
+ /**
* Implements GrContext::wrapBackendTexture
*/
GrTexture* wrapBackendTexture(const GrBackendTextureDesc&);
@@ -414,6 +431,9 @@ private:
virtual GrTexture* onCreateTexture(const GrTextureDesc& desc,
const void* srcData,
size_t rowBytes) = 0;
+ virtual GrTexture* onCreateCompressedTexture(const GrTextureDesc& desc,
+ const void* srcData,
+ GrCompressedFormat format) = 0;
virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) = 0;
virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&) = 0;
virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) = 0;

Powered by Google App Engine
This is Rietveld 408576698