OLD | NEW |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
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 #include "GrContext.h" | 9 #include "GrContext.h" |
10 | 10 |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
643 | 643 |
644 #if defined(SHADER_AA_FILL_RECT) || !defined(IGNORE_ROT_AA_RECT_OPT) | 644 #if defined(SHADER_AA_FILL_RECT) || !defined(IGNORE_ROT_AA_RECT_OPT) |
645 } else { | 645 } else { |
646 if (!combinedMatrix.preservesRightAngles()) { | 646 if (!combinedMatrix.preservesRightAngles()) { |
647 return false; | 647 return false; |
648 } | 648 } |
649 } | 649 } |
650 #endif | 650 #endif |
651 | 651 |
652 combinedMatrix.mapRect(devBoundRect, rect); | 652 combinedMatrix.mapRect(devBoundRect, rect); |
653 if (!combinedMatrix.rectStaysRect()) | |
bsalomon
2014/12/02 21:36:56
style nit: we always use { }.
Otherwise, lgtm
| |
654 return true; | |
655 | |
653 if (strokeWidth < 0) { | 656 if (strokeWidth < 0) { |
654 return !is_irect(*devBoundRect); | 657 return !is_irect(*devBoundRect); |
655 } | 658 } |
656 | 659 |
657 return true; | 660 return true; |
658 } | 661 } |
659 | 662 |
660 static inline bool rect_contains_inclusive(const SkRect& rect, const SkPoint& po int) { | 663 static inline bool rect_contains_inclusive(const SkRect& rect, const SkPoint& po int) { |
661 return point.fX >= rect.fLeft && point.fX <= rect.fRight && | 664 return point.fX >= rect.fLeft && point.fX <= rect.fRight && |
662 point.fY >= rect.fTop && point.fY <= rect.fBottom; | 665 point.fY >= rect.fTop && point.fY <= rect.fBottom; |
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1709 fResourceCache2->printStats(); | 1712 fResourceCache2->printStats(); |
1710 } | 1713 } |
1711 #endif | 1714 #endif |
1712 | 1715 |
1713 #if GR_GPU_STATS | 1716 #if GR_GPU_STATS |
1714 const GrContext::GPUStats* GrContext::gpuStats() const { | 1717 const GrContext::GPUStats* GrContext::gpuStats() const { |
1715 return fGpu->gpuStats(); | 1718 return fGpu->gpuStats(); |
1716 } | 1719 } |
1717 #endif | 1720 #endif |
1718 | 1721 |
OLD | NEW |