OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 "GrAADistanceFieldPathRenderer.h" | 9 #include "GrAADistanceFieldPathRenderer.h" |
10 | 10 |
11 #include "GrBatch.h" | 11 #include "GrBatch.h" |
12 #include "GrBatchTarget.h" | 12 #include "GrBatchTarget.h" |
13 #include "GrBufferAllocPool.h" | 13 #include "GrBufferAllocPool.h" |
14 #include "GrContext.h" | 14 #include "GrContext.h" |
15 #include "GrPipelineBuilder.h" | 15 #include "GrPipelineBuilder.h" |
16 #include "GrSurfacePriv.h" | 16 #include "GrSurfacePriv.h" |
17 #include "GrSWMaskHelper.h" | 17 #include "GrSWMaskHelper.h" |
18 #include "GrTexturePriv.h" | 18 #include "GrTexturePriv.h" |
| 19 #include "GrVertexBuffer.h" |
19 #include "effects/GrDistanceFieldGeoProc.h" | 20 #include "effects/GrDistanceFieldGeoProc.h" |
20 | 21 |
21 #include "SkDistanceFieldGen.h" | 22 #include "SkDistanceFieldGen.h" |
22 #include "SkRTConf.h" | 23 #include "SkRTConf.h" |
23 | 24 |
24 #define ATLAS_TEXTURE_WIDTH 1024 | 25 #define ATLAS_TEXTURE_WIDTH 1024 |
25 #define ATLAS_TEXTURE_HEIGHT 2048 | 26 #define ATLAS_TEXTURE_HEIGHT 2048 |
26 #define PLOT_WIDTH 256 | 27 #define PLOT_WIDTH 256 |
27 #define PLOT_HEIGHT 256 | 28 #define PLOT_HEIGHT 256 |
28 | 29 |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color
, viewMatrix, | 608 SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color
, viewMatrix, |
608 fAtlas, &fPathC
ache, &fPathList)); | 609 fAtlas, &fPathC
ache, &fPathList)); |
609 | 610 |
610 SkRect bounds = path.getBounds(); | 611 SkRect bounds = path.getBounds(); |
611 viewMatrix.mapRect(&bounds); | 612 viewMatrix.mapRect(&bounds); |
612 target->drawBatch(pipelineBuilder, batch, &bounds); | 613 target->drawBatch(pipelineBuilder, batch, &bounds); |
613 | 614 |
614 return true; | 615 return true; |
615 } | 616 } |
616 | 617 |
OLD | NEW |