| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 * a device that it knows how to draw, and that it knows how to identify if
it is not of the | 369 * a device that it knows how to draw, and that it knows how to identify if
it is not of the |
| 370 * same subclass (since drawDevice is passed a SkBaseDevice*). If the subcl
ass cannot fulfill | 370 * same subclass (since drawDevice is passed a SkBaseDevice*). If the subcl
ass cannot fulfill |
| 371 * that contract (e.g. PDF cannot support some settings on the paint) it sh
ould return NULL, | 371 * that contract (e.g. PDF cannot support some settings on the paint) it sh
ould return NULL, |
| 372 * and the caller may then decide to explicitly create a bitmapdevice, know
ing that later | 372 * and the caller may then decide to explicitly create a bitmapdevice, know
ing that later |
| 373 * it could not call drawDevice with it (but it could call drawSprite or dr
awBitmap). | 373 * it could not call drawDevice with it (but it could call drawSprite or dr
awBitmap). |
| 374 */ | 374 */ |
| 375 virtual SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) { | 375 virtual SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) { |
| 376 return NULL; | 376 return NULL; |
| 377 } | 377 } |
| 378 | 378 |
| 379 // A helper function used by derived classes to log the scale factor of a bi
tmap or image draw. | |
| 380 static void LogDrawScaleFactor(const SkMatrix&, SkFilterQuality); | |
| 381 | |
| 382 private: | 379 private: |
| 383 friend class SkCanvas; | 380 friend class SkCanvas; |
| 384 friend struct DeviceCM; //for setMatrixClip | 381 friend struct DeviceCM; //for setMatrixClip |
| 385 friend class SkDraw; | 382 friend class SkDraw; |
| 386 friend class SkDrawIter; | 383 friend class SkDrawIter; |
| 387 friend class SkDeviceFilteredPaint; | 384 friend class SkDeviceFilteredPaint; |
| 388 friend class SkImageFilter::DeviceProxy; | 385 friend class SkImageFilter::DeviceProxy; |
| 389 friend class SkNoPixelsBitmapDevice; | 386 friend class SkNoPixelsBitmapDevice; |
| 390 friend class SkSurface_Raster; | 387 friend class SkSurface_Raster; |
| 391 | 388 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 416 SkSurfaceProps fSurfaceProps; | 413 SkSurfaceProps fSurfaceProps; |
| 417 | 414 |
| 418 #ifdef SK_DEBUG | 415 #ifdef SK_DEBUG |
| 419 bool fAttachedToCanvas; | 416 bool fAttachedToCanvas; |
| 420 #endif | 417 #endif |
| 421 | 418 |
| 422 typedef SkRefCnt INHERITED; | 419 typedef SkRefCnt INHERITED; |
| 423 }; | 420 }; |
| 424 | 421 |
| 425 #endif | 422 #endif |
| OLD | NEW |