OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 The Android Open Source Project | 3 * Copyright 2010 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkDevice_DEFINED | 10 #ifndef SkDevice_DEFINED |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 * If the device does not recognize or support this filter, | 377 * If the device does not recognize or support this filter, |
378 * it just returns false and leaves result and offset unchanged. | 378 * it just returns false and leaves result and offset unchanged. |
379 */ | 379 */ |
380 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkMatr
ix&, | 380 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkMatr
ix&, |
381 SkBitmap* result, SkIPoint* offset) = 0; | 381 SkBitmap* result, SkIPoint* offset) = 0; |
382 | 382 |
383 // This is equal kBGRA_Premul_Config8888 or kRGBA_Premul_Config8888 if | 383 // This is equal kBGRA_Premul_Config8888 or kRGBA_Premul_Config8888 if |
384 // either is identical to kNative_Premul_Config8888. Otherwise, -1. | 384 // either is identical to kNative_Premul_Config8888. Otherwise, -1. |
385 static const SkCanvas::Config8888 kPMColorAlias; | 385 static const SkCanvas::Config8888 kPMColorAlias; |
386 | 386 |
| 387 virtual void internalPrivate_PreLoad(const SkBitmap& bitmap, const SkIRect&
rect); |
| 388 |
387 protected: | 389 protected: |
388 // default impl returns NULL | 390 // default impl returns NULL |
389 virtual SkSurface* newSurface(const SkImageInfo&); | 391 virtual SkSurface* newSurface(const SkImageInfo&); |
390 | 392 |
391 // default impl returns NULL | 393 // default impl returns NULL |
392 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes); | 394 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes); |
393 | 395 |
394 /** | 396 /** |
395 * The caller is responsible for "pre-clipping" the src. The impl can assum
e that the src | 397 * The caller is responsible for "pre-clipping" the src. The impl can assum
e that the src |
396 * image at the specified x,y offset will fit within the device's bounds. | 398 * image at the specified x,y offset will fit within the device's bounds. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 SkMetaData* fMetaData; | 455 SkMetaData* fMetaData; |
454 | 456 |
455 #ifdef SK_DEBUG | 457 #ifdef SK_DEBUG |
456 bool fAttachedToCanvas; | 458 bool fAttachedToCanvas; |
457 #endif | 459 #endif |
458 | 460 |
459 typedef SkRefCnt INHERITED; | 461 typedef SkRefCnt INHERITED; |
460 }; | 462 }; |
461 | 463 |
462 #endif | 464 #endif |
OLD | NEW |