Chromium Code Reviews| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 326 * 'optimize' call) this entry point should make use of it and return true | 326 * 'optimize' call) this entry point should make use of it and return true |
| 327 * if all rendering has been done. If false is returned, SkCanvas will | 327 * if all rendering has been done. If false is returned, SkCanvas will |
| 328 * perform its own rendering pass. It is acceptable for the backend | 328 * perform its own rendering pass. It is acceptable for the backend |
| 329 * to perform some device-specific warm up tasks and then let SkCanvas | 329 * to perform some device-specific warm up tasks and then let SkCanvas |
| 330 * perform the main rendering loop (by return false from here). | 330 * perform the main rendering loop (by return false from here). |
| 331 */ | 331 */ |
| 332 virtual bool EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const SkM atrix*, | 332 virtual bool EXPERIMENTAL_drawPicture(SkCanvas*, const SkPicture*, const SkM atrix*, |
| 333 const SkPaint*); | 333 const SkPaint*); |
| 334 | 334 |
| 335 struct CreateInfo { | 335 struct CreateInfo { |
| 336 static SkPixelGeometry AdjustGeometry(const SkImageInfo&, TileUsage, SkP ixelGeometry); | 336 static SkPixelGeometry AdjustGeometry(const SkImageInfo&, TileUsage, SkP ixelGeometry, |
| 337 bool allowLCDText); | |
|
bungeman-skia
2015/12/10 20:35:10
Rename to preserveLCDText
reed1
2015/12/10 21:32:22
Done.
| |
| 337 | 338 |
| 338 // The constructor may change the pixel geometry based on other paramete rs. | 339 // The constructor may change the pixel geometry based on other paramete rs. |
| 339 CreateInfo(const SkImageInfo& info, | 340 CreateInfo(const SkImageInfo& info, |
| 340 TileUsage tileUsage, | 341 TileUsage tileUsage, |
| 341 SkPixelGeometry geo, | 342 SkPixelGeometry geo) |
| 342 bool forImageFilter = false) | |
| 343 : fInfo(info) | 343 : fInfo(info) |
| 344 , fTileUsage(tileUsage) | 344 , fTileUsage(tileUsage) |
| 345 , fPixelGeometry(AdjustGeometry(info, tileUsage, geo)) | 345 , fPixelGeometry(AdjustGeometry(info, tileUsage, geo, false)) |
| 346 , fForImageFilter(false) {} | |
| 347 | |
| 348 CreateInfo(const SkImageInfo& info, | |
| 349 TileUsage tileUsage, | |
| 350 SkPixelGeometry geo, | |
| 351 bool allowLCDText, | |
|
bungeman-skia
2015/12/10 20:35:10
preserveLCDText
reed1
2015/12/10 21:32:22
Done.
| |
| 352 bool forImageFilter) | |
| 353 : fInfo(info) | |
| 354 , fTileUsage(tileUsage) | |
| 355 , fPixelGeometry(AdjustGeometry(info, tileUsage, geo, allowLCDText)) | |
| 346 , fForImageFilter(forImageFilter) {} | 356 , fForImageFilter(forImageFilter) {} |
| 347 | 357 |
| 348 const SkImageInfo fInfo; | 358 const SkImageInfo fInfo; |
| 349 const TileUsage fTileUsage; | 359 const TileUsage fTileUsage; |
| 350 const SkPixelGeometry fPixelGeometry; | 360 const SkPixelGeometry fPixelGeometry; |
| 351 const bool fForImageFilter; | 361 const bool fForImageFilter; |
| 352 }; | 362 }; |
| 353 | 363 |
| 354 /** | 364 /** |
| 355 * Create a new device based on CreateInfo. If the paint is not null, then it represents a | 365 * Create a new device based on CreateInfo. If the paint is not null, then it represents a |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 403 SkSurfaceProps fSurfaceProps; | 413 SkSurfaceProps fSurfaceProps; |
| 404 | 414 |
| 405 #ifdef SK_DEBUG | 415 #ifdef SK_DEBUG |
| 406 bool fAttachedToCanvas; | 416 bool fAttachedToCanvas; |
| 407 #endif | 417 #endif |
| 408 | 418 |
| 409 typedef SkRefCnt INHERITED; | 419 typedef SkRefCnt INHERITED; |
| 410 }; | 420 }; |
| 411 | 421 |
| 412 #endif | 422 #endif |
| OLD | NEW |