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

Side by Side Diff: src/gpu/GrAAHairLinePathRenderer.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/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.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 2011 Google Inc. 3 * Copyright 2011 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 GrAAHairLinePathRenderer_DEFINED 9 #ifndef GrAAHairLinePathRenderer_DEFINED
10 #define GrAAHairLinePathRenderer_DEFINED 10 #define GrAAHairLinePathRenderer_DEFINED
11 11
12 #include "GrPathRenderer.h" 12 #include "GrPathRenderer.h"
13 13
14 class GrAAHairLinePathRenderer : public GrPathRenderer { 14 class GrAAHairLinePathRenderer : public GrPathRenderer {
15 public: 15 public:
16 virtual ~GrAAHairLinePathRenderer(); 16 virtual ~GrAAHairLinePathRenderer();
17 17
18 static GrPathRenderer* Create(GrContext* context); 18 static GrPathRenderer* Create(GrContext* context);
19 19
20 virtual bool canDrawPath(const SkPath& path, 20 virtual bool canDrawPath(const SkStrokeRec& stroke,
21 const SkStrokeRec& stroke,
22 const GrDrawTarget* target, 21 const GrDrawTarget* target,
23 bool antiAlias) const SK_OVERRIDE; 22 bool antiAlias) const SK_OVERRIDE;
24 23
25 typedef SkTArray<SkPoint, true> PtArray; 24 typedef SkTArray<SkPoint, true> PtArray;
26 typedef SkTArray<int, true> IntArray; 25 typedef SkTArray<int, true> IntArray;
27 typedef SkTArray<float, true> FloatArray; 26 typedef SkTArray<float, true> FloatArray;
28 27
29 protected: 28 protected:
30 virtual bool onDrawPath(const SkPath& path, 29 virtual bool onDrawPath(const SkStrokeRec& stroke,
31 const SkStrokeRec& stroke,
32 GrDrawTarget* target, 30 GrDrawTarget* target,
33 bool antiAlias) SK_OVERRIDE; 31 bool antiAlias) SK_OVERRIDE;
34 32
35 private: 33 private:
36 GrAAHairLinePathRenderer(const GrContext* context, 34 GrAAHairLinePathRenderer(const GrContext* context,
37 const GrIndexBuffer* fLinesIndexBuffer, 35 const GrIndexBuffer* fLinesIndexBuffer,
38 const GrIndexBuffer* fQuadsIndexBuffer); 36 const GrIndexBuffer* fQuadsIndexBuffer);
39 37
40 bool createLineGeom(const SkPath& path, 38 bool createLineGeom(const SkPath& path,
41 GrDrawTarget* target, 39 GrDrawTarget* target,
(...skipping 14 matching lines...) Expand all
56 SkRect* devBounds); 54 SkRect* devBounds);
57 55
58 const GrIndexBuffer* fLinesIndexBuffer; 56 const GrIndexBuffer* fLinesIndexBuffer;
59 const GrIndexBuffer* fQuadsIndexBuffer; 57 const GrIndexBuffer* fQuadsIndexBuffer;
60 58
61 typedef GrPathRenderer INHERITED; 59 typedef GrPathRenderer INHERITED;
62 }; 60 };
63 61
64 62
65 #endif 63 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698