blob: 6d5ab47d211f35a821b55a1da3f776a9de64dd82 [file] [log] [blame]
halcanary45420a92016-06-02 12:41:14 -07001/*
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
halcanaryc966ef92016-08-23 09:15:04 -070011#include "SkTArray.h"
12#include "SkSize.h"
halcanary45420a92016-06-02 12:41:14 -070013
14namespace SkMultiPictureDocumentProtocol {
15static constexpr char kMagic[] = "Skia Multi-Picture Doc\n\n";
16
halcanaryc966ef92016-08-23 09:15:04 -070017static constexpr char kEndPage[] = "SkMultiPictureEndPage";
18
19const uint32_t kVersion = 2;
20
21inline 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
halcanary45420a92016-06-02 12:41:14 -070030}
31
32#endif // SkMultiPictureDocumentPriv_DEFINED