summaryrefslogtreecommitdiffstats
path: root/ui/gl/gl_bindings.h
diff options
context:
space:
mode:
authorreveman <reveman@chromium.org>2015-10-26 13:27:47 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-26 20:28:42 +0000
commiteb0fda21bf0fc43f591dfe2a6302fc014c425118 (patch)
treebb053cf4e4557a8c94910f48a4dbe118988e5a1f /ui/gl/gl_bindings.h
parentb65cfea2a48ce74ac98e2b10006e9d8b868d4553 (diff)
downloadchromium_src-eb0fda21bf0fc43f591dfe2a6302fc014c425118.zip
chromium_src-eb0fda21bf0fc43f591dfe2a6302fc014c425118.tar.gz
chromium_src-eb0fda21bf0fc43f591dfe2a6302fc014c425118.tar.bz2
ui: Rename gfx::BufferUsage enum values and add BufferUsage::GPU_READ.
The problem with the current usage modes is that we currently use SCANOUT for anything that doesn't require CPU access. When importing a buffer we typically don't care about anything but having the GPU be able to read from it. SCANOUT is not a good description of that and currently means GPU read/write support. This patch attempts to make usage more explicit and it solves the use case where a buffer type can only provide GPU read and not GPU write support (e.g. SHM fallback). Here are the new usage modes: - GPU_READ - GPU_READ_WRITE - GPU_READ_CPU_READ_WRITE GPU_READ is useful when importing a buffer and all you care about is being able to use it for sampling and optionally scanout. GPU_READ_WRITE is useful for things like WebGL or GPU raster where we want the ability to write to the buffer using GL and potentially use it for scanout. GPU_READ_CPU_READ_WRITE is the usage mode that allows CPU access and is used for one-copy and zero-copy texture initialization. There's nothing preventing this mode from also supporting scanout. - GPU_READ_CPU_READ_WRITE_PERSISTENT This usage mode indicates that the data will be persistent across Unmap()/Map() calls but will likely become part of the normal GPU_READ_CPU_READ_WRITE usage once all buffer types support this. BUG=538325 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1420923005 Cr-Commit-Position: refs/heads/master@{#356108}
Diffstat (limited to 'ui/gl/gl_bindings.h')
-rw-r--r--ui/gl/gl_bindings.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/ui/gl/gl_bindings.h b/ui/gl/gl_bindings.h
index c1ad779..f043bef 100644
--- a/ui/gl/gl_bindings.h
+++ b/ui/gl/gl_bindings.h
@@ -127,8 +127,7 @@
#define GL_COMMANDS_COMPLETED_CHROMIUM 0x84F7
// GL_CHROMIUM_gpu_memory_buffer_image
-#define GL_MAP_CHROMIUM 0x78F1
-#define GL_SCANOUT_CHROMIUM 0x78F2
+#define GL_READ_WRITE_CHROMIUM 0x78F2
// GL_CHROMIUM_yuv_420_image
#define GL_RGB_YUV_420_CHROMIUM 0x78FA