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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 * Related (but not required) to canHandleImageFilter, this method returns | 356 * Related (but not required) to canHandleImageFilter, this method returns |
357 * true if the device could apply the filter to the src bitmap and return | 357 * true if the device could apply the filter to the src bitmap and return |
358 * the result (and updates offset as needed). | 358 * the result (and updates offset as needed). |
359 * If the device does not recognize or support this filter, | 359 * If the device does not recognize or support this filter, |
360 * it just returns false and leaves result and offset unchanged. | 360 * it just returns false and leaves result and offset unchanged. |
361 */ | 361 */ |
362 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, | 362 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, |
363 const SkImageFilter::Context& ctx, | 363 const SkImageFilter::Context& ctx, |
364 SkBitmap* result, SkIPoint* offset) = 0; | 364 SkBitmap* result, SkIPoint* offset) = 0; |
365 | 365 |
366 #ifdef SK_SUPPORT_LEGACY_CONFIG8888 | |
367 // This is equal kBGRA_Premul_Config8888 or kRGBA_Premul_Config8888 if | 366 // This is equal kBGRA_Premul_Config8888 or kRGBA_Premul_Config8888 if |
368 // either is identical to kNative_Premul_Config8888. Otherwise, -1. | 367 // either is identical to kNative_Premul_Config8888. Otherwise, -1. |
369 static const SkCanvas::Config8888 kPMColorAlias; | 368 static const SkCanvas::Config8888 kPMColorAlias; |
370 #endif | |
371 | 369 |
372 protected: | 370 protected: |
373 // default impl returns NULL | 371 // default impl returns NULL |
374 virtual SkSurface* newSurface(const SkImageInfo&); | 372 virtual SkSurface* newSurface(const SkImageInfo&); |
375 | 373 |
376 // default impl returns NULL | 374 // default impl returns NULL |
377 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes); | 375 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes); |
378 | 376 |
379 /** | 377 /** |
380 * Implements readPixels API. The caller will ensure that: | 378 * Implements readPixels API. The caller will ensure that: |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 SkMetaData* fMetaData; | 478 SkMetaData* fMetaData; |
481 | 479 |
482 #ifdef SK_DEBUG | 480 #ifdef SK_DEBUG |
483 bool fAttachedToCanvas; | 481 bool fAttachedToCanvas; |
484 #endif | 482 #endif |
485 | 483 |
486 typedef SkRefCnt INHERITED; | 484 typedef SkRefCnt INHERITED; |
487 }; | 485 }; |
488 | 486 |
489 #endif | 487 #endif |
OLD | NEW |