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

Unified Diff: gm/strokefill.cpp

Issue 1176953002: move SkPath direction-as-computed into SkPathPriv (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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
Index: gm/strokefill.cpp
diff --git a/gm/strokefill.cpp b/gm/strokefill.cpp
index b6e888b047bc48333b185cb2564e5d44cd38486a..04985485d975aa45cfeefb9c7a5d2f70ab5bb999 100644
--- a/gm/strokefill.cpp
+++ b/gm/strokefill.cpp
@@ -7,7 +7,7 @@
#include "gm.h"
#include "SkCanvas.h"
-#include "SkPath.h"
+#include "SkPathPriv.h"
#include "SkTypeface.h"
namespace skiagm {
@@ -69,12 +69,12 @@ protected:
path2.reset();
path2.addCircle(x + SkIntToScalar(240), y + SkIntToScalar(200), SkIntToScalar(50), SkPath::kCCW_Direction);
canvas->drawPath(path2, paint);
- SkASSERT(path2.cheapIsDirection(SkPath::kCCW_Direction));
+ SkASSERT(SkPathPriv::CheapIsFirstDirection(path2, SkPathPriv::kCCW_FirstDirection));
path2.reset();
- SkASSERT(!path2.cheapComputeDirection(NULL));
+ SkASSERT(!SkPathPriv::CheapComputeFirstDirection(path2, NULL));
path2.addCircle(x + SkIntToScalar(360), y + SkIntToScalar(200), SkIntToScalar(50), SkPath::kCW_Direction);
- SkASSERT(path2.cheapIsDirection(SkPath::kCW_Direction));
+ SkASSERT(SkPathPriv::CheapIsFirstDirection(path2, SkPathPriv::kCW_FirstDirection));
canvas->drawPath(path2, paint);
SkRect r = SkRect::MakeXYWH(x - SkIntToScalar(50), y + SkIntToScalar(280),
@@ -98,18 +98,18 @@ protected:
r = SkRect::MakeXYWH(x + SkIntToScalar(190), y + SkIntToScalar(280),
SkIntToScalar(100), SkIntToScalar(100));
path4.reset();
- SkASSERT(!path4.cheapComputeDirection(NULL));
+ SkASSERT(!SkPathPriv::CheapComputeFirstDirection(path4, NULL));
path4.addRect(r, SkPath::kCCW_Direction);
- SkASSERT(path4.cheapIsDirection(SkPath::kCCW_Direction));
+ SkASSERT(SkPathPriv::CheapIsFirstDirection(path4, SkPathPriv::kCCW_FirstDirection));
path4.moveTo(0, 0); // test for crbug.com/247770
canvas->drawPath(path4, paint);
r = SkRect::MakeXYWH(x + SkIntToScalar(310), y + SkIntToScalar(280),
SkIntToScalar(100), SkIntToScalar(100));
path4.reset();
- SkASSERT(!path4.cheapComputeDirection(NULL));
+ SkASSERT(!SkPathPriv::CheapComputeFirstDirection(path4, NULL));
path4.addRect(r, SkPath::kCW_Direction);
- SkASSERT(path4.cheapIsDirection(SkPath::kCW_Direction));
+ SkASSERT(SkPathPriv::CheapIsFirstDirection(path4, SkPathPriv::kCW_FirstDirection));
path4.moveTo(0, 0); // test for crbug.com/247770
canvas->drawPath(path4, paint);
}
« no previous file with comments | « gm/convex_all_line_paths.cpp ('k') | include/core/SkPath.h » ('j') | src/core/SkPath.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698