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

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

Issue 2818993002: GL Implementation for GPU Discardable
Patch Set: rebase Created 3 years, 8 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 | 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..d72c83873676c155597f253ea0d7c16b2b2e1c64
--- /dev/null
+++ b/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_discardable_texture.txt
@@ -0,0 +1,71 @@
+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 refer to the texture. Using a texture once it has
+ been unlocked is undefined, and may behave as though the texture has been
+ deleted. Will set GL_INVALID_VALUE if called with a texture ID that has
+ not beein 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 as though it was never unlocked. If this
+ function returns false, the client may not use the 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 beein
+ initialized via glInitializeDiscardableTextureCHROMIUM.
+
+New Tokens
+
+ None.
+
+Errors
+
+ None.
+
+New State
+
+ None.
+
+Revision History
+
+ 3/11/2017 Documented the extension
« no previous file with comments | « no previous file | gpu/GLES2/gl2chromium_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698