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

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

Issue 1279303002: Expand functionality of GrRectBatchFactory with AARects (Closed) Base URL: https://skia.googlesource.com/skia.git@batchfactory3
Patch Set: tweaks Created 5 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
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrAARectRenderer.cpp » ('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 2012 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 GrAARectRenderer_DEFINED
9 #define GrAARectRenderer_DEFINED
10
11 #include "GrColor.h"
12 #include "SkMatrix.h"
13 #include "SkRect.h"
14 #include "SkStrokeRec.h"
15
16 class GrClip;
17 class GrDrawTarget;
18 class GrIndexBuffer;
19 class GrPipelineBuilder;
20
21 /*
22 * This class wraps helper functions that draw AA rects (filled & stroked)
23 */
24 class GrAARectRenderer {
25 public:
26 // TODO: potentialy fuse the fill & stroke methods and differentiate
27 // between them by passing in stroke (==NULL means fill).
28
29 static void FillAARect(GrDrawTarget* target,
30 const GrPipelineBuilder& pipelineBuilder,
31 GrColor color,
32 const SkMatrix& viewMatrix,
33 const SkRect& rect,
34 const SkRect& devRect) {
35 GeometryFillAARect(target, pipelineBuilder, color, viewMatrix, rect, dev Rect);
36 }
37
38 static void StrokeAARect(GrDrawTarget*,
39 const GrPipelineBuilder&,
40 GrColor,
41 const SkMatrix& viewMatrix,
42 const SkRect& rect,
43 const SkRect& devRect,
44 const SkStrokeRec& stroke);
45
46 // First rect is outer; second rect is inner
47 static void FillAANestedRects(GrDrawTarget*,
48 const GrPipelineBuilder&,
49 GrColor,
50 const SkMatrix& viewMatrix,
51 const SkRect rects[2]);
52
53 private:
54 GrAARectRenderer();
55
56 static void GeometryFillAARect(GrDrawTarget*,
57 const GrPipelineBuilder&,
58 GrColor,
59 const SkMatrix& viewMatrix,
60 const SkRect& rect,
61 const SkRect& devRect);
62
63 static void GeometryStrokeAARect(GrDrawTarget*,
64 const GrPipelineBuilder&,
65 GrColor,
66 const SkMatrix& viewMatrix,
67 const SkRect& devOutside,
68 const SkRect& devOutsideAssist,
69 const SkRect& devInside,
70 bool miterStroke);
71 };
72
73 #endif // GrAARectRenderer_DEFINED
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrAARectRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698