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

Unified Diff: ui/gfx/buffer_format_util.h

Issue 1412223009: Reland: GpuMemoryBuffer interface change: Map(**) to Map() and memory(plane); stride(plane) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Win X64 compile fix Created 5 years, 2 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 | « media/video/gpu_memory_buffer_video_frame_pool.cc ('k') | ui/gfx/buffer_format_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/buffer_format_util.h
diff --git a/ui/gfx/buffer_format_util.h b/ui/gfx/buffer_format_util.h
index f656f4ad20f1a07d15b53f6a918a7402e75f2a42..4e42039b2636327c7da743713d47173ca662b2a5 100644
--- a/ui/gfx/buffer_format_util.h
+++ b/ui/gfx/buffer_format_util.h
@@ -15,26 +15,21 @@
namespace gfx {
// Returns a vector containing all buffer formats.
-GFX_EXPORT std::vector<BufferFormat> GetBufferFormats();
+GFX_EXPORT std::vector<BufferFormat> GetBufferFormatsForTesting();
// Returns the number of planes for |format|.
GFX_EXPORT size_t NumberOfPlanesForBufferFormat(BufferFormat format);
// Returns the subsampling factor applied to the given zero-indexed |plane| of
// |format| both horizontally and vertically.
-GFX_EXPORT size_t SubsamplingFactorForBufferFormat(
- BufferFormat format, int plane);
+GFX_EXPORT size_t SubsamplingFactorForBufferFormat(BufferFormat format,
+ int plane);
// Returns the number of bytes used to store a row of the given zero-indexed
// |plane| of |format|.
GFX_EXPORT size_t RowSizeForBufferFormat(size_t width,
BufferFormat format,
int plane);
-GFX_EXPORT bool RowSizeForBufferFormatChecked(size_t width,
- BufferFormat format,
- int plane,
- size_t* size_in_bytes)
- WARN_UNUSED_RESULT;
// Returns the number of bytes used to store all the planes of a given |format|.
GFX_EXPORT size_t BufferSizeForBufferFormat(const Size& size,
@@ -44,6 +39,10 @@ GFX_EXPORT bool BufferSizeForBufferFormatChecked(const Size& size,
size_t* size_in_bytes)
WARN_UNUSED_RESULT;
+GFX_EXPORT int BufferOffsetForBufferFormat(const Size& size,
+ BufferFormat format,
+ size_t plane);
+
} // namespace gfx
#endif // UI_GFX_BUFFER_FORMAT_UTIL_H_
« no previous file with comments | « media/video/gpu_memory_buffer_video_frame_pool.cc ('k') | ui/gfx/buffer_format_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698