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

Side by Side Diff: include/gpu/GrOvalRenderer.h

Issue 23513016: Move oval and rect renderer includes to private interface (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 | « include/gpu/GrContext.h ('k') | src/gpu/GrAARectRenderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrOvalRenderer_DEFINED
9 #define GrOvalRenderer_DEFINED
10
11 #include "GrContext.h"
12 #include "GrPaint.h"
13 #include "GrRefCnt.h"
14
15 class GrContext;
16 class GrDrawTarget;
17 class GrPaint;
18 struct SkRect;
19 class SkStrokeRec;
20
21 /*
22 * This class wraps helper functions that draw ovals and roundrects (filled & st roked)
23 */
24 class GrOvalRenderer : public GrRefCnt {
25 public:
26 SK_DECLARE_INST_COUNT(GrOvalRenderer)
27
28 GrOvalRenderer() : fRRectIndexBuffer(NULL) {}
29 ~GrOvalRenderer() {
30 this->reset();
31 }
32
33 void reset();
34
35 bool drawOval(GrDrawTarget* target, const GrContext* context, bool useAA,
36 const SkRect& oval, const SkStrokeRec& stroke);
37 bool drawSimpleRRect(GrDrawTarget* target, GrContext* context, bool useAA,
38 const SkRRect& rrect, const SkStrokeRec& stroke);
39
40 private:
41 bool drawEllipse(GrDrawTarget* target, bool useAA,
42 const SkRect& ellipse,
43 const SkStrokeRec& stroke);
44 bool drawDIEllipse(GrDrawTarget* target, bool useAA,
45 const SkRect& ellipse,
46 const SkStrokeRec& stroke);
47 void drawCircle(GrDrawTarget* target, bool useAA,
48 const SkRect& circle,
49 const SkStrokeRec& stroke);
50
51 GrIndexBuffer* rRectIndexBuffer(GrGpu* gpu);
52
53 GrIndexBuffer* fRRectIndexBuffer;
54
55 typedef GrRefCnt INHERITED;
56 };
57
58 #endif // GrOvalRenderer_DEFINED
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrAARectRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698