OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
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 | 8 |
9 | 9 |
10 #include "SkDisplayEvent.h" | 10 #include "SkDisplayEvent.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 if (maker.fDumpEvents) { | 123 if (maker.fDumpEvents) { |
124 SkDebugf("enable: "); | 124 SkDebugf("enable: "); |
125 dumpEvent(&maker); | 125 dumpEvent(&maker); |
126 } | 126 } |
127 #endif | 127 #endif |
128 SkDisplayList& displayList = maker.fDisplayList; | 128 SkDisplayList& displayList = maker.fDisplayList; |
129 for (int index = 0; index < fChildren.count(); index++) { | 129 for (int index = 0; index < fChildren.count(); index++) { |
130 SkDisplayable* displayable = fChildren[index]; | 130 SkDisplayable* displayable = fChildren[index]; |
131 if (displayable->isGroup()) { | 131 if (displayable->isGroup()) { |
132 SkTDDrawableArray* parentList = displayList.getDrawList(); | 132 SkTDDrawableArray* parentList = displayList.getDrawList(); |
133 *parentList->append() = (SkDrawable*) displayable; // make it finda
ble before children are enabled | 133 *parentList->append() = (SkADrawable*) displayable; // make it find
able before children are enabled |
134 } | 134 } |
135 if (displayable->enable(maker)) | 135 if (displayable->enable(maker)) |
136 continue; | 136 continue; |
137 if (maker.hasError()) | 137 if (maker.hasError()) |
138 return true; | 138 return true; |
139 if (displayable->isDrawable() == false) | 139 if (displayable->isDrawable() == false) |
140 return true; // error | 140 return true; // error |
141 SkDrawable* drawable = (SkDrawable*) displayable; | 141 SkADrawable* drawable = (SkADrawable*) displayable; |
142 SkTDDrawableArray* parentList = displayList.getDrawList(); | 142 SkTDDrawableArray* parentList = displayList.getDrawList(); |
143 *parentList->append() = drawable; | 143 *parentList->append() = drawable; |
144 } | 144 } |
145 return false; | 145 return false; |
146 } | 146 } |
147 | 147 |
148 bool SkDisplayEvent::getProperty(int index, SkScriptValue* value) const { | 148 bool SkDisplayEvent::getProperty(int index, SkScriptValue* value) const { |
149 switch (index) { | 149 switch (index) { |
150 case SK_PROPERTY(key): | 150 case SK_PROPERTY(key): |
151 case SK_PROPERTY(keys): { | 151 case SK_PROPERTY(keys): { |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 fMax = code; | 243 fMax = code; |
244 SkASSERT(count == 1 || index == SK_PROPERTY(keys)); | 244 SkASSERT(count == 1 || index == SK_PROPERTY(keys)); |
245 if (--count > 0) { | 245 if (--count > 0) { |
246 SkASSERT(*chars == '-'); | 246 SkASSERT(*chars == '-'); |
247 chars++; | 247 chars++; |
248 fMax = (SkKey) SkUTF8_NextUnichar(&chars); | 248 fMax = (SkKey) SkUTF8_NextUnichar(&chars); |
249 SkASSERT(fMax >= code); | 249 SkASSERT(fMax >= code); |
250 } | 250 } |
251 return true; | 251 return true; |
252 } | 252 } |
OLD | NEW |