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

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

Issue 2345533002: [SVGDom] Expose intrinsic size info (Closed)
Patch Set: cleanup 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
robertphillips 2016/09/14 18:34:53 Should intrinsicSize be private?
f(malita) 2016/09/14 18:40:05 Might be useful in the future, but yeah, for now t
29 SkSize intrinsicSize() const;
30 const SkSize& containerSize() const;
29 void setContainerSize(const SkSize&); 31 void setContainerSize(const SkSize&);
32
30 void setRoot(sk_sp<SkSVGNode>); 33 void setRoot(sk_sp<SkSVGNode>);
31 34
32 void render(SkCanvas*) const; 35 void render(SkCanvas*) const;
33 36
34 private: 37 private:
35 SkSize fContainerSize; 38 SkSize fContainerSize;
36 sk_sp<SkSVGNode> fRoot; 39 sk_sp<SkSVGNode> fRoot;
37 SkSVGIDMapper fIDMapper; 40 SkSVGIDMapper fIDMapper;
38 41
39 typedef SkRefCnt INHERITED; 42 typedef SkRefCnt INHERITED;
40 }; 43 };
41 44
42 #endif // SkSVGDOM_DEFINED 45 #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