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

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

Issue 22486003: Fix hairline pathrenderer for Nexus-10. Switches to passing in an offset and using that to compute … (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Split hairline vertex buffer into buffer for line segments and buffer for quadratics Created 7 years, 4 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
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 typedef SkTArray<SkPoint, true> PtArray;
bsalomon 2013/08/12 17:25:43 Can we nest these in the class?
jvanverth1 2013/08/13 15:04:10 Done.
15 typedef SkTArray<int, true> IntArray;
16 typedef SkTArray<float, true> FloatArray;
17
14 class GrAAHairLinePathRenderer : public GrPathRenderer { 18 class GrAAHairLinePathRenderer : public GrPathRenderer {
15 public: 19 public:
16 virtual ~GrAAHairLinePathRenderer(); 20 virtual ~GrAAHairLinePathRenderer();
17 21
18 static GrPathRenderer* Create(GrContext* context); 22 static GrPathRenderer* Create(GrContext* context);
19 23
20 virtual bool canDrawPath(const SkPath& path, 24 virtual bool canDrawPath(const SkPath& path,
21 const SkStrokeRec& stroke, 25 const SkStrokeRec& stroke,
22 const GrDrawTarget* target, 26 const GrDrawTarget* target,
23 bool antiAlias) const SK_OVERRIDE; 27 bool antiAlias) const SK_OVERRIDE;
24 28
25 protected: 29 protected:
26 virtual bool onDrawPath(const SkPath& path, 30 virtual bool onDrawPath(const SkPath& path,
27 const SkStrokeRec& stroke, 31 const SkStrokeRec& stroke,
28 GrDrawTarget* target, 32 GrDrawTarget* target,
29 bool antiAlias) SK_OVERRIDE; 33 bool antiAlias) SK_OVERRIDE;
30 34
31 private: 35 private:
32 GrAAHairLinePathRenderer(const GrContext* context, 36 GrAAHairLinePathRenderer(const GrContext* context,
33 const GrIndexBuffer* fLinesIndexBuffer, 37 const GrIndexBuffer* fLinesIndexBuffer,
34 const GrIndexBuffer* fQuadsIndexBuffer); 38 const GrIndexBuffer* fQuadsIndexBuffer);
35 39
36 bool createGeom(const SkPath& path, 40 bool createLineGeom(const SkPath& path,
37 GrDrawTarget* target, 41 GrDrawTarget* target,
38 int* lineCnt, 42 const PtArray& lines,
39 int* quadCnt, 43 int lineCnt,
40 int* conicCnt, 44 GrDrawTarget::AutoReleaseGeometry* arg,
41 GrDrawTarget::AutoReleaseGeometry* arg, 45 SkRect* devBounds);
42 SkRect* devBounds ); 46
47 bool createBezierGeom(const SkPath& path,
48 GrDrawTarget* target,
49 const PtArray& quads,
50 int quadCnt,
51 const PtArray& conics,
52 int conicCnt,
53 const IntArray& qSubdivs,
54 const FloatArray& cWeights,
55 GrDrawTarget::AutoReleaseGeometry* arg,
56 SkRect* devBounds);
43 57
44 const GrIndexBuffer* fLinesIndexBuffer; 58 const GrIndexBuffer* fLinesIndexBuffer;
45 const GrIndexBuffer* fQuadsIndexBuffer; 59 const GrIndexBuffer* fQuadsIndexBuffer;
46 60
47 typedef GrPathRenderer INHERITED; 61 typedef GrPathRenderer INHERITED;
48 }; 62 };
49 63
50 64
51 #endif 65 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | src/gpu/GrAAHairLinePathRenderer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698