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

Unified Diff: include/gpu/GrContext.h

Issue 638403003: Remove uses of GrAutoScratchTexture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 2 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
« no previous file with comments | « no previous file | include/gpu/GrSurface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 2b3b8143974d234e5b30b13866983e1a2775cda4..536b17b9b8987fe2ce6588bdcf949d7303c541b4 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -280,27 +280,28 @@ public:
};
/**
- * Returns a texture matching the desc. It's contents are unknown. Subsequent
- * requests with the same descriptor are not guaranteed to return the same
- * texture. The same texture is guaranteed not be returned again until it is
- * unlocked. Call must be balanced with an unlockTexture() call. The caller
+ * Returns a texture matching the desc. It's contents are unknown. The caller
* owns a ref on the returned texture and must balance with a call to unref.
+ * It is guaranteed that the same texture will not be returned in subsequent
+ * calls until all refs to the texture are dropped.
*
- * Textures created by createAndLockTexture() hide the complications of
+ * Textures created by createTexture() hide the complications of
* tiling non-power-of-two textures on APIs that don't support this (e.g.
- * unextended GLES2). Tiling a NPOT texture created by lockScratchTexture on
- * such an API will create gaps in the tiling pattern. This includes clamp
- * mode. (This may be addressed in a future update.)7
+ * unextended GLES2). NPOT scratch textures are not tilable on such APIs.
*
* internalFlag is a temporary workaround until changes in the internal
* architecture are complete. Use the default value.
*/
- GrTexture* lockAndRefScratchTexture(const GrTextureDesc&, ScratchTexMatch match,
- bool internalFlag = false);
+ GrTexture* refScratchTexture(const GrTextureDesc&, ScratchTexMatch match,
+ bool internalFlag = false);
/**
* Creates a texture that is outside the cache. Does not count against
* cache's budget.
+ *
+ * Textures created by createTexture() hide the complications of
+ * tiling non-power-of-two textures on APIs that don't support this (e.g.
+ * unextended GLES2). NPOT uncached textures are not tilable on such APIs.
*/
GrTexture* createUncachedTexture(const GrTextureDesc& desc,
void* srcData,
@@ -1092,7 +1093,7 @@ public:
fContext = context;
if (fContext) {
- fTexture = fContext->lockAndRefScratchTexture(desc, match, internalFlag);
+ fTexture = fContext->refScratchTexture(desc, match, internalFlag);
if (NULL == fTexture) {
fContext = NULL;
}
« no previous file with comments | « no previous file | include/gpu/GrSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698