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