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

Side by Side Diff: src/gpu/GrTessellatingPathRenderer.h

Issue 855513004: Tessellating GPU path renderer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
1
2 /* 1 /*
3 * Copyright 2012 Google Inc. 2 * Copyright 2014 Google Inc.
4 * 3 *
5 * 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
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9 #ifndef GrSoftwarePathRenderer_DEFINED 8 #ifndef GrTessellatingPathRenderer_DEFINED
10 #define GrSoftwarePathRenderer_DEFINED 9 #define GrTessellatingPathRenderer_DEFINED
11 10
12 #include "GrPathRenderer.h" 11 #include "GrPathRenderer.h"
13 12 #include "SkTemplates.h"
14 class GrContext;
15 13
16 /** 14 /**
17 * This class uses the software side to render a path to an SkBitmap and 15 * Subclass that renders the path by converting to screen-space trapezoids plus
18 * then uploads the result to the gpu 16 * extra 1-pixel geometry for AA.
19 */ 17 */
20 class GrSoftwarePathRenderer : public GrPathRenderer { 18 class SK_API GrTessellatingPathRenderer : public GrPathRenderer {
bsalomon 2015/01/20 15:12:24 Curious why this has SK_API?
Stephen White 2015/01/20 18:54:15 Copypasta from the DefaultPathRenderer. Should I r
21 public: 19 public:
22 GrSoftwarePathRenderer(GrContext* context) 20 GrTessellatingPathRenderer();
23 : fContext(context) {
24 }
25 21
26 virtual bool canDrawPath(const GrDrawTarget*, 22 virtual bool canDrawPath(const GrDrawTarget* target,
27 const GrDrawState*, 23 const GrDrawState* drawState,
28 const SkMatrix& viewMatrix, 24 const SkMatrix& viewMatrix,
29 const SkPath&, 25 const SkPath& path,
30 const SkStrokeRec&, 26 const SkStrokeRec& rec,
31 bool antiAlias) const SK_OVERRIDE; 27 bool antiAlias) const;
32 protected: 28
29 static bool gWireframe;
30 private:
31
33 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*, 32 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*,
34 const GrDrawState*, 33 const GrDrawState*,
35 const SkPath&, 34 const SkPath&,
36 const SkStrokeRec&) const SK_OVER RIDE; 35 const SkStrokeRec&) const SK_OVER RIDE;
37 36
38 virtual bool onDrawPath(GrDrawTarget*, 37 virtual bool onDrawPath(GrDrawTarget*,
39 GrDrawState*, 38 GrDrawState*,
40 GrColor, 39 GrColor,
41 const SkMatrix& viewMatrix, 40 const SkMatrix& viewMatrix,
42 const SkPath&, 41 const SkPath&,
43 const SkStrokeRec&, 42 const SkStrokeRec&,
44 bool antiAlias) SK_OVERRIDE; 43 bool antiAlias) SK_OVERRIDE;
45 44
46 private:
47 GrContext* fContext;
48
49 typedef GrPathRenderer INHERITED; 45 typedef GrPathRenderer INHERITED;
50 }; 46 };
51 47
52 #endif 48 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698