summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/image_factory.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 /gpu/command_buffer/service/image_factory.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 'gpu/command_buffer/service/image_factory.h')
-rw-r--r--gpu/command_buffer/service/image_factory.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/gpu/command_buffer/service/image_factory.h b/gpu/command_buffer/service/image_factory.h
index c805db0..3746d56 100644
--- a/gpu/command_buffer/service/image_factory.h
+++ b/gpu/command_buffer/service/image_factory.h
@@ -26,10 +26,6 @@ class GPU_EXPORT ImageFactory {
static gfx::BufferFormat DefaultBufferFormatForImageFormat(
unsigned internalformat);
- // Returns a valid GpuMemoryBuffer usage given a valid usage as defined by
- // CHROMIUM_gpu_memory_buffer_image.
- static gfx::BufferUsage ImageUsageToGpuMemoryBufferUsage(unsigned usage);
-
// Returns true if |internalformat| is compatible with |format|.
static bool IsImageFormatCompatibleWithGpuMemoryBufferFormat(
unsigned internalformat,