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 void logDrawScaleFactor(const SkMatrix&, SkFilterQuality) const; | |
bsalomon
2016/02/16 14:52:42
Maybe this should just be a static helper in SkGpu
ericrk
2016/02/16 22:05:33
I'm using this in SkBitmapDevice as well - happy t
bsalomon
2016/02/24 18:24:59
Gotcha.. didn't catch that. Need it be a class mem
ericrk
2016/02/25 00:22:10
made it static, good point.
| |
381 | |
379 private: | 382 private: |
380 friend class SkCanvas; | 383 friend class SkCanvas; |
381 friend struct DeviceCM; //for setMatrixClip | 384 friend struct DeviceCM; //for setMatrixClip |
382 friend class SkDraw; | 385 friend class SkDraw; |
383 friend class SkDrawIter; | 386 friend class SkDrawIter; |
384 friend class SkDeviceFilteredPaint; | 387 friend class SkDeviceFilteredPaint; |
385 friend class SkImageFilter::DeviceProxy; | 388 friend class SkImageFilter::DeviceProxy; |
386 friend class SkNoPixelsBitmapDevice; | 389 friend class SkNoPixelsBitmapDevice; |
387 friend class SkSurface_Raster; | 390 friend class SkSurface_Raster; |
388 | 391 |
(...skipping 24 matching lines...) Expand all Loading... | |
413 SkSurfaceProps fSurfaceProps; | 416 SkSurfaceProps fSurfaceProps; |
414 | 417 |
415 #ifdef SK_DEBUG | 418 #ifdef SK_DEBUG |
416 bool fAttachedToCanvas; | 419 bool fAttachedToCanvas; |
417 #endif | 420 #endif |
418 | 421 |
419 typedef SkRefCnt INHERITED; | 422 typedef SkRefCnt INHERITED; |
420 }; | 423 }; |
421 | 424 |
422 #endif | 425 #endif |
OLD | NEW |