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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkMatr
ix&, | 362 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, const SkMatr
ix&, |
363 SkBitmap* result, SkIPoint* offset) = 0; | 363 SkBitmap* result, SkIPoint* offset) = 0; |
364 | 364 |
365 // This is equal kBGRA_Premul_Config8888 or kRGBA_Premul_Config8888 if | 365 // This is equal kBGRA_Premul_Config8888 or kRGBA_Premul_Config8888 if |
366 // either is identical to kNative_Premul_Config8888. Otherwise, -1. | 366 // either is identical to kNative_Premul_Config8888. Otherwise, -1. |
367 static const SkCanvas::Config8888 kPMColorAlias; | 367 static const SkCanvas::Config8888 kPMColorAlias; |
368 | 368 |
369 protected: | 369 protected: |
370 // default impl returns NULL | 370 // default impl returns NULL |
371 virtual SkSurface* newSurface(const SkImageInfo&); | 371 virtual SkSurface* newSurface(const SkImageInfo&); |
372 | 372 |
| 373 // default impl returns NULL |
| 374 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes); |
| 375 |
373 /** | 376 /** |
374 * Leaky properties are those which the device should be applying but it is
n't. | 377 * Leaky properties are those which the device should be applying but it is
n't. |
375 * These properties will be applied by the draw, when and as it can. | 378 * These properties will be applied by the draw, when and as it can. |
376 * If the device does handle a property, that property should be set to the
identity value | 379 * If the device does handle a property, that property should be set to the
identity value |
377 * for that property, effectively making it non-leaky. | 380 * for that property, effectively making it non-leaky. |
378 */ | 381 */ |
379 SkDeviceProperties fLeakyProperties; | 382 SkDeviceProperties fLeakyProperties; |
380 | 383 |
381 private: | 384 private: |
382 friend class SkCanvas; | 385 friend class SkCanvas; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 SkMetaData* fMetaData; | 421 SkMetaData* fMetaData; |
419 | 422 |
420 #ifdef SK_DEBUG | 423 #ifdef SK_DEBUG |
421 bool fAttachedToCanvas; | 424 bool fAttachedToCanvas; |
422 #endif | 425 #endif |
423 | 426 |
424 typedef SkRefCnt INHERITED; | 427 typedef SkRefCnt INHERITED; |
425 }; | 428 }; |
426 | 429 |
427 #endif | 430 #endif |
OLD | NEW |