| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "GrAADistanceFieldPathRenderer.h" | 8 #include "GrAADistanceFieldPathRenderer.h" |
| 9 | 9 |
| 10 #include "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 SkPaint paint; | 372 SkPaint paint; |
| 373 paint.setStyle(SkPaint::kFill_Style); | 373 paint.setStyle(SkPaint::kFill_Style); |
| 374 paint.setAntiAlias(antiAlias); | 374 paint.setAntiAlias(antiAlias); |
| 375 | 375 |
| 376 SkDraw draw; | 376 SkDraw draw; |
| 377 sk_bzero(&draw, sizeof(draw)); | 377 sk_bzero(&draw, sizeof(draw)); |
| 378 | 378 |
| 379 SkRasterClip rasterClip; | 379 SkRasterClip rasterClip; |
| 380 rasterClip.setRect(devPathBounds); | 380 rasterClip.setRect(devPathBounds); |
| 381 draw.fRC = &rasterClip; | 381 draw.fRC = &rasterClip; |
| 382 draw.fClip = &rasterClip.bwRgn(); | |
| 383 draw.fMatrix = &drawMatrix; | 382 draw.fMatrix = &drawMatrix; |
| 384 draw.fDst = dst; | 383 draw.fDst = dst; |
| 385 | 384 |
| 386 draw.drawPathCoverage(path, paint); | 385 draw.drawPathCoverage(path, paint); |
| 387 | 386 |
| 388 // generate signed distance field | 387 // generate signed distance field |
| 389 devPathBounds.outset(SK_DistanceFieldPad, SK_DistanceFieldPad); | 388 devPathBounds.outset(SK_DistanceFieldPad, SK_DistanceFieldPad); |
| 390 width = devPathBounds.width(); | 389 width = devPathBounds.width(); |
| 391 height = devPathBounds.height(); | 390 height = devPathBounds.height(); |
| 392 // TODO We should really generate this directly into the plot somehow | 391 // TODO We should really generate this directly into the plot somehow |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 geometry.fGenID = random->nextU(); | 645 geometry.fGenID = random->nextU(); |
| 647 | 646 |
| 648 return AADistanceFieldPathBatch::Create(geometry, viewMatrix, | 647 return AADistanceFieldPathBatch::Create(geometry, viewMatrix, |
| 649 gTestStruct.fAtlas, | 648 gTestStruct.fAtlas, |
| 650 &gTestStruct.fPathCache, | 649 &gTestStruct.fPathCache, |
| 651 &gTestStruct.fPathList, | 650 &gTestStruct.fPathList, |
| 652 gammaCorrect); | 651 gammaCorrect); |
| 653 } | 652 } |
| 654 | 653 |
| 655 #endif | 654 #endif |
| OLD | NEW |