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

Unified Diff: ui/gfx/gpu_memory_buffer.h

Issue 1139903005: Add PERSISTENT_MAP usage for GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: persistentmap: . 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: ui/gfx/gpu_memory_buffer.h
diff --git a/ui/gfx/gpu_memory_buffer.h b/ui/gfx/gpu_memory_buffer.h
index 121bd0290f1bdd53c1c499f4cc1982cd769fbd6d..dc18ed4c8c17c4793124eb12079e229dc5ee673a 100644
--- a/ui/gfx/gpu_memory_buffer.h
+++ b/ui/gfx/gpu_memory_buffer.h
@@ -59,7 +59,10 @@ class GFX_EXPORT GpuMemoryBuffer {
// The usage mode affects how a buffer can be used. Only buffers created with
// MAP can be mapped into the client's address space and accessed by the CPU.
- enum Usage { MAP, SCANOUT, USAGE_LAST = SCANOUT };
+ // PERSISTENT_MAP adds the additional condition that successive Map() calls
+ // (with Unmap() calls between) will return a pointer to the same memory
+ // contents.
+ enum Usage { MAP, PERSISTENT_MAP, SCANOUT, USAGE_LAST = SCANOUT };
virtual ~GpuMemoryBuffer() {}

Powered by Google App Engine
This is Rietveld 408576698