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

Unified Diff: gpu/GLES2/extensions/CHROMIUM/CHROMIUM_discardable_texture.txt

Issue 2814583002: Service/ClientDiscardableManager (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « gpu/BUILD.gn ('k') | gpu/GLES2/gl2chromium_autogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/GLES2/extensions/CHROMIUM/CHROMIUM_discardable_texture.txt
diff --git a/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_discardable_texture.txt b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_discardable_texture.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f93e7234cfe2549ce4f9dbe7de621040d33df6cf
--- /dev/null
+++ b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_discardable_texture.txt
@@ -0,0 +1,72 @@
+Name
+
+ CHROMIUM_discardable_texture
+
+Name Strings
+
+ GL_CHROMIUM_discardable_texture
+
+Version
+
+ Last Modified Date: April 11, 2017
+
+Dependencies
+
+ OpenGL ES 2.0 is required.
+
+Overview
+
+ This extension defines a way to mark textures as "unlocked" or "not
+ currently in use", giving GL the opportunity to delete these textures as
+ needed (potentially in cases of memory pressure). Clients may try to
+ re-lock such a texture, and if successful may continue to use the texture
+ as normal.
+
+ This allows a client to opportunistically cache data for future use,
+ without worrying about exact memory limits.
+
+New Procedures and Functions
+
+ void glInitializeDiscardableTextureCHROMIUM (GLuint texture_id);
+
+ Notifies GL that a texture may be unlocked in the future. Must be called
+ once on a texture, before any uses of glUnlockTextureCHROMIUM. Will set
+ GL_INVALID_VALUE if called with a texture ID that does not exist, or if
+ called with a texture ID that has already been initialized.
+
+ void glUnlockTextureCHROMIUM (GLuint texture_id);
+
+ Notifies GL that a texture is no longer in use. Once a client calls
+ glUnlockTextureCHROMIUM, they may not use the indicated texture in any
+ future GL calls. This includes using the texture indirectly, via objects
+ (FBOs, etc...) that the texture is bound to. Using a texture once it has
+ been unlocked will behave as though the texture is deleted. Will
+ set GL_INVALID_VALUE if called with a texture ID that has not been
+ initialized via glInitializeDiscardableTextureCHROMIUM.
+
+ bool glLockTextureCHROMIUM (GLuint texture_id);
+
+ Requests that GL re-lock the indicated texture, allowing it to be used in
+ future operations. If this function returns true, the client may continue
+ to use the indicated texture. The client should assume that unlocking a
+ texture clears all bindings (FBOs, etc...), so the client must re-bind the
+ texture as necessary. If this function returns false, the client may not
+ use texture again, and should behave as if the texture was deleted via
+ glDeleteTextures. Will set GL_INVALID_VALUE if called with a texture ID
+ that has not been initialized via glInitializeDiscardableTextureCHROMIUM.
+
+New Tokens
+
+ None.
+
+Errors
+
+ None.
+
+New State
+
+ None.
+
+Revision History
+
+ 3/11/2017 Documented the extension
« no previous file with comments | « gpu/BUILD.gn ('k') | gpu/GLES2/gl2chromium_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698