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

Side by Side Diff: gm/beziereffects.cpp

Issue 1276333004: GrDrawVertices to batches (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix 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 | « no previous file | gm/convexpolyeffect.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 2013 Google Inc. 3 * Copyright 2013 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 // This test only works with the GPU backend. 9 // This test only works with the GPU backend.
10 10
11 #include "gm.h" 11 #include "gm.h"
12 12
13 #if SK_SUPPORT_GPU 13 #if SK_SUPPORT_GPU
14 14
15 #include "GrBatchTarget.h" 15 #include "GrBatchTarget.h"
16 #include "GrContext.h" 16 #include "GrContext.h"
17 #include "GrPathUtils.h" 17 #include "GrPathUtils.h"
18 #include "GrTest.h" 18 #include "GrTest.h"
19 #include "GrTestBatch.h"
20 #include "SkColorPriv.h" 19 #include "SkColorPriv.h"
21 #include "SkDevice.h" 20 #include "SkDevice.h"
22 #include "SkGeometry.h" 21 #include "SkGeometry.h"
23 22
23 #include "batches/GrTestBatch.h"
24
24 #include "effects/GrBezierEffect.h" 25 #include "effects/GrBezierEffect.h"
25 26
26 static inline SkScalar eval_line(const SkPoint& p, const SkScalar lineEq[3], SkS calar sign) { 27 static inline SkScalar eval_line(const SkPoint& p, const SkScalar lineEq[3], SkS calar sign) {
27 return sign * (lineEq[0] * p.fX + lineEq[1] * p.fY + lineEq[2]); 28 return sign * (lineEq[0] * p.fX + lineEq[1] * p.fY + lineEq[2]);
28 } 29 }
29 30
30 namespace skiagm { 31 namespace skiagm {
31 32
32 class BezierCubicOrConicTestBatch : public GrTestBatch { 33 class BezierCubicOrConicTestBatch : public GrTestBatch {
33 public: 34 public:
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 typedef GM INHERITED; 630 typedef GM INHERITED;
630 }; 631 };
631 632
632 DEF_GM( return SkNEW(BezierCubicEffects); ) 633 DEF_GM( return SkNEW(BezierCubicEffects); )
633 DEF_GM( return SkNEW(BezierConicEffects); ) 634 DEF_GM( return SkNEW(BezierConicEffects); )
634 DEF_GM( return SkNEW(BezierQuadEffects); ) 635 DEF_GM( return SkNEW(BezierQuadEffects); )
635 636
636 } 637 }
637 638
638 #endif 639 #endif
OLDNEW
« no previous file with comments | « no previous file | gm/convexpolyeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698