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