Index: content/common/gpu/client/gpu_memory_buffer_impl.cc |
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl.cc b/content/common/gpu/client/gpu_memory_buffer_impl.cc |
index 77a846fe8c1b801b54ac84f2cc87e6df378c42c2..24b68fc8daa7f9c83ff0614d045aa509a3077229 100644 |
--- a/content/common/gpu/client/gpu_memory_buffer_impl.cc |
+++ b/content/common/gpu/client/gpu_memory_buffer_impl.cc |
@@ -28,6 +28,16 @@ bool GpuMemoryBufferImpl::IsFormatValid(unsigned internalformat) { |
} |
// static |
+bool GpuMemoryBufferImpl::IsUsageValid(unsigned usage) { |
+ switch (usage) { |
+ case GL_IMAGE_CPU_READ_WRITE_CHROMIUM: |
+ return true; |
+ default: |
+ return false; |
+ } |
+} |
+ |
+// static |
size_t GpuMemoryBufferImpl::BytesPerPixel(unsigned internalformat) { |
switch (internalformat) { |
case GL_BGRA8_EXT: |