| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 * The clipstack is another view of the clip. It records the actual | 154 * The clipstack is another view of the clip. It records the actual |
| 155 * geometry that went into building the region. It is present for devices | 155 * geometry that went into building the region. It is present for devices |
| 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 #ifdef SK_SUPPORT_LEGACY_DEVICE_CLEAR | |
| 165 private: | |
| 166 /** Clears the entire device to the specified color (including alpha). | |
| 167 * Ignores the clip. | |
| 168 * DEPRECATED : will go away when chrome subclasses have been updated | |
| 169 */ | |
| 170 virtual void clear(SkColor color); | |
| 171 public: | |
| 172 #endif | |
| 173 | |
| 174 /** These are called inside the per-device-layer loop for each draw call. | 164 /** These are called inside the per-device-layer loop for each draw call. |
| 175 When these are called, we have already applied any saveLayer operations, | 165 When these are called, we have already applied any saveLayer operations, |
| 176 and are handling any looping from the paint, and any effects from the | 166 and are handling any looping from the paint, and any effects from the |
| 177 DrawFilter. | 167 DrawFilter. |
| 178 */ | 168 */ |
| 179 virtual void drawPaint(const SkDraw&, const SkPaint& paint) = 0; | 169 virtual void drawPaint(const SkDraw&, const SkPaint& paint) = 0; |
| 180 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, | 170 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, |
| 181 const SkPoint[], const SkPaint& paint) = 0; | 171 const SkPoint[], const SkPaint& paint) = 0; |
| 182 virtual void drawRect(const SkDraw&, const SkRect& r, | 172 virtual void drawRect(const SkDraw&, const SkRect& r, |
| 183 const SkPaint& paint) = 0; | 173 const SkPaint& paint) = 0; |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 SkDeviceProperties* fLeakyProperties; // will always exist. | 390 SkDeviceProperties* fLeakyProperties; // will always exist. |
| 401 | 391 |
| 402 #ifdef SK_DEBUG | 392 #ifdef SK_DEBUG |
| 403 bool fAttachedToCanvas; | 393 bool fAttachedToCanvas; |
| 404 #endif | 394 #endif |
| 405 | 395 |
| 406 typedef SkRefCnt INHERITED; | 396 typedef SkRefCnt INHERITED; |
| 407 }; | 397 }; |
| 408 | 398 |
| 409 #endif | 399 #endif |
| OLD | NEW |