| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 const SkPoint verts[], const SkPoint texs[], | 239 const SkPoint verts[], const SkPoint texs[], |
| 240 const SkColor colors[], SkXfermode* xmode, | 240 const SkColor colors[], SkXfermode* xmode, |
| 241 const uint16_t indices[], int indexCount, | 241 const uint16_t indices[], int indexCount, |
| 242 const SkPaint& paint) = 0; | 242 const SkPaint& paint) = 0; |
| 243 // default implementation unrolls the blob runs. | 243 // default implementation unrolls the blob runs. |
| 244 virtual void drawTextBlob(const SkDraw&, const SkTextBlob*, SkScalar x, SkSc
alar y, | 244 virtual void drawTextBlob(const SkDraw&, const SkTextBlob*, SkScalar x, SkSc
alar y, |
| 245 const SkPaint& paint, SkDrawFilter* drawFilter); | 245 const SkPaint& paint, SkDrawFilter* drawFilter); |
| 246 // default implementation calls drawVertices | 246 // default implementation calls drawVertices |
| 247 virtual void drawPatch(const SkDraw&, const SkPoint cubics[12], const SkColo
r colors[4], | 247 virtual void drawPatch(const SkDraw&, const SkPoint cubics[12], const SkColo
r colors[4], |
| 248 const SkPoint texCoords[4], SkXfermode* xmode, const
SkPaint& paint); | 248 const SkPoint texCoords[4], SkXfermode* xmode, const
SkPaint& paint); |
| 249 |
| 250 // default implementation calls drawPath |
| 251 virtual void drawAtlas(const SkDraw&, const SkImage* atlas, const SkRSXform[
], const SkRect[], |
| 252 const SkColor[], int count, const SkPaint&); |
| 253 |
| 249 /** The SkDevice passed will be an SkDevice which was returned by a call to | 254 /** The SkDevice passed will be an SkDevice which was returned by a call to |
| 250 onCreateDevice on this device with kNeverTile_TileExpectation. | 255 onCreateDevice on this device with kNeverTile_TileExpectation. |
| 251 */ | 256 */ |
| 252 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, | 257 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, |
| 253 const SkPaint&) = 0; | 258 const SkPaint&) = 0; |
| 254 | 259 |
| 255 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, con
st SkPath&, | 260 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, con
st SkPath&, |
| 256 const SkMatrix*, const SkPaint&); | 261 const SkMatrix*, const SkPaint&); |
| 257 | 262 |
| 258 bool readPixels(const SkImageInfo&, void* dst, size_t rowBytes, int x, int y
); | 263 bool readPixels(const SkImageInfo&, void* dst, size_t rowBytes, int x, int y
); |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 SkDeviceProperties* fLeakyProperties; // will always exist. | 407 SkDeviceProperties* fLeakyProperties; // will always exist. |
| 403 | 408 |
| 404 #ifdef SK_DEBUG | 409 #ifdef SK_DEBUG |
| 405 bool fAttachedToCanvas; | 410 bool fAttachedToCanvas; |
| 406 #endif | 411 #endif |
| 407 | 412 |
| 408 typedef SkRefCnt INHERITED; | 413 typedef SkRefCnt INHERITED; |
| 409 }; | 414 }; |
| 410 | 415 |
| 411 #endif | 416 #endif |
| OLD | NEW |