| 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 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 SkTLazy<SkPath> tmpPath; | 1444 SkTLazy<SkPath> tmpPath; |
| 1445 SkTCopyOnFirstWrite<SkStrokeRec> stroke(strokeInfo.getStrokeRec()); | 1445 SkTCopyOnFirstWrite<SkStrokeRec> stroke(strokeInfo.getStrokeRec()); |
| 1446 | 1446 |
| 1447 // Try a 1st time without stroking the path and without allowing the SW rend
erer | 1447 // Try a 1st time without stroking the path and without allowing the SW rend
erer |
| 1448 GrPathRenderer* pr = this->getPathRenderer(target, pipelineBuilder, viewMatr
ix, *pathPtr, | 1448 GrPathRenderer* pr = this->getPathRenderer(target, pipelineBuilder, viewMatr
ix, *pathPtr, |
| 1449 *stroke, false, type); | 1449 *stroke, false, type); |
| 1450 | 1450 |
| 1451 if (NULL == pr) { | 1451 if (NULL == pr) { |
| 1452 if (!GrPathRenderer::IsStrokeHairlineOrEquivalent(*stroke, viewMatrix, N
ULL)) { | 1452 if (!GrPathRenderer::IsStrokeHairlineOrEquivalent(*stroke, viewMatrix, N
ULL)) { |
| 1453 // It didn't work the 1st time, so try again with the stroked path | 1453 // It didn't work the 1st time, so try again with the stroked path |
| 1454 stroke.writable()->setResScale(SkScalarAbs(viewMatrix.getMaxScale())
); |
| 1454 if (stroke->applyToPath(tmpPath.init(), *pathPtr)) { | 1455 if (stroke->applyToPath(tmpPath.init(), *pathPtr)) { |
| 1455 pathPtr = tmpPath.get(); | 1456 pathPtr = tmpPath.get(); |
| 1456 stroke.writable()->setFillStyle(); | 1457 stroke.writable()->setFillStyle(); |
| 1457 if (pathPtr->isEmpty()) { | 1458 if (pathPtr->isEmpty()) { |
| 1458 return; | 1459 return; |
| 1459 } | 1460 } |
| 1460 } | 1461 } |
| 1461 } | 1462 } |
| 1462 | 1463 |
| 1463 // This time, allow SW renderer | 1464 // This time, allow SW renderer |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2027 } | 2028 } |
| 2028 } | 2029 } |
| 2029 | 2030 |
| 2030 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { | 2031 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { |
| 2031 fGpu->removeGpuTraceMarker(marker); | 2032 fGpu->removeGpuTraceMarker(marker); |
| 2032 if (fDrawBuffer) { | 2033 if (fDrawBuffer) { |
| 2033 fDrawBuffer->removeGpuTraceMarker(marker); | 2034 fDrawBuffer->removeGpuTraceMarker(marker); |
| 2034 } | 2035 } |
| 2035 } | 2036 } |
| 2036 | 2037 |
| OLD | NEW |