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

Unified Diff: include/gpu/GrContext.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: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index b28c444edc37d76118127c19d3fc6b68e4ce46f2..663fd4e9f41d8dcfcd30efd8c8d5a1a2a225775c 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -216,7 +216,26 @@ public:
void* srcData,
size_t rowBytes,
GrResourceKey* cacheKey = NULL);
-
+ /**
+ * Creates a new entry, based on the specified key and texture and returns it. The caller owns a
+ * ref on the returned texture which must be balanced by a call to unref.
+ *
+ * @param params The texture params used to draw a texture may help determine
+ * the cache entry used. (e.g. different versions may exist
+ * for different wrap modes on GPUs with limited NPOT
+ * texture support). NULL implies clamp wrap modes.
+ * @param desc Description of the texture properties.
+ * @param cacheID Cache-specific properties (e.g., texture gen ID)
+ * @param srcData Pointer to the compressed pixel values.
+ * @param format The compressed texture format to use
+ * @param cacheKey (optional) If non-NULL, we'll write the cache key we used to cacheKey.
+ */
+ GrTexture* createCompressedTexture(const GrTextureParams* params,
+ const GrTextureDesc& desc,
+ const GrCacheID& cacheID,
+ const void* srcData,
+ GrCompressedFormat format,
+ GrResourceKey* cacheKey = NULL);
/**
* Search for an entry based on key and dimensions. If found, ref it and return it. The return
* value will be NULL if not found. The caller must balance with a call to unref.

Powered by Google App Engine
This is Rietveld 408576698