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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int x, i
nt y); | 400 virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int x, i
nt y); |
401 | 401 |
402 /** | 402 /** |
403 * Leaky properties are those which the device should be applying but it is
n't. | 403 * Leaky properties are those which the device should be applying but it is
n't. |
404 * These properties will be applied by the draw, when and as it can. | 404 * These properties will be applied by the draw, when and as it can. |
405 * If the device does handle a property, that property should be set to the
identity value | 405 * If the device does handle a property, that property should be set to the
identity value |
406 * for that property, effectively making it non-leaky. | 406 * for that property, effectively making it non-leaky. |
407 */ | 407 */ |
408 SkDeviceProperties fLeakyProperties; | 408 SkDeviceProperties fLeakyProperties; |
409 | 409 |
| 410 /** |
| 411 * PRIVATE / EXPERIMENTAL -- do not call |
| 412 * Construct an acceleration object and attach it to 'picture' |
| 413 */ |
| 414 virtual void EXPERIMENTAL_optimize(SkPicture* picture); |
| 415 |
| 416 /** |
| 417 * PRIVATE / EXPERIMENTAL -- do not call |
| 418 * This entry point gives the backend an opportunity to take over the rende
ring |
| 419 * of 'picture'. If optimization data is available (due to an earlier |
| 420 * 'optimize' call) this entry point should make use of it and return true |
| 421 * if all rendering has been done. If false is returned, SkCanvas will |
| 422 * perform its own rendering pass. It is acceptable for the backend |
| 423 * to perform some device-specific warm up tasks and then let SkCanvas |
| 424 * perform the main rendering loop (by return false from here). |
| 425 */ |
| 426 virtual bool EXPERIMENTAL_drawPicture(const SkPicture& picture); |
| 427 |
410 private: | 428 private: |
411 friend class SkCanvas; | 429 friend class SkCanvas; |
412 friend struct DeviceCM; //for setMatrixClip | 430 friend struct DeviceCM; //for setMatrixClip |
413 friend class SkDraw; | 431 friend class SkDraw; |
414 friend class SkDrawIter; | 432 friend class SkDrawIter; |
415 friend class SkDeviceFilteredPaint; | 433 friend class SkDeviceFilteredPaint; |
416 friend class SkDeviceImageFilterProxy; | 434 friend class SkDeviceImageFilterProxy; |
417 friend class DeferredDevice; // for newSurface | 435 friend class DeferredDevice; // for newSurface |
418 | 436 |
419 friend class SkSurface_Raster; | 437 friend class SkSurface_Raster; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 SkMetaData* fMetaData; | 471 SkMetaData* fMetaData; |
454 | 472 |
455 #ifdef SK_DEBUG | 473 #ifdef SK_DEBUG |
456 bool fAttachedToCanvas; | 474 bool fAttachedToCanvas; |
457 #endif | 475 #endif |
458 | 476 |
459 typedef SkRefCnt INHERITED; | 477 typedef SkRefCnt INHERITED; |
460 }; | 478 }; |
461 | 479 |
462 #endif | 480 #endif |
OLD | NEW |