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

Unified Diff: include/gpu/GrTestUtils.h

Issue 1967513002: Revert of Replace GrStrokeInfo with GrStyle. (Closed) Base URL: https://chromium.googlesource.com/skia.git@resscale
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrBlurUtils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrTestUtils.h
diff --git a/include/gpu/GrTestUtils.h b/include/gpu/GrTestUtils.h
index caaf5d978560ebfb9c67143f6078fc827435ed8b..475e38a6a11d50034aebaf1145973dbfd16726df 100644
--- a/include/gpu/GrTestUtils.h
+++ b/include/gpu/GrTestUtils.h
@@ -13,12 +13,10 @@
#ifdef GR_TEST_UTILS
#include "GrColor.h"
-#include "SkPathEffect.h"
#include "SkRandom.h"
#include "SkStrokeRec.h"
-#include "../private/SkTemplates.h"
-class GrStyle;
+class GrStrokeInfo;
class SkMatrix;
class SkPath;
class SkRRect;
@@ -26,7 +24,7 @@
namespace GrTest {
/**
- * Helpers for use in Test functions.
+ * A helper for use in Test functions.
*/
const SkMatrix& TestMatrix(SkRandom*);
const SkMatrix& TestMatrixPreservesRightAngles(SkRandom*);
@@ -38,34 +36,9 @@
const SkPath& TestPath(SkRandom*);
const SkPath& TestPathConvex(SkRandom*);
SkStrokeRec TestStrokeRec(SkRandom*);
-/** Creates styles with dash path effects and null path effects */
-void TestStyle(SkRandom*, GrStyle*);
+GrStrokeInfo TestStrokeInfo(SkRandom*);
-// We have a simplified dash path effect here to avoid relying on SkDashPathEffect which
-// is in the optional build target effects.
-class TestDashPathEffect : public SkPathEffect {
-public:
- static sk_sp<SkPathEffect> Make(const SkScalar* intervals, int count, SkScalar phase) {
- return sk_sp<SkPathEffect>(new TestDashPathEffect(intervals, count, phase));
- }
-
- bool filterPath(SkPath* dst, const SkPath&, SkStrokeRec* , const SkRect*) const override;
- DashType asADash(DashInfo* info) const override;
- Factory getFactory() const override { return nullptr; }
- void toString(SkString*) const override {}
-
-private:
- TestDashPathEffect(const SkScalar* intervals, int count, SkScalar phase);
-
- int fCount;
- SkAutoTArray<SkScalar> fIntervals;
- SkScalar fPhase;
- SkScalar fInitialDashLength;
- int fInitialDashIndex;
- SkScalar fIntervalLength;
-};
-
-} // namespace GrTest
+}
static inline GrColor GrRandomColor(SkRandom* random) {
// There are only a few cases of random colors which interest us
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrBlurUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698