| 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()) { |
| 654 return true; |
| 655 } |
| 656 |
| 653 if (strokeWidth < 0) { | 657 if (strokeWidth < 0) { |
| 654 return !is_irect(*devBoundRect); | 658 return !is_irect(*devBoundRect); |
| 655 } | 659 } |
| 656 | 660 |
| 657 return true; | 661 return true; |
| 658 } | 662 } |
| 659 | 663 |
| 660 static inline bool rect_contains_inclusive(const SkRect& rect, const SkPoint& po
int) { | 664 static inline bool rect_contains_inclusive(const SkRect& rect, const SkPoint& po
int) { |
| 661 return point.fX >= rect.fLeft && point.fX <= rect.fRight && | 665 return point.fX >= rect.fLeft && point.fX <= rect.fRight && |
| 662 point.fY >= rect.fTop && point.fY <= rect.fBottom; | 666 point.fY >= rect.fTop && point.fY <= rect.fBottom; |
| (...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1709 fResourceCache2->printStats(); | 1713 fResourceCache2->printStats(); |
| 1710 } | 1714 } |
| 1711 #endif | 1715 #endif |
| 1712 | 1716 |
| 1713 #if GR_GPU_STATS | 1717 #if GR_GPU_STATS |
| 1714 const GrContext::GPUStats* GrContext::gpuStats() const { | 1718 const GrContext::GPUStats* GrContext::gpuStats() const { |
| 1715 return fGpu->gpuStats(); | 1719 return fGpu->gpuStats(); |
| 1716 } | 1720 } |
| 1717 #endif | 1721 #endif |
| 1718 | 1722 |
| OLD | NEW |