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

Unified Diff: include/core/SkYUVSizeInfo.h

Issue 1716523002: Update Skia's YUV API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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: include/core/SkYUVSizeInfo.h
diff --git a/include/core/SkYUVSizeInfo.h b/include/core/SkYUVSizeInfo.h
new file mode 100644
index 0000000000000000000000000000000000000000..8fce781528eacb0017cfbcbde5adcacfaae848f7
--- /dev/null
+++ b/include/core/SkYUVSizeInfo.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkYUVSizeInfo_DEFINED
+#define SkYUVSizeInfo_DEFINED
+
+struct YUVSizeInfo {
+ SkISize fYSize;
+ SkISize fUSize;
+ SkISize fVSize;
+
+ /**
+ * While the widths of the Y, U, and V planes are not restricted, the
+ * implementation often requires that the width of the memory allocated
+ * for each plane be a multiple of 8.
+ *
+ * This struct allows us to inform the client how many "widthBytes"
+ * that we need. Note that we use the new idea of "widthBytes"
+ * because this idea is distinct from "rowBytes" (used elsewhere in
+ * Skia). "rowBytes" allow the last row of the allocation to not
+ * include any extra padding, while, in this case, every single row of
+ * the allocation must be at least "widthBytes".
+ */
+ size_t fYWidthBytes;
+ size_t fUWidthBytes;
+ size_t fVWidthBytes;
+};
+
+#endif // SkYUVSizeInfo_DEFINED

Powered by Google App Engine
This is Rietveld 408576698