| 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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 strokeSize.set(width, width); | 800 strokeSize.set(width, width); |
| 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 | |
| 811 fAARectRenderer->shaderFillAARect(this->getGpu(), target, | |
| 812 rect, combinedMatrix, devRect, | |
| 813 useVertexCoverage); | |
| 814 #else | |
| 815 fAARectRenderer->fillAARect(this->getGpu(), target, | 810 fAARectRenderer->fillAARect(this->getGpu(), target, |
| 816 devRect, useVertexCoverage); | 811 rect, combinedMatrix, devRect, |
| 817 #endif | 812 useVertexCoverage); |
| 818 } | 813 } |
| 819 return; | 814 return; |
| 820 } | 815 } |
| 821 | 816 |
| 822 if (width >= 0) { | 817 if (width >= 0) { |
| 823 // TODO: consider making static vertex buffers for these cases. | 818 // TODO: consider making static vertex buffers for these cases. |
| 824 // Hairline could be done by just adding closing vertex to | 819 // Hairline could be done by just adding closing vertex to |
| 825 // unitSquareVertexBuffer() | 820 // unitSquareVertexBuffer() |
| 826 | 821 |
| 827 static const int worstCaseVertCount = 10; | 822 static const int worstCaseVertCount = 10; |
| (...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1807 return srcTexture; | 1802 return srcTexture; |
| 1808 } | 1803 } |
| 1809 } | 1804 } |
| 1810 | 1805 |
| 1811 /////////////////////////////////////////////////////////////////////////////// | 1806 /////////////////////////////////////////////////////////////////////////////// |
| 1812 #if GR_CACHE_STATS | 1807 #if GR_CACHE_STATS |
| 1813 void GrContext::printCacheStats() const { | 1808 void GrContext::printCacheStats() const { |
| 1814 fTextureCache->printStats(); | 1809 fTextureCache->printStats(); |
| 1815 } | 1810 } |
| 1816 #endif | 1811 #endif |
| OLD | NEW |