OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
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 #include "SkGpuDevice.h" | 8 #include "SkGpuDevice.h" |
9 | 9 |
10 #include "GrBlurUtils.h" | 10 #include "GrBlurUtils.h" |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 bool usePath = doStroke && width > 0 && | 488 bool usePath = doStroke && width > 0 && |
489 (paint.getStrokeJoin() == SkPaint::kRound_Join || | 489 (paint.getStrokeJoin() == SkPaint::kRound_Join || |
490 (paint.getStrokeJoin() == SkPaint::kBevel_Join && rect.isEmp
ty())); | 490 (paint.getStrokeJoin() == SkPaint::kBevel_Join && rect.isEmp
ty())); |
491 // another two reasons we might need to call drawPath... | 491 // another two reasons we might need to call drawPath... |
492 | 492 |
493 if (paint.getMaskFilter()) { | 493 if (paint.getMaskFilter()) { |
494 usePath = true; | 494 usePath = true; |
495 } | 495 } |
496 | 496 |
497 if (!usePath && paint.isAntiAlias() && !draw.fMatrix->rectStaysRect()) { | 497 if (!usePath && paint.isAntiAlias() && !draw.fMatrix->rectStaysRect()) { |
498 #if defined(SHADER_AA_FILL_RECT) || !defined(IGNORE_ROT_AA_RECT_OPT) | 498 #ifdef SHADER_AA_FILL_RECT |
499 if (doStroke) { | 499 if (doStroke) { |
500 #endif | 500 #endif |
501 usePath = true; | 501 usePath = true; |
502 #if defined(SHADER_AA_FILL_RECT) || !defined(IGNORE_ROT_AA_RECT_OPT) | 502 #ifdef SHADER_AA_FILL_RECT |
503 } else { | 503 } else { |
504 usePath = !draw.fMatrix->preservesRightAngles(); | 504 usePath = !draw.fMatrix->preservesRightAngles(); |
505 } | 505 } |
506 #endif | 506 #endif |
507 } | 507 } |
508 // until we can both stroke and fill rectangles | 508 // until we can both stroke and fill rectangles |
509 if (paint.getStyle() == SkPaint::kStrokeAndFill_Style) { | 509 if (paint.getStyle() == SkPaint::kStrokeAndFill_Style) { |
510 usePath = true; | 510 usePath = true; |
511 } | 511 } |
512 | 512 |
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1898 #endif | 1898 #endif |
1899 } | 1899 } |
1900 | 1900 |
1901 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1901 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
1902 // We always return a transient cache, so it is freed after each | 1902 // We always return a transient cache, so it is freed after each |
1903 // filter traversal. | 1903 // filter traversal. |
1904 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); | 1904 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); |
1905 } | 1905 } |
1906 | 1906 |
1907 #endif | 1907 #endif |
OLD | NEW |