Chromium Code Reviews

Unified Diff: src/utils/SkMultiPictureDocumentPriv.h

Issue 2255333003: SkMultiSKP: version 2 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-08-23 (Tuesday) 11:53:05 EDT Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/utils/SkMultiPictureDocument.cpp ('k') | src/utils/SkMultiPictureDocumentReader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkMultiPictureDocumentPriv.h
diff --git a/src/utils/SkMultiPictureDocumentPriv.h b/src/utils/SkMultiPictureDocumentPriv.h
index 124dad7c6bcb56b799fd69796f8d92c98291d1c5..6d5ab47d211f35a821b55a1da3f776a9de64dd82 100644
--- a/src/utils/SkMultiPictureDocumentPriv.h
+++ b/src/utils/SkMultiPictureDocumentPriv.h
@@ -8,16 +8,25 @@
#ifndef SkMultiPictureDocumentPriv_DEFINED
#define SkMultiPictureDocumentPriv_DEFINED
-#include "stdint.h"
+#include "SkTArray.h"
+#include "SkSize.h"
namespace SkMultiPictureDocumentProtocol {
static constexpr char kMagic[] = "Skia Multi-Picture Doc\n\n";
-struct Entry {
- uint64_t offset;
- float sizeX;
- float sizeY;
-};
+static constexpr char kEndPage[] = "SkMultiPictureEndPage";
+
+const uint32_t kVersion = 2;
+
+inline SkSize Join(const SkTArray<SkSize>& sizes) {
+ SkSize joined = SkSize::Make(0, 0);
+ for (SkSize s : sizes) {
+ joined = SkSize::Make(SkTMax(joined.width(), s.width()),
+ SkTMax(joined.height(), s.height()));
+ }
+ return joined;
+}
+
}
#endif // SkMultiPictureDocumentPriv_DEFINED
« no previous file with comments | « src/utils/SkMultiPictureDocument.cpp ('k') | src/utils/SkMultiPictureDocumentReader.h » ('j') | no next file with comments »

Powered by Google App Engine