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

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: 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: ui/gfx/gpu_memory_buffer.h
diff --git a/ui/gfx/gpu_memory_buffer.h b/ui/gfx/gpu_memory_buffer.h
index 3cbf64c1826bf705cc61676ad0a9c43588af89ac..9fd51a5a52f34cac9310e176f418e7e8b6e04c3b 100644
--- a/ui/gfx/gpu_memory_buffer.h
+++ b/ui/gfx/gpu_memory_buffer.h
@@ -60,7 +60,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