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

Side by Side Diff: experimental/svg/model/SkSVGDOM.h

Issue 2345533002: [SVGDom] Expose intrinsic size info (Closed)
Patch Set: private intrinsicSize() 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 | « dm/DMSrcSink.cpp ('k') | experimental/svg/model/SkSVGDOM.cpp » ('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 SkSVGDOM_DEFINED 8 #ifndef SkSVGDOM_DEFINED
9 #define SkSVGDOM_DEFINED 9 #define SkSVGDOM_DEFINED
10 10
11 #include "SkRefCnt.h" 11 #include "SkRefCnt.h"
12 #include "SkSize.h" 12 #include "SkSize.h"
13 #include "SkSVGIDMapper.h" 13 #include "SkSVGIDMapper.h"
14 #include "SkTemplates.h" 14 #include "SkTemplates.h"
15 15
16 class SkCanvas; 16 class SkCanvas;
17 class SkDOM; 17 class SkDOM;
18 class SkStream; 18 class SkStream;
19 class SkSVGNode; 19 class SkSVGNode;
20 20
21 class SkSVGDOM : public SkRefCnt { 21 class SkSVGDOM : public SkRefCnt {
22 public: 22 public:
23 SkSVGDOM(const SkSize& containerSize); 23 SkSVGDOM();
24 ~SkSVGDOM() = default; 24 ~SkSVGDOM() = default;
25 25
26 static sk_sp<SkSVGDOM> MakeFromDOM(const SkDOM&, const SkSize& containerSize ); 26 static sk_sp<SkSVGDOM> MakeFromDOM(const SkDOM&);
27 static sk_sp<SkSVGDOM> MakeFromStream(SkStream&, const SkSize& containerSize ); 27 static sk_sp<SkSVGDOM> MakeFromStream(SkStream&);
28 28
29 const SkSize& containerSize() const;
29 void setContainerSize(const SkSize&); 30 void setContainerSize(const SkSize&);
31
30 void setRoot(sk_sp<SkSVGNode>); 32 void setRoot(sk_sp<SkSVGNode>);
31 33
32 void render(SkCanvas*) const; 34 void render(SkCanvas*) const;
33 35
34 private: 36 private:
37 SkSize intrinsicSize() const;
38
35 SkSize fContainerSize; 39 SkSize fContainerSize;
36 sk_sp<SkSVGNode> fRoot; 40 sk_sp<SkSVGNode> fRoot;
37 SkSVGIDMapper fIDMapper; 41 SkSVGIDMapper fIDMapper;
38 42
39 typedef SkRefCnt INHERITED; 43 typedef SkRefCnt INHERITED;
40 }; 44 };
41 45
42 #endif // SkSVGDOM_DEFINED 46 #endif // SkSVGDOM_DEFINED
OLDNEW
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | experimental/svg/model/SkSVGDOM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698