• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2016 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SkMultiPictureDocumentPriv_DEFINED
9 #define SkMultiPictureDocumentPriv_DEFINED
10 
11 #include "SkTArray.h"
12 #include "SkSize.h"
13 
14 namespace SkMultiPictureDocumentProtocol {
15 static constexpr char kMagic[] = "Skia Multi-Picture Doc\n\n";
16 
17 static constexpr char kEndPage[] = "SkMultiPictureEndPage";
18 
19 const uint32_t kVersion = 2;
20 
Join(const SkTArray<SkSize> & sizes)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 
30 }
31 
32 #endif  // SkMultiPictureDocumentPriv_DEFINED
33