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

Side by Side Diff: src/gpu/batches/GrRectBatchFactory.h

Issue 1345853005: Move determiniation of strokerect rects internal (Closed) Base URL: https://skia.googlesource.com/skia.git@strokerectfix
Patch Set: comment fixed Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrRectBatchFactory_DEFINED 8 #ifndef GrRectBatchFactory_DEFINED
9 #define GrRectBatchFactory_DEFINED 9 #define GrRectBatchFactory_DEFINED
10 10
11 #include "GrAAFillRectBatch.h" 11 #include "GrAAFillRectBatch.h"
12 #include "GrAAStrokeRectBatch.h"
12 #include "GrColor.h" 13 #include "GrColor.h"
13 #include "GrNonAAFillRectBatch.h" 14 #include "GrNonAAFillRectBatch.h"
14 #include "GrNonAAStrokeRectBatch.h" 15 #include "GrNonAAStrokeRectBatch.h"
15 #include "SkMatrix.h" 16 #include "SkMatrix.h"
16 17
17 class GrBatch; 18 class GrBatch;
18 struct SkRect; 19 struct SkRect;
19 class SkStrokeRec; 20 class SkStrokeRec;
20 21
21 /* 22 /*
(...skipping 30 matching lines...) Expand all
52 } 53 }
53 54
54 inline GrDrawBatch* CreateNonAAStroke(GrColor color, 55 inline GrDrawBatch* CreateNonAAStroke(GrColor color,
55 const SkMatrix& viewMatrix, 56 const SkMatrix& viewMatrix,
56 const SkRect& rect, 57 const SkRect& rect,
57 SkScalar strokeWidth, 58 SkScalar strokeWidth,
58 bool snapToPixelCenters) { 59 bool snapToPixelCenters) {
59 return GrNonAAStrokeRectBatch::Create(color, viewMatrix, rect, strokeWidth, snapToPixelCenters); 60 return GrNonAAStrokeRectBatch::Create(color, viewMatrix, rect, strokeWidth, snapToPixelCenters);
60 } 61 }
61 62
62 GrDrawBatch* CreateAAStroke(GrColor, 63 inline GrDrawBatch* CreateAAStroke(GrColor color,
63 const SkMatrix& viewMatrix, 64 const SkMatrix& viewMatrix,
64 const SkRect& rect, 65 const SkRect& rect,
65 const SkRect& devRect, 66 const SkStrokeRec& stroke) {
66 const SkStrokeRec& stroke); 67 return GrAAStrokeRectBatch::Create(color, viewMatrix, rect, stroke);
68 }
67 69
68 // First rect is outer; second rect is inner 70 // First rect is outer; second rect is inner
69 GrDrawBatch* CreateAAFillNestedRects(GrColor, 71 GrDrawBatch* CreateAAFillNestedRects(GrColor,
70 const SkMatrix& viewMatrix, 72 const SkMatrix& viewMatrix,
71 const SkRect rects[2]); 73 const SkRect rects[2]);
72 74
73 }; 75 };
74 76
75 #endif 77 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698