Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: src/gpu/GrAddPathRenderers_default.cpp

Issue 1155593002: Move GrPath(Range) creation to ResourceProvider. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/gpu/GrResourceProvider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 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 9
10 #include "GrStencilAndCoverPathRenderer.h" 10 #include "GrStencilAndCoverPathRenderer.h"
11 #include "GrAAHairLinePathRenderer.h" 11 #include "GrAAHairLinePathRenderer.h"
12 #include "GrAAConvexPathRenderer.h" 12 #include "GrAAConvexPathRenderer.h"
13 #include "GrAADistanceFieldPathRenderer.h" 13 #include "GrAADistanceFieldPathRenderer.h"
14 #include "GrContext.h"
14 #include "GrDashLinePathRenderer.h" 15 #include "GrDashLinePathRenderer.h"
16 #include "GrGpu.h"
15 #include "GrTessellatingPathRenderer.h" 17 #include "GrTessellatingPathRenderer.h"
16 #if GR_STROKE_PATH_RENDERING 18 #if GR_STROKE_PATH_RENDERING
17 #include "../../experimental/StrokePathRenderer/GrStrokePathRenderer.h" 19 #include "../../experimental/StrokePathRenderer/GrStrokePathRenderer.h"
18 #endif 20 #endif
19 #if GR_ANDROID_PATH_RENDERING 21 #if GR_ANDROID_PATH_RENDERING
20 #include "../../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h" 22 #include "../../experimental/AndroidPathRenderer/GrAndroidPathRenderer.h"
21 #endif 23 #endif
22 24
23 #ifndef GR_TESSELLATING_PATH_RENDERING 25 #ifndef GR_TESSELLATING_PATH_RENDERING
24 #define GR_TESSELLATING_PATH_RENDERING 1 26 #define GR_TESSELLATING_PATH_RENDERING 1
25 #endif 27 #endif
26 28
27 void GrPathRenderer::AddPathRenderers(GrContext* ctx, GrPathRendererChain* chain ) { 29 void GrPathRenderer::AddPathRenderers(GrContext* ctx, GrPathRendererChain* chain ) {
28 chain->addPathRenderer(SkNEW_ARGS(GrDashLinePathRenderer, (ctx)))->unref(); 30 chain->addPathRenderer(SkNEW_ARGS(GrDashLinePathRenderer, (ctx)))->unref();
29 31
30 #if GR_STROKE_PATH_RENDERING 32 #if GR_STROKE_PATH_RENDERING
31 chain->addPathRenderer(SkNEW(GrStrokePathRenderer))->unref(); 33 chain->addPathRenderer(SkNEW(GrStrokePathRenderer))->unref();
32 #endif 34 #endif
33 #if GR_ANDROID_PATH_RENDERING 35 #if GR_ANDROID_PATH_RENDERING
34 chain->addPathRenderer(SkNEW(GrAndroidPathRenderer))->unref(); 36 chain->addPathRenderer(SkNEW(GrAndroidPathRenderer))->unref();
35 #endif 37 #endif
36 if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(ctx)) { 38 if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(ctx->resource Provider(),
39 *ctx->getGpu( )->caps())) {
37 chain->addPathRenderer(pr)->unref(); 40 chain->addPathRenderer(pr)->unref();
38 } 41 }
39 #if GR_TESSELLATING_PATH_RENDERING 42 #if GR_TESSELLATING_PATH_RENDERING
40 chain->addPathRenderer(new GrTessellatingPathRenderer)->unref(); 43 chain->addPathRenderer(new GrTessellatingPathRenderer)->unref();
41 #endif 44 #endif
42 if (GrPathRenderer* pr = GrAAHairLinePathRenderer::Create()) { 45 if (GrPathRenderer* pr = GrAAHairLinePathRenderer::Create()) {
43 chain->addPathRenderer(pr)->unref(); 46 chain->addPathRenderer(pr)->unref();
44 } 47 }
45 chain->addPathRenderer(SkNEW(GrAAConvexPathRenderer))->unref(); 48 chain->addPathRenderer(SkNEW(GrAAConvexPathRenderer))->unref();
46 chain->addPathRenderer(SkNEW_ARGS(GrAADistanceFieldPathRenderer, (ctx)))->un ref(); 49 chain->addPathRenderer(SkNEW_ARGS(GrAADistanceFieldPathRenderer, (ctx)))->un ref();
47 } 50 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrResourceProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698