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

Unified Diff: ui/gfx/buffer_format_util.h

Issue 1389133002: content: Use type-parameterized tests for GpuMemoryBuffer implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add blankline 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 | « ui/gfx/OWNERS ('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 39df27b763b68a8bd27e20dd9e8a27e0f0ff5842..f656f4ad20f1a07d15b53f6a918a7402e75f2a42 100644
--- a/ui/gfx/buffer_format_util.h
+++ b/ui/gfx/buffer_format_util.h
@@ -5,6 +5,8 @@
#ifndef UI_GFX_BUFFER_FORMAT_UTIL_H_
#define UI_GFX_BUFFER_FORMAT_UTIL_H_
+#include <vector>
+
#include "base/basictypes.h"
#include "ui/gfx/buffer_types.h"
#include "ui/gfx/geometry/size.h"
@@ -12,6 +14,9 @@
namespace gfx {
+// Returns a vector containing all buffer formats.
+GFX_EXPORT std::vector<BufferFormat> GetBufferFormats();
+
// Returns the number of planes for |format|.
GFX_EXPORT size_t NumberOfPlanesForBufferFormat(BufferFormat format);
@@ -22,17 +27,21 @@ GFX_EXPORT size_t SubsamplingFactorForBufferFormat(
// 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, gfx::BufferFormat format, int plane);
-GFX_EXPORT bool RowSizeForBufferFormatChecked(
- size_t width, gfx::BufferFormat format, int plane, size_t* size_in_bytes)
+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, gfx::BufferFormat format);
-GFX_EXPORT bool BufferSizeForBufferFormatChecked(
- const Size& size, gfx::BufferFormat format, size_t* size_in_bytes)
+GFX_EXPORT size_t BufferSizeForBufferFormat(const Size& size,
+ BufferFormat format);
+GFX_EXPORT bool BufferSizeForBufferFormatChecked(const Size& size,
+ BufferFormat format,
+ size_t* size_in_bytes)
WARN_UNUSED_RESULT;
} // namespace gfx
« no previous file with comments | « ui/gfx/OWNERS ('k') | ui/gfx/buffer_format_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698