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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc

Issue 1139903005: Add PERSISTENT_MAP usage for GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: persistentmap: rebase Created 5 years, 7 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
Index: content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
index cf9505625ffd53ae1b42a63b7909f525dde594f1..992372b78066484004a83318ae90f6f6e1936c26 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc
@@ -121,6 +121,19 @@ bool GpuMemoryBufferImplSharedMemory::IsFormatSupported(Format format) {
}
// static
+bool GpuMemoryBufferImplSharedMemory::IsUsageSupported(Usage usage) {
+ switch (usage) {
+ case MAP:
+ case PERSISTENT_MAP:
+ return true;
+ case SCANOUT:
+ return false;
+ }
+ NOTREACHED();
+ return false;
+}
+
+// static
bool GpuMemoryBufferImplSharedMemory::IsSizeValidForFormat(
const gfx::Size& size,
Format format) {

Powered by Google App Engine
This is Rietveld 408576698