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

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: fixmandolinebetter 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 02a5048d27f1a530c65df9b3a315ac22afda21f3..55fc101a05be5abfc7a75727b34fc94c668f33e3 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
@@ -120,6 +120,17 @@ bool GpuMemoryBufferImplSharedMemory::IsFormatSupported(Format format) {
}
// static
+bool GpuMemoryBufferImplSharedMemory::IsUsageSupported(Usage usage) {
+ switch (usage) {
+ case MAP:
+ case PERSISTENT_MAP:
+ return true;
+ case SCANOUT:
+ return false;
+ }
+}
reveman 2015/05/20 14:26:08 NOTREACHED(); return false;
danakj 2015/05/20 17:51:14 Done.
+
+// static
bool GpuMemoryBufferImplSharedMemory::IsSizeValidForFormat(
const gfx::Size& size,
Format format) {

Powered by Google App Engine
This is Rietveld 408576698