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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 }; | 123 }; |
124 | 124 |
125 /** | 125 /** |
126 * Returns the text-related flags, possibly modified based on the state of t
he | 126 * Returns the text-related flags, possibly modified based on the state of t
he |
127 * device (e.g. support for LCD). | 127 * device (e.g. support for LCD). |
128 */ | 128 */ |
129 uint32_t filterTextFlags(const SkPaint&) const; | 129 uint32_t filterTextFlags(const SkPaint&) const; |
130 | 130 |
131 virtual bool onShouldDisableLCD(const SkPaint&) const { return false; } | 131 virtual bool onShouldDisableLCD(const SkPaint&) const { return false; } |
132 | 132 |
133 /** | |
134 * | |
135 * DEPRECATED: This will be removed in a future change. Device subclasses | |
136 * should use the matrix and clip from the SkDraw passed to draw functions. | |
137 * | |
138 * Called with the correct matrix and clip before this device is drawn | |
139 * to using those settings. If your subclass overrides this, be sure to | |
140 * call through to the base class as well. | |
141 * | |
142 * The clipstack is another view of the clip. It records the actual | |
143 * geometry that went into building the region. It is present for devices | |
144 * that want to parse it, but is not required: the region is a complete | |
145 * picture of the current clip. (i.e. if you regionize all of the geometry | |
146 * in the clipstack, you will arrive at an equivalent region to the one | |
147 * passed in). | |
148 */ | |
149 virtual void setMatrixClip(const SkMatrix&, const SkRegion&, | |
150 const SkClipStack&) {}; | |
151 | |
152 /** These are called inside the per-device-layer loop for each draw call. | 133 /** These are called inside the per-device-layer loop for each draw call. |
153 When these are called, we have already applied any saveLayer operations, | 134 When these are called, we have already applied any saveLayer operations, |
154 and are handling any looping from the paint, and any effects from the | 135 and are handling any looping from the paint, and any effects from the |
155 DrawFilter. | 136 DrawFilter. |
156 */ | 137 */ |
157 virtual void drawPaint(const SkDraw&, const SkPaint& paint) = 0; | 138 virtual void drawPaint(const SkDraw&, const SkPaint& paint) = 0; |
158 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, | 139 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun
t, |
159 const SkPoint[], const SkPaint& paint) = 0; | 140 const SkPoint[], const SkPaint& paint) = 0; |
160 virtual void drawRect(const SkDraw&, const SkRect& r, | 141 virtual void drawRect(const SkDraw&, const SkRect& r, |
161 const SkPaint& paint) = 0; | 142 const SkPaint& paint) = 0; |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 const SkSurfaceProps fSurfaceProps; | 365 const SkSurfaceProps fSurfaceProps; |
385 | 366 |
386 #ifdef SK_SUPPORT_LEGACY_ACCESSBITMAP | 367 #ifdef SK_SUPPORT_LEGACY_ACCESSBITMAP |
387 SkBitmap fLegacyBitmap; | 368 SkBitmap fLegacyBitmap; |
388 #endif | 369 #endif |
389 | 370 |
390 typedef SkRefCnt INHERITED; | 371 typedef SkRefCnt INHERITED; |
391 }; | 372 }; |
392 | 373 |
393 #endif | 374 #endif |
OLD | NEW |