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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl.h

Issue 1055403010: content: Add GpuMemoryBuffer MemoryDumpProvider implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move register out of ifdef Created 5 years, 8 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.h
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl.h b/content/common/gpu/client/gpu_memory_buffer_impl.h
index 31b28bcfd2d6681b2f90ac87d173560504335041..1a7e043d60604c9b5ca3e24ab5e516247d5438e9 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl.h
+++ b/content/common/gpu/client/gpu_memory_buffer_impl.h
@@ -36,17 +36,27 @@ class CONTENT_EXPORT GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
// Returns the number of planes based on the format of the buffer.
static size_t NumberOfPlanesForGpuMemoryBufferFormat(Format format);
- // Calculates the number of bytes that an implementation must use to store
- // one row of pixel data.
- static bool StrideInBytes(size_t width,
- Format format,
- int plane,
- size_t* stride_in_bytes);
-
// Returns the subsampling factor applied to the given zero-indexed |plane| of
// the |format| both horizontally and vertically.
static size_t SubsamplingFactor(Format format, int plane);
+ // Returns the number of bytes used to store a row of the given zero-indexed
+ // |plane| of |format|.
+ // Note: This is an approximation and the exact size used by an implementation
+ // might be different.
+ static bool RowSizeInBytes(size_t width,
+ Format format,
+ int plane,
+ size_t* size_in_bytes);
+
+ // Returns the number of bytes used to store all the planes of a given
+ // |format|.
+ // Note: This is an approximation and the exact size used by an implementation
+ // might be different.
+ static bool BufferSizeInBytes(const gfx::Size& size,
+ Format format,
+ size_t* size_in_bytes);
+
// Overridden from gfx::GpuMemoryBuffer:
bool IsMapped() const override;
Format GetFormat() const override;
« no previous file with comments | « content/browser/gpu/browser_gpu_memory_buffer_manager.cc ('k') | content/common/gpu/client/gpu_memory_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698