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

Side by Side 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, 3 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 unified diff | Download patch
« no previous file with comments | « src/utils/SkMultiPictureDocument.cpp ('k') | src/utils/SkMultiPictureDocumentReader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkMultiPictureDocumentPriv_DEFINED 8 #ifndef SkMultiPictureDocumentPriv_DEFINED
9 #define SkMultiPictureDocumentPriv_DEFINED 9 #define SkMultiPictureDocumentPriv_DEFINED
10 10
11 #include "stdint.h" 11 #include "SkTArray.h"
12 #include "SkSize.h"
12 13
13 namespace SkMultiPictureDocumentProtocol { 14 namespace SkMultiPictureDocumentProtocol {
14 static constexpr char kMagic[] = "Skia Multi-Picture Doc\n\n"; 15 static constexpr char kMagic[] = "Skia Multi-Picture Doc\n\n";
15 16
16 struct Entry { 17 static constexpr char kEndPage[] = "SkMultiPictureEndPage";
17 uint64_t offset; 18
18 float sizeX; 19 const uint32_t kVersion = 2;
19 float sizeY; 20
20 }; 21 inline SkSize Join(const SkTArray<SkSize>& sizes) {
22 SkSize joined = SkSize::Make(0, 0);
23 for (SkSize s : sizes) {
24 joined = SkSize::Make(SkTMax(joined.width(), s.width()),
25 SkTMax(joined.height(), s.height()));
26 }
27 return joined;
28 }
29
21 } 30 }
22 31
23 #endif // SkMultiPictureDocumentPriv_DEFINED 32 #endif // SkMultiPictureDocumentPriv_DEFINED
OLDNEW
« 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
This is Rietveld 408576698