| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 * These properties will be applied by the draw, when and as it can. | 320 * These properties will be applied by the draw, when and as it can. |
| 321 * If the device does handle a property, that property should be set to the
identity value | 321 * If the device does handle a property, that property should be set to the
identity value |
| 322 * for that property, effectively making it non-leaky. | 322 * for that property, effectively making it non-leaky. |
| 323 */ | 323 */ |
| 324 const SkDeviceProperties& getLeakyProperties() const { | 324 const SkDeviceProperties& getLeakyProperties() const { |
| 325 return *fLeakyProperties; | 325 return *fLeakyProperties; |
| 326 } | 326 } |
| 327 | 327 |
| 328 /** | 328 /** |
| 329 * PRIVATE / EXPERIMENTAL -- do not call | 329 * PRIVATE / EXPERIMENTAL -- do not call |
| 330 * Construct an acceleration object and attach it to 'picture' | |
| 331 */ | |
| 332 virtual void EXPERIMENTAL_optimize(const SkPicture* picture); | |
| 333 | |
| 334 /** | |
| 335 * PRIVATE / EXPERIMENTAL -- do not call | |
| 336 * This entry point gives the backend an opportunity to take over the rende
ring | 330 * This entry point gives the backend an opportunity to take over the rende
ring |
| 337 * of 'picture'. If optimization data is available (due to an earlier | 331 * of 'picture'. If optimization data is available (due to an earlier |
| 338 * 'optimize' call) this entry point should make use of it and return true | 332 * 'optimize' call) this entry point should make use of it and return true |
| 339 * if all rendering has been done. If false is returned, SkCanvas will | 333 * if all rendering has been done. If false is returned, SkCanvas will |
| 340 * perform its own rendering pass. It is acceptable for the backend | 334 * perform its own rendering pass. It is acceptable for the backend |
| 341 * to perform some device-specific warm up tasks and then let SkCanvas | 335 * to perform some device-specific warm up tasks and then let SkCanvas |
| 342 * perform the main rendering loop (by return false from here). | 336 * perform the main rendering loop (by return false from here). |
| 343 */ | 337 */ |
| 344 virtual bool EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const SkM
atrix*, | 338 virtual bool EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const SkM
atrix*, |
| 345 const SkPaint*); | 339 const SkPaint*); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 SkDeviceProperties* fLeakyProperties; // will always exist. | 381 SkDeviceProperties* fLeakyProperties; // will always exist. |
| 388 | 382 |
| 389 #ifdef SK_DEBUG | 383 #ifdef SK_DEBUG |
| 390 bool fAttachedToCanvas; | 384 bool fAttachedToCanvas; |
| 391 #endif | 385 #endif |
| 392 | 386 |
| 393 typedef SkRefCnt INHERITED; | 387 typedef SkRefCnt INHERITED; |
| 394 }; | 388 }; |
| 395 | 389 |
| 396 #endif | 390 #endif |
| OLD | NEW |