| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrAAHairLinePathRenderer.h" | 8 #include "GrAAHairLinePathRenderer.h" |
| 9 | 9 |
| 10 #include "GrBatch.h" | 10 #include "GrBatch.h" |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 const SkMatrix& viewMatrix, | 976 const SkMatrix& viewMatrix, |
| 977 const SkPath& path, | 977 const SkPath& path, |
| 978 const GrStrokeInfo& stroke, | 978 const GrStrokeInfo& stroke, |
| 979 bool) { | 979 bool) { |
| 980 SkIRect devClipBounds; | 980 SkIRect devClipBounds; |
| 981 pipelineBuilder->clip().getConservativeBounds(pipelineBuilder->getRenderTarg
et(), | 981 pipelineBuilder->clip().getConservativeBounds(pipelineBuilder->getRenderTarg
et(), |
| 982 &devClipBounds); | 982 &devClipBounds); |
| 983 | 983 |
| 984 SkAutoTUnref<GrBatch> batch(create_hairline_batch(color, viewMatrix, path, s
troke, | 984 SkAutoTUnref<GrBatch> batch(create_hairline_batch(color, viewMatrix, path, s
troke, |
| 985 devClipBounds)); | 985 devClipBounds)); |
| 986 target->drawBatch(pipelineBuilder, batch); | 986 target->drawBatch(*pipelineBuilder, batch); |
| 987 | 987 |
| 988 return true; | 988 return true; |
| 989 } | 989 } |
| 990 | 990 |
| 991 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 991 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 992 | 992 |
| 993 #ifdef GR_TEST_UTILS | 993 #ifdef GR_TEST_UTILS |
| 994 | 994 |
| 995 BATCH_TEST_DEFINE(AAHairlineBatch) { | 995 BATCH_TEST_DEFINE(AAHairlineBatch) { |
| 996 GrColor color = GrRandomColor(random); | 996 GrColor color = GrRandomColor(random); |
| 997 SkMatrix viewMatrix = GrTest::TestMatrix(random); | 997 SkMatrix viewMatrix = GrTest::TestMatrix(random); |
| 998 GrStrokeInfo stroke(SkStrokeRec::kHairline_InitStyle); | 998 GrStrokeInfo stroke(SkStrokeRec::kHairline_InitStyle); |
| 999 SkPath path = GrTest::TestPath(random); | 999 SkPath path = GrTest::TestPath(random); |
| 1000 SkIRect devClipBounds; | 1000 SkIRect devClipBounds; |
| 1001 devClipBounds.setEmpty(); | 1001 devClipBounds.setEmpty(); |
| 1002 return create_hairline_batch(color, viewMatrix, path, stroke, devClipBounds)
; | 1002 return create_hairline_batch(color, viewMatrix, path, stroke, devClipBounds)
; |
| 1003 } | 1003 } |
| 1004 | 1004 |
| 1005 #endif | 1005 #endif |
| OLD | NEW |