OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "SkViewPriv.h" | 8 #include "SkViewPriv.h" |
9 | 9 |
10 ////////////////////////////////////////////////////////////////////// | 10 ////////////////////////////////////////////////////////////////////// |
11 | 11 |
12 void SkView::Artist::draw(SkView* view, SkCanvas* canvas) | 12 void SkView::Artist::draw(SkView* view, SkCanvas* canvas) |
13 { | 13 { |
14 SkASSERT(view && canvas); | 14 SkASSERT(view && canvas); |
15 this->onDraw(view, canvas); | 15 this->onDraw(view, canvas); |
16 } | 16 } |
17 | 17 |
18 void SkView::Artist::inflate(const SkDOM& dom, const SkDOM::Node* node) | 18 void SkView::Artist::inflate(const SkDOM& dom, const SkDOM::Node* node) |
19 { | 19 { |
20 SkASSERT(&dom && node); | 20 SkASSERT(node); |
21 this->onInflate(dom, node); | 21 this->onInflate(dom, node); |
22 } | 22 } |
23 | 23 |
24 void SkView::Artist::onInflate(const SkDOM&, const SkDOM::Node*) | 24 void SkView::Artist::onInflate(const SkDOM&, const SkDOM::Node*) |
25 { | 25 { |
26 // subclass should override this as needed | 26 // subclass should override this as needed |
27 } | 27 } |
28 | 28 |
29 SkView::Artist* SkView::getArtist() const | 29 SkView::Artist* SkView::getArtist() const |
30 { | 30 { |
(...skipping 25 matching lines...) Expand all Loading... |
56 | 56 |
57 void SkView::Layout::layoutChildren(SkView* parent) | 57 void SkView::Layout::layoutChildren(SkView* parent) |
58 { | 58 { |
59 SkASSERT(parent); | 59 SkASSERT(parent); |
60 if (parent->width() > 0 && parent->height() > 0) | 60 if (parent->width() > 0 && parent->height() > 0) |
61 this->onLayoutChildren(parent); | 61 this->onLayoutChildren(parent); |
62 } | 62 } |
63 | 63 |
64 void SkView::Layout::inflate(const SkDOM& dom, const SkDOM::Node* node) | 64 void SkView::Layout::inflate(const SkDOM& dom, const SkDOM::Node* node) |
65 { | 65 { |
66 SkASSERT(&dom && node); | 66 SkASSERT(node); |
67 this->onInflate(dom, node); | 67 this->onInflate(dom, node); |
68 } | 68 } |
69 | 69 |
70 void SkView::Layout::onInflate(const SkDOM&, const SkDOM::Node*) | 70 void SkView::Layout::onInflate(const SkDOM&, const SkDOM::Node*) |
71 { | 71 { |
72 // subclass should override this as needed | 72 // subclass should override this as needed |
73 } | 73 } |
74 | 74 |
75 SkView::Layout* SkView::getLayout() const | 75 SkView::Layout* SkView::getLayout() const |
76 { | 76 { |
(...skipping 17 matching lines...) Expand all Loading... |
94 SkRefCnt_SafeAssign(rec->fLayout, obj); | 94 SkRefCnt_SafeAssign(rec->fLayout, obj); |
95 else | 95 else |
96 this->addTagList(new Layout_SkTagList(obj)); | 96 this->addTagList(new Layout_SkTagList(obj)); |
97 } | 97 } |
98 | 98 |
99 if (invokeLayoutNow) | 99 if (invokeLayoutNow) |
100 this->invokeLayout(); | 100 this->invokeLayout(); |
101 | 101 |
102 return obj; | 102 return obj; |
103 } | 103 } |
OLD | NEW |