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 |