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 "effects/GrDistanceFieldTextureEffect.h" | 19 #include "effects/GrDistanceFieldGeoProc.h" |
20 | 20 |
21 #include "SkDistanceFieldGen.h" | 21 #include "SkDistanceFieldGen.h" |
22 #include "SkRTConf.h" | 22 #include "SkRTConf.h" |
23 | 23 |
24 #define ATLAS_TEXTURE_WIDTH 1024 | 24 #define ATLAS_TEXTURE_WIDTH 1024 |
25 #define ATLAS_TEXTURE_HEIGHT 2048 | 25 #define ATLAS_TEXTURE_HEIGHT 2048 |
26 #define PLOT_WIDTH 256 | 26 #define PLOT_WIDTH 256 |
27 #define PLOT_HEIGHT 256 | 27 #define PLOT_HEIGHT 256 |
28 | 28 |
29 #define NUM_PLOTS_X (ATLAS_TEXTURE_WIDTH / PLOT_WIDTH) | 29 #define NUM_PLOTS_X (ATLAS_TEXTURE_WIDTH / PLOT_WIDTH) |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color
, viewMatrix, | 607 SkAutoTUnref<GrBatch> batch(AADistanceFieldPathBatch::Create(geometry, color
, viewMatrix, |
608 fAtlas, &fPathC
ache, &fPathList)); | 608 fAtlas, &fPathC
ache, &fPathList)); |
609 | 609 |
610 SkRect bounds = path.getBounds(); | 610 SkRect bounds = path.getBounds(); |
611 viewMatrix.mapRect(&bounds); | 611 viewMatrix.mapRect(&bounds); |
612 target->drawBatch(pipelineBuilder, batch, &bounds); | 612 target->drawBatch(pipelineBuilder, batch, &bounds); |
613 | 613 |
614 return true; | 614 return true; |
615 } | 615 } |
616 | 616 |
OLD | NEW |