aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPathPriv.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-07-29 08:18:34 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-29 08:18:34 -0700
commit117842223bd13325b6da26110d80e0590c1a742b (patch)
tree860d279a06ceccbc6cd27e2fb1771f4c831f631e /src/core/SkPathPriv.h
parent0f07c3f855a02379176d74341d241f8bc881ddad (diff)
Move headers with no dependencies.
C.f. https://codereview.chromium.org/1261013003/ BUG=skia:4126 Will follow up with two more CLs if this works: - one moving SkRecords.h - one moving SkMiniRecorder.h No public API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/1266593002
Diffstat (limited to 'src/core/SkPathPriv.h')
-rw-r--r--src/core/SkPathPriv.h64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/core/SkPathPriv.h b/src/core/SkPathPriv.h
deleted file mode 100644
index 934c730660..0000000000
--- a/src/core/SkPathPriv.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkPathPriv_DEFINED
-#define SkPathPriv_DEFINED
-
-#include "SkPath.h"
-
-class SkPathPriv {
-public:
- enum FirstDirection {
- kCW_FirstDirection, // == SkPath::kCW_Direction
- kCCW_FirstDirection, // == SkPath::kCCW_Direction
- kUnknown_FirstDirection,
- };
-
- static FirstDirection AsFirstDirection(SkPath::Direction dir) {
- // since we agree numerically for the values in Direction, we can just cast.
- return (FirstDirection)dir;
- }
-
- /**
- * Return the opposite of the specified direction. kUnknown is its own
- * opposite.
- */
- static FirstDirection OppositeFirstDirection(FirstDirection dir) {
- static const FirstDirection gOppositeDir[] = {
- kCCW_FirstDirection, kCW_FirstDirection, kUnknown_FirstDirection,
- };
- return gOppositeDir[dir];
- }
-
- /**
- * Tries to quickly compute the direction of the first non-degenerate
- * contour. If it can be computed, return true and set dir to that
- * direction. If it cannot be (quickly) determined, return false and ignore
- * the dir parameter. If the direction was determined, it is cached to make
- * subsequent calls return quickly.
- */
- static bool CheapComputeFirstDirection(const SkPath&, FirstDirection* dir);
-
- /**
- * Returns true if the path's direction can be computed via
- * cheapComputDirection() and if that computed direction matches the
- * specified direction. If dir is kUnknown, returns true if the direction
- * cannot be computed.
- */
- static bool CheapIsFirstDirection(const SkPath& path, FirstDirection dir) {
- FirstDirection computedDir = kUnknown_FirstDirection;
- (void)CheapComputeFirstDirection(path, &computedDir);
- return computedDir == dir;
- }
-
- static bool LastVerbIsClose(const SkPath& path) {
- int count = path.countVerbs();
- return count >= 1 && path.fPathRef->verbs()[~(count - 1)] == SkPath::Verb::kClose_Verb;
- }
-};
-
-#endif