aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkValidationUtils.h
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-16 13:19:11 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-16 13:19:11 +0000
commit478884f7d3b8c7be8b62f3fa2b79192f411c3fec (patch)
tree327028a78b03a871d050fd8254e83a7e11e834bd /src/core/SkValidationUtils.h
parent3ef7eeac9a2205285ca56d2d70e4d6740af556e6 (diff)
Revert 11247, 11250, 11251 and 11279 to unblock DEPS roll (https://codereview.chromium.org/24159002/)
11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279 11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251 11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250 11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015 git-svn-id: http://skia.googlecode.com/svn/trunk@11285 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkValidationUtils.h')
-rw-r--r--src/core/SkValidationUtils.h46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/core/SkValidationUtils.h b/src/core/SkValidationUtils.h
deleted file mode 100644
index f31d86ce22..0000000000
--- a/src/core/SkValidationUtils.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2013 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkValidationUtils_DEFINED
-#define SkValidationUtils_DEFINED
-
-#include "SkBitmap.h"
-#include "SkXfermode.h"
-
-/** Returns true if coeff's value is in the SkXfermode::Coeff enum.
- */
-static inline bool SkIsValidCoeff(SkXfermode::Coeff coeff) {
- return coeff >= 0 && coeff < SkXfermode::kCoeffCount;
-}
-
-/** Returns true if mode's value is in the SkXfermode::Mode enum.
- */
-static inline bool SkIsValidMode(SkXfermode::Mode mode) {
- return (mode >= 0) && (mode <= SkXfermode::kLastMode);
-}
-
-/** Returns true if config's value is in the SkBitmap::Config enum.
- */
-static inline bool SkIsValidConfig(SkBitmap::Config config) {
- return (config >= 0) && (config <= SkBitmap::kLastConfig);
-}
-
-/** Returns true if the rect's dimensions are between 0 and SK_MaxS32
- */
-static inline bool SkIsValidRect(const SkIRect& rect) {
- return rect.width() >= 0 && rect.height() >= 0;
-}
-
-/** Returns true if the rect's dimensions are between 0 and SK_ScalarMax
- */
-static inline bool SkIsValidRect(const SkRect& rect) {
- return !rect.isInverted() &&
- SkScalarIsFinite(rect.width()) &&
- SkScalarIsFinite(rect.height());
-}
-
-#endif