Index: tests/GpuDrawPathTest.cpp |
diff --git a/tests/GpuDrawPathTest.cpp b/tests/GpuDrawPathTest.cpp |
index c89e125be9d7c7c104748f28481425f4b274b7f5..f23f5ef8dcee4d5864f9dc1646eccd7340fb1633 100644 |
--- a/tests/GpuDrawPathTest.cpp |
+++ b/tests/GpuDrawPathTest.cpp |
@@ -15,8 +15,6 @@ |
#include "SkCanvas.h" |
#include "SkColor.h" |
#include "SkPaint.h" |
-#include "SkPath.h" |
-#include "SkDashPathEffect.h" |
#include "SkRRect.h" |
#include "SkRect.h" |
#include "SkSurface.h" |
@@ -25,12 +23,11 @@ |
static void test_drawPathEmpty(skiatest::Reporter*, SkCanvas* canvas) { |
// Filling an empty path should not crash. |
SkPaint paint; |
- SkRect emptyRect = SkRect::MakeEmpty(); |
- canvas->drawRect(emptyRect, paint); |
+ canvas->drawRect(SkRect(), paint); |
canvas->drawPath(SkPath(), paint); |
- canvas->drawOval(emptyRect, paint); |
- canvas->drawRect(emptyRect, paint); |
- canvas->drawRRect(SkRRect::MakeRect(emptyRect), paint); |
+ canvas->drawOval(SkRect(), paint); |
+ canvas->drawRect(SkRect(), paint); |
+ canvas->drawRRect(SkRRect(), paint); |
// Stroking an empty path should not crash. |
paint.setAntiAlias(true); |
@@ -38,43 +35,17 @@ |
paint.setColor(SK_ColorGRAY); |
paint.setStrokeWidth(SkIntToScalar(20)); |
paint.setStrokeJoin(SkPaint::kRound_Join); |
- canvas->drawRect(emptyRect, paint); |
+ canvas->drawRect(SkRect(), paint); |
canvas->drawPath(SkPath(), paint); |
- canvas->drawOval(emptyRect, paint); |
- canvas->drawRect(emptyRect, paint); |
- canvas->drawRRect(SkRRect::MakeRect(emptyRect), paint); |
+ canvas->drawOval(SkRect(), paint); |
+ canvas->drawRect(SkRect(), paint); |
+ canvas->drawRRect(SkRRect(), paint); |
} |
-static void fill_and_stroke(SkCanvas* canvas, const SkPath& p1, const SkPath& p2, |
- SkPathEffect* effect) { |
- SkPaint paint; |
- paint.setAntiAlias(true); |
- paint.setPathEffect(effect); |
- |
- canvas->drawPath(p1, paint); |
- canvas->drawPath(p2, paint); |
- |
- paint.setStyle(SkPaint::kStroke_Style); |
- canvas->drawPath(p1, paint); |
- canvas->drawPath(p2, paint); |
-} |
- |
-static void test_drawSameRectOvals(skiatest::Reporter*, SkCanvas* canvas) { |
- // Drawing ovals with similar bounds but different points order should not crash. |
- |
- SkPath oval1, oval2; |
- const SkRect rect = SkRect::MakeWH(100, 50); |
- oval1.addOval(rect, SkPath::kCW_Direction); |
- oval2.addOval(rect, SkPath::kCCW_Direction); |
- |
- fill_and_stroke(canvas, oval1, oval2, nullptr); |
- |
- const SkScalar intervals[] = { 1, 1 }; |
- SkAutoTUnref<SkPathEffect> dashEffect(SkDashPathEffect::Create(intervals, 2, 0)); |
- fill_and_stroke(canvas, oval1, oval2, dashEffect); |
-} |
DEF_GPUTEST(GpuDrawPath, reporter, factory) { |
+ return; |
+ |
for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { |
GrContextFactory::GLContextType glType = static_cast<GrContextFactory::GLContextType>(type); |
@@ -91,7 +62,6 @@ |
SkSurface::NewRenderTarget(grContext, SkSurface::kNo_Budgeted, info, |
sampleCounts[i], nullptr)); |
test_drawPathEmpty(reporter, surface->getCanvas()); |
- test_drawSameRectOvals(reporter, surface->getCanvas()); |
} |
} |
} |