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 | 9 |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
801 combinedMatrix.mapVectors(&strokeSize, 1); | 801 combinedMatrix.mapVectors(&strokeSize, 1); |
802 strokeSize.setAbs(strokeSize); | 802 strokeSize.setAbs(strokeSize); |
803 } else { | 803 } else { |
804 strokeSize.set(SK_Scalar1, SK_Scalar1); | 804 strokeSize.set(SK_Scalar1, SK_Scalar1); |
805 } | 805 } |
806 fAARectRenderer->strokeAARect(this->getGpu(), target, devRect, | 806 fAARectRenderer->strokeAARect(this->getGpu(), target, devRect, |
807 strokeSize, useVertexCoverage); | 807 strokeSize, useVertexCoverage); |
808 } else { | 808 } else { |
809 // filled AA rect | 809 // filled AA rect |
810 #ifdef SHADER_AA_FILL_RECT | 810 #ifdef SHADER_AA_FILL_RECT |
811 fAARectRenderer->shaderFillAARect(this->getGpu(), target, | 811 if (combinedMatrix.rectStaysRect()) { |
bsalomon
2013/04/29 19:44:50
Seems cleaner to me make axis-aligned vs not an im
robertphillips
2013/05/02 13:56:39
Done. Note that this change will make more sense i
| |
812 rect, combinedMatrix, devRect, | 812 fAARectRenderer->shaderFillAAAARect(this->getGpu(), target, |
813 useVertexCoverage); | 813 combinedMatrix, devRect); |
814 } else { | |
815 fAARectRenderer->shaderFillAARect(this->getGpu(), target, | |
816 rect, combinedMatrix, devRect) ; | |
817 } | |
814 #else | 818 #else |
815 fAARectRenderer->fillAARect(this->getGpu(), target, | 819 fAARectRenderer->fillAARect(this->getGpu(), target, |
816 devRect, useVertexCoverage); | 820 devRect, useVertexCoverage); |
817 #endif | 821 #endif |
818 } | 822 } |
819 return; | 823 return; |
820 } | 824 } |
821 | 825 |
822 if (width >= 0) { | 826 if (width >= 0) { |
823 // TODO: consider making static vertex buffers for these cases. | 827 // TODO: consider making static vertex buffers for these cases. |
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1804 return srcTexture; | 1808 return srcTexture; |
1805 } | 1809 } |
1806 } | 1810 } |
1807 | 1811 |
1808 /////////////////////////////////////////////////////////////////////////////// | 1812 /////////////////////////////////////////////////////////////////////////////// |
1809 #if GR_CACHE_STATS | 1813 #if GR_CACHE_STATS |
1810 void GrContext::printCacheStats() const { | 1814 void GrContext::printCacheStats() const { |
1811 fTextureCache->printStats(); | 1815 fTextureCache->printStats(); |
1812 } | 1816 } |
1813 #endif | 1817 #endif |
OLD | NEW |