| 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 * a device that it knows how to draw, and that it knows how to identify if
it is not of the | 341 * a device that it knows how to draw, and that it knows how to identify if
it is not of the |
| 342 * same subclass (since drawDevice is passed a SkBaseDevice*). If the subcl
ass cannot fulfill | 342 * same subclass (since drawDevice is passed a SkBaseDevice*). If the subcl
ass cannot fulfill |
| 343 * that contract (e.g. PDF cannot support some settings on the paint) it sh
ould return NULL, | 343 * that contract (e.g. PDF cannot support some settings on the paint) it sh
ould return NULL, |
| 344 * and the caller may then decide to explicitly create a bitmapdevice, know
ing that later | 344 * and the caller may then decide to explicitly create a bitmapdevice, know
ing that later |
| 345 * it could not call drawDevice with it (but it could call drawSprite or dr
awBitmap). | 345 * it could not call drawDevice with it (but it could call drawSprite or dr
awBitmap). |
| 346 */ | 346 */ |
| 347 virtual SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) { | 347 virtual SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) { |
| 348 return NULL; | 348 return NULL; |
| 349 } | 349 } |
| 350 | 350 |
| 351 /** | |
| 352 * Calls through to drawSprite, processing the imagefilter. | |
| 353 */ | |
| 354 virtual void drawSpriteWithFilter(const SkDraw&, const SkBitmap&, | |
| 355 int x, int y, const SkPaint&); | |
| 356 | |
| 357 // A helper function used by derived classes to log the scale factor of a bi
tmap or image draw. | 351 // A helper function used by derived classes to log the scale factor of a bi
tmap or image draw. |
| 358 static void LogDrawScaleFactor(const SkMatrix&, SkFilterQuality); | 352 static void LogDrawScaleFactor(const SkMatrix&, SkFilterQuality); |
| 359 | 353 |
| 360 private: | 354 private: |
| 361 friend class SkCanvas; | 355 friend class SkCanvas; |
| 362 friend struct DeviceCM; //for setMatrixClip | 356 friend struct DeviceCM; //for setMatrixClip |
| 363 friend class SkDraw; | 357 friend class SkDraw; |
| 364 friend class SkDrawIter; | 358 friend class SkDrawIter; |
| 365 friend class SkDeviceFilteredPaint; | 359 friend class SkDeviceFilteredPaint; |
| 366 friend class SkNoPixelsBitmapDevice; | 360 friend class SkNoPixelsBitmapDevice; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 394 SkSurfaceProps fSurfaceProps; | 388 SkSurfaceProps fSurfaceProps; |
| 395 | 389 |
| 396 #ifdef SK_DEBUG | 390 #ifdef SK_DEBUG |
| 397 bool fAttachedToCanvas; | 391 bool fAttachedToCanvas; |
| 398 #endif | 392 #endif |
| 399 | 393 |
| 400 typedef SkRefCnt INHERITED; | 394 typedef SkRefCnt INHERITED; |
| 401 }; | 395 }; |
| 402 | 396 |
| 403 #endif | 397 #endif |
| OLD | NEW |