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

Unified Diff: ui/gfx/gpu_memory_buffer.h

Issue 1135943002: Pull in various gpu/command_buffer fixes from chromium (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « gpu/perftests/measurements.cc ('k') | ui/gl/gl_context_stub_with_extensions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gpu_memory_buffer.h
diff --git a/ui/gfx/gpu_memory_buffer.h b/ui/gfx/gpu_memory_buffer.h
index a32e8ac8679cf819495d7136966a6346ed5674be..51731d909581e37eaab8489dea56f0d69b1cf30f 100644
--- a/ui/gfx/gpu_memory_buffer.h
+++ b/ui/gfx/gpu_memory_buffer.h
@@ -71,11 +71,12 @@ class GFX_EXPORT GpuMemoryBuffer {
virtual ~GpuMemoryBuffer() {}
- // Maps the buffer into the client's address space so it can be written to by
- // the CPU. This call may block, for instance if the GPU needs to finish
- // accessing the buffer or if CPU caches need to be synchronized. Returns NULL
- // on failure.
- virtual void* Map() = 0;
+ // Maps each plane of the buffer into the client's address space so it can be
+ // written to by the CPU. A pointer to plane K is stored at index K-1 of the
+ // |data| array. This call may block, for instance if the GPU needs to finish
+ // accessing the buffer or if CPU caches need to be synchronized. Returns
+ // false on failure.
+ virtual bool Map(void** data) = 0;
// Unmaps the buffer. It's illegal to use the pointer returned by Map() after
// this has been called.
@@ -87,8 +88,9 @@ class GFX_EXPORT GpuMemoryBuffer {
// Returns the format for the buffer.
virtual Format GetFormat() const = 0;
- // Returns the stride in bytes for the buffer.
- virtual uint32 GetStride() const = 0;
+ // Fills the stride in bytes for the each plane of the buffer. The stride of
+ // plane K is stored at index K-1 of the |stride| array.
+ virtual void GetStride(uint32* stride) const = 0;
// Returns a platform specific handle for this buffer.
virtual GpuMemoryBufferHandle GetHandle() const = 0;
« no previous file with comments | « gpu/perftests/measurements.cc ('k') | ui/gl/gl_context_stub_with_extensions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698