| 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 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1148 | 1148 |
| 1149 GrPathRendererChain::DrawType type = | 1149 GrPathRendererChain::DrawType type = |
| 1150 useCoverageAA ? GrPathRendererChain::kColorAntiAlias_DrawType : | 1150 useCoverageAA ? GrPathRendererChain::kColorAntiAlias_DrawType : |
| 1151 GrPathRendererChain::kColor_DrawType; | 1151 GrPathRendererChain::kColor_DrawType; |
| 1152 | 1152 |
| 1153 const SkPath* pathPtr = &path; | 1153 const SkPath* pathPtr = &path; |
| 1154 SkTLazy<SkPath> tmpPath; | 1154 SkTLazy<SkPath> tmpPath; |
| 1155 SkTCopyOnFirstWrite<SkStrokeRec> stroke(origStroke); | 1155 SkTCopyOnFirstWrite<SkStrokeRec> stroke(origStroke); |
| 1156 | 1156 |
| 1157 // Try a 1st time without stroking the path and without allowing the SW rend
erer | 1157 // Try a 1st time without stroking the path and without allowing the SW rend
erer |
| 1158 GrPathRenderer::AutoClearPath acp(this->getPathRenderer(*pathPtr, *stroke, | 1158 GrPathRenderer::AutoClearPath acp(this->getPathRenderer(*pathPtr, *stroke, |
| 1159 target, false, type, | 1159 target, false, type, |
| 1160 pathPtr->getFillType())); | 1160 pathPtr->getFillType())); |
| 1161 | 1161 |
| 1162 if (NULL == acp.renderer()) { | 1162 if (NULL == acp.renderer()) { |
| 1163 if (!GrPathRenderer::IsStrokeHairlineOrEquivalent(*stroke, this->getMatr
ix(), NULL)) { | 1163 if (!GrPathRenderer::IsStrokeHairlineOrEquivalent(*stroke, this->getMatr
ix(), NULL)) { |
| 1164 // It didn't work the 1st time, so try again with the stroked path | 1164 // It didn't work the 1st time, so try again with the stroked path |
| 1165 if (stroke->applyToPath(tmpPath.init(), *pathPtr)) { | 1165 if (stroke->applyToPath(tmpPath.init(), *pathPtr)) { |
| 1166 pathPtr = tmpPath.get(); | 1166 pathPtr = tmpPath.get(); |
| 1167 stroke.writable()->setFillStyle(); | 1167 stroke.writable()->setFillStyle(); |
| 1168 if (pathPtr->isEmpty()) { | 1168 if (pathPtr->isEmpty()) { |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1795 } | 1795 } |
| 1796 return path; | 1796 return path; |
| 1797 } | 1797 } |
| 1798 | 1798 |
| 1799 /////////////////////////////////////////////////////////////////////////////// | 1799 /////////////////////////////////////////////////////////////////////////////// |
| 1800 #if GR_CACHE_STATS | 1800 #if GR_CACHE_STATS |
| 1801 void GrContext::printCacheStats() const { | 1801 void GrContext::printCacheStats() const { |
| 1802 fTextureCache->printStats(); | 1802 fTextureCache->printStats(); |
| 1803 } | 1803 } |
| 1804 #endif | 1804 #endif |
| OLD | NEW |