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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 } else { | 969 } else { |
970 target->setVertexSourceToArray(positions, vertexCount); | 970 target->setVertexSourceToArray(positions, vertexCount); |
971 } | 971 } |
972 | 972 |
973 // we don't currently apply offscreen AA to this path. Need improved | 973 // we don't currently apply offscreen AA to this path. Need improved |
974 // management of GrDrawTarget's geometry to avoid copying points per-tile. | 974 // management of GrDrawTarget's geometry to avoid copying points per-tile. |
975 | 975 |
976 if (NULL != indices) { | 976 if (NULL != indices) { |
977 target->setIndexSourceToArray(indices, indexCount); | 977 target->setIndexSourceToArray(indices, indexCount); |
978 target->drawIndexed(primitiveType, 0, 0, vertexCount, indexCount); | 978 target->drawIndexed(primitiveType, 0, 0, vertexCount, indexCount); |
| 979 target->resetIndexSource(); |
979 } else { | 980 } else { |
980 target->drawNonIndexed(primitiveType, 0, vertexCount); | 981 target->drawNonIndexed(primitiveType, 0, vertexCount); |
981 } | 982 } |
982 } | 983 } |
983 | 984 |
984 /////////////////////////////////////////////////////////////////////////////// | 985 /////////////////////////////////////////////////////////////////////////////// |
985 | 986 |
986 void GrContext::drawOval(const GrPaint& paint, | 987 void GrContext::drawOval(const GrPaint& paint, |
987 const GrRect& oval, | 988 const GrRect& oval, |
988 const SkStrokeRec& stroke) { | 989 const SkStrokeRec& stroke) { |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1798 return srcTexture; | 1799 return srcTexture; |
1799 } | 1800 } |
1800 } | 1801 } |
1801 | 1802 |
1802 /////////////////////////////////////////////////////////////////////////////// | 1803 /////////////////////////////////////////////////////////////////////////////// |
1803 #if GR_CACHE_STATS | 1804 #if GR_CACHE_STATS |
1804 void GrContext::printCacheStats() const { | 1805 void GrContext::printCacheStats() const { |
1805 fTextureCache->printStats(); | 1806 fTextureCache->printStats(); |
1806 } | 1807 } |
1807 #endif | 1808 #endif |
OLD | NEW |