| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 const SkScalar pos[], SkScalar constY, | 235 const SkScalar pos[], SkScalar constY, |
| 236 int scalarsPerPos, const SkPaint& paint) = 0; | 236 int scalarsPerPos, const SkPaint& paint) = 0; |
| 237 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, | 237 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, |
| 238 const SkPath& path, const SkMatrix* matrix, | 238 const SkPath& path, const SkMatrix* matrix, |
| 239 const SkPaint& paint) = 0; | 239 const SkPaint& paint) = 0; |
| 240 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, | 240 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, |
| 241 const SkPoint verts[], const SkPoint texs[], | 241 const SkPoint verts[], const SkPoint texs[], |
| 242 const SkColor colors[], SkXfermode* xmode, | 242 const SkColor colors[], SkXfermode* xmode, |
| 243 const uint16_t indices[], int indexCount, | 243 const uint16_t indices[], int indexCount, |
| 244 const SkPaint& paint) = 0; | 244 const SkPaint& paint) = 0; |
| 245 // default implementation unrolls the blob runs. |
| 246 virtual void drawTextBlob(const SkDraw&, const SkTextBlob*, SkScalar x, SkSc
alar y, |
| 247 const SkPaint& paint); |
| 245 // default implementation calls drawVertices | 248 // default implementation calls drawVertices |
| 246 virtual void drawPatch(const SkDraw&, const SkPoint cubics[12], const SkColo
r colors[4], | 249 virtual void drawPatch(const SkDraw&, const SkPoint cubics[12], const SkColo
r colors[4], |
| 247 const SkPoint texCoords[4], SkXfermode* xmode, const
SkPaint& paint); | 250 const SkPoint texCoords[4], SkXfermode* xmode, const
SkPaint& paint); |
| 248 /** The SkDevice passed will be an SkDevice which was returned by a call to | 251 /** The SkDevice passed will be an SkDevice which was returned by a call to |
| 249 onCreateDevice on this device with kSaveLayer_Usage. | 252 onCreateDevice on this device with kSaveLayer_Usage. |
| 250 */ | 253 */ |
| 251 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, | 254 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, |
| 252 const SkPaint&) = 0; | 255 const SkPaint&) = 0; |
| 253 | 256 |
| 254 bool readPixels(const SkImageInfo&, void* dst, size_t rowBytes, int x, int y
); | 257 bool readPixels(const SkImageInfo&, void* dst, size_t rowBytes, int x, int y
); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 SkMetaData* fMetaData; | 391 SkMetaData* fMetaData; |
| 389 | 392 |
| 390 #ifdef SK_DEBUG | 393 #ifdef SK_DEBUG |
| 391 bool fAttachedToCanvas; | 394 bool fAttachedToCanvas; |
| 392 #endif | 395 #endif |
| 393 | 396 |
| 394 typedef SkRefCnt INHERITED; | 397 typedef SkRefCnt INHERITED; |
| 395 }; | 398 }; |
| 396 | 399 |
| 397 #endif | 400 #endif |
| OLD | NEW |