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

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

Issue 23926019: Stateful PathRenderer implementation (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: add assert & patch for missing AutoPathClear Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrPathRendererChain.cpp ('k') | src/gpu/GrSoftwarePathRenderer.cpp » ('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 #ifndef GrSoftwarePathRenderer_DEFINED 9 #ifndef GrSoftwarePathRenderer_DEFINED
10 #define GrSoftwarePathRenderer_DEFINED 10 #define GrSoftwarePathRenderer_DEFINED
11 11
12 #include "GrPathRenderer.h" 12 #include "GrPathRenderer.h"
13 13
14 class GrContext; 14 class GrContext;
15 class GrAutoScratchTexture; 15 class GrAutoScratchTexture;
16 16
17 /** 17 /**
18 * This class uses the software side to render a path to an SkBitmap and 18 * This class uses the software side to render a path to an SkBitmap and
19 * then uploads the result to the gpu 19 * then uploads the result to the gpu
20 */ 20 */
21 class GrSoftwarePathRenderer : public GrPathRenderer { 21 class GrSoftwarePathRenderer : public GrPathRenderer {
22 public: 22 public:
23 GrSoftwarePathRenderer(GrContext* context) 23 GrSoftwarePathRenderer(GrContext* context)
24 : fContext(context) { 24 : fContext(context) {
25 } 25 }
26 26
27 virtual bool canDrawPath(const SkPath&, 27 virtual bool canDrawPath(const SkStrokeRec&,
28 const SkStrokeRec&,
29 const GrDrawTarget*, 28 const GrDrawTarget*,
30 bool antiAlias) const SK_OVERRIDE; 29 bool antiAlias) const SK_OVERRIDE;
31 protected: 30 protected:
32 virtual StencilSupport onGetStencilSupport(const SkPath&, 31 virtual StencilSupport onGetStencilSupport(const SkStrokeRec&,
33 const SkStrokeRec&,
34 const GrDrawTarget*) const SK_OVE RRIDE; 32 const GrDrawTarget*) const SK_OVE RRIDE;
35 33
36 virtual bool onDrawPath(const SkPath&, 34 virtual bool onDrawPath(const SkStrokeRec&,
37 const SkStrokeRec&,
38 GrDrawTarget*, 35 GrDrawTarget*,
39 bool antiAlias) SK_OVERRIDE; 36 bool antiAlias) SK_OVERRIDE;
40 37
41 private: 38 private:
42 GrContext* fContext; 39 GrContext* fContext;
43 40
44 typedef GrPathRenderer INHERITED; 41 typedef GrPathRenderer INHERITED;
45 }; 42 };
46 43
47 #endif 44 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPathRendererChain.cpp ('k') | src/gpu/GrSoftwarePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698