| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 */ | 166 */ |
| 167 virtual void clear(SkColor color) = 0; | 167 virtual void clear(SkColor color) = 0; |
| 168 | 168 |
| 169 SK_ATTR_DEPRECATED("use clear() instead") | |
| 170 void eraseColor(SkColor eraseColor) { this->clear(eraseColor); } | |
| 171 | |
| 172 /** These are called inside the per-device-layer loop for each draw call. | 169 /** These are called inside the per-device-layer loop for each draw call. |
| 173 When these are called, we have already applied any saveLayer operations, | 170 When these are called, we have already applied any saveLayer operations, |
| 174 and are handling any looping from the paint, and any effects from the | 171 and are handling any looping from the paint, and any effects from the |
| 175 DrawFilter. | 172 DrawFilter. |
| 176 */ | 173 */ |
| 177 virtual void drawPaint(const SkDraw&, const SkPaint& paint) = 0; | 174 virtual void drawPaint(const SkDraw&, const SkPaint& paint) = 0; |
| 178 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, | 175 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, |
| 179 const SkPoint[], const SkPaint& paint) = 0; | 176 const SkPoint[], const SkPaint& paint) = 0; |
| 180 virtual void drawRect(const SkDraw&, const SkRect& r, | 177 virtual void drawRect(const SkDraw&, const SkRect& r, |
| 181 const SkPaint& paint) = 0; | 178 const SkPaint& paint) = 0; |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 SkDeviceProperties* fLeakyProperties; // will always exist. | 395 SkDeviceProperties* fLeakyProperties; // will always exist. |
| 399 | 396 |
| 400 #ifdef SK_DEBUG | 397 #ifdef SK_DEBUG |
| 401 bool fAttachedToCanvas; | 398 bool fAttachedToCanvas; |
| 402 #endif | 399 #endif |
| 403 | 400 |
| 404 typedef SkRefCnt INHERITED; | 401 typedef SkRefCnt INHERITED; |
| 405 }; | 402 }; |
| 406 | 403 |
| 407 #endif | 404 #endif |
| OLD | NEW |