OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 The Android Open Source Project | 2 * Copyright 2010 The Android Open Source Project |
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 SkDevice_DEFINED | 8 #ifndef SkDevice_DEFINED |
9 #define SkDevice_DEFINED | 9 #define SkDevice_DEFINED |
10 | 10 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 * that want to parse it, but is not required: the region is a complete | 156 * that want to parse it, but is not required: the region is a complete |
157 * picture of the current clip. (i.e. if you regionize all of the geometry | 157 * picture of the current clip. (i.e. if you regionize all of the geometry |
158 * in the clipstack, you will arrive at an equivalent region to the one | 158 * in the clipstack, you will arrive at an equivalent region to the one |
159 * passed in). | 159 * passed in). |
160 */ | 160 */ |
161 virtual void setMatrixClip(const SkMatrix&, const SkRegion&, | 161 virtual void setMatrixClip(const SkMatrix&, const SkRegion&, |
162 const SkClipStack&) {}; | 162 const SkClipStack&) {}; |
163 | 163 |
164 /** Clears the entire device to the specified color (including alpha). | 164 /** Clears the entire device to the specified color (including alpha). |
165 * Ignores the clip. | 165 * Ignores the clip. |
166 * DEPRECATED : will go away when chrome subclasses have been updated | |
167 */ | 166 */ |
168 virtual void clear(SkColor color); | 167 virtual void clear(SkColor color) = 0; |
169 | 168 |
170 SK_ATTR_DEPRECATED("use clear() instead") | 169 SK_ATTR_DEPRECATED("use clear() instead") |
171 void eraseColor(SkColor eraseColor) { this->clear(eraseColor); } | 170 void eraseColor(SkColor eraseColor) { this->clear(eraseColor); } |
172 | 171 |
173 /** These are called inside the per-device-layer loop for each draw call. | 172 /** These are called inside the per-device-layer loop for each draw call. |
174 When these are called, we have already applied any saveLayer operations, | 173 When these are called, we have already applied any saveLayer operations, |
175 and are handling any looping from the paint, and any effects from the | 174 and are handling any looping from the paint, and any effects from the |
176 DrawFilter. | 175 DrawFilter. |
177 */ | 176 */ |
178 virtual void drawPaint(const SkDraw&, const SkPaint& paint) = 0; | 177 virtual void drawPaint(const SkDraw&, const SkPaint& paint) = 0; |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 SkDeviceProperties* fLeakyProperties; // will always exist. | 398 SkDeviceProperties* fLeakyProperties; // will always exist. |
400 | 399 |
401 #ifdef SK_DEBUG | 400 #ifdef SK_DEBUG |
402 bool fAttachedToCanvas; | 401 bool fAttachedToCanvas; |
403 #endif | 402 #endif |
404 | 403 |
405 typedef SkRefCnt INHERITED; | 404 typedef SkRefCnt INHERITED; |
406 }; | 405 }; |
407 | 406 |
408 #endif | 407 #endif |
OLD | NEW |