My clang now doesn't complain about !"foo".
authormtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 22 Aug 2013 15:37:26 +0000 (15:37 +0000)
committermtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 22 Aug 2013 15:37:26 +0000 (15:37 +0000)
BUG=
R=robertphillips@google.com

Review URL: https://codereview.chromium.org/22875037

git-svn-id: http://skia.googlecode.com/svn/trunk@10874 2bbb7eff-a529-9590-31e7-b0007b416f81

34 files changed:
bench/GradientBench.cpp
bench/benchmain.cpp
experimental/StrokePathRenderer/GrStrokePathRenderer.cpp
src/core/SkBitmapFilter.cpp
src/core/SkFontHost.cpp
src/core/SkPath.cpp
src/core/SkPathRef.h
src/core/SkPictureRecord.cpp
src/core/SkStrokeRec.cpp
src/device/xps/SkXPSDevice.cpp
src/doc/SkDocument.cpp
src/effects/SkDisplacementMapEffect.cpp
src/gpu/GrAtlas.cpp
src/gpu/GrDefaultPathRenderer.cpp
src/gpu/SkGrFontScaler.cpp
src/gpu/gl/GrGLProgram.cpp
src/gpu/gl/GrGLUtil.cpp
src/gpu/gl/GrGpuGL.cpp
src/gpu/gl/GrGpuGL_program.cpp
src/image/SkImagePriv.cpp
src/images/SkImageDecoder.cpp
src/pathops/SkPathOpsTypes.h
src/pdf/SkPDFUtils.h
src/utils/SkJSON.cpp
src/utils/SkLua.cpp
src/utils/SkPictureUtils.cpp
src/utils/ios/SkFontHost_iOS.mm
src/utils/ios/SkOSFile_iOS.mm
src/utils/win/SkDWriteGeometrySink.cpp
tests/AAClipTest.cpp
tests/ClampRangeTest.cpp
tests/PathTest.cpp
tools/flags/SkCommandLineFlags.cpp
tools/flags/SkCommandLineFlags.h

index b20fc9a65d036f0a4920aabe24f749e84303e845..773522e164bb8340e6b0b8fec0014faf57f44919 100644 (file)
@@ -137,7 +137,7 @@ static const char* tilemodename(SkShader::TileMode tm) {
         case SkShader::kMirror_TileMode:
             return "mirror";
         default:
-            SkASSERT(!"unknown tilemode");
+            SkDEBUGFAIL("unknown tilemode");
             return "error";
     }
 }
@@ -149,7 +149,7 @@ static const char* geomtypename(GeomType gt) {
         case kOval_GeomType:
             return "oval";
         default:
-            SkASSERT(!"unknown geometry type");
+            SkDEBUGFAIL("unknown geometry type");
             return "error";
     }
 }
index 9cb7468be0741f9ddb59ed14f6d49bd959b3059f..c2ba7f388ab90a02a16bccd311bf67a93f0e6168 100644 (file)
@@ -223,7 +223,7 @@ static SkDevice* make_device(SkBitmap::Config config, const SkIPoint& size,
 #endif
         case kPDF_Backend:
         default:
-            SkASSERT(!"unsupported");
+            SkDEBUGFAIL("unsupported");
     }
     return device;
 }
index 0b0ea60afabb18a7e074facc93a15fd8b22b5b61..fbfc7654bb213cf41334ea9d53e60c73a048f950 100644 (file)
@@ -266,7 +266,7 @@ bool GrStrokePathRenderer::onDrawPath(const SkPath& origPath,
                 break;
             case SkPath::kQuad_Verb:
             case SkPath::kCubic_Verb:
-                SkASSERT(!"Curves not supported!");
+                SkDEBUGFAIL("Curves not supported!");
             default:
                 // Unhandled cases
                 SkASSERT(false);
@@ -283,7 +283,7 @@ bool GrStrokePathRenderer::onDrawPath(const SkPath& origPath,
                 lastPt [1] += dir;
                 break;
             case SkPaint::kRound_Cap:
-                SkASSERT(!"Round caps not supported!");
+                SkDEBUGFAIL("Round caps not supported!");
             default: // No cap
                 break;
         }
index c2f68d4879a5ee965449dccf3cc7e8b8b50e919b..5128d9b5dc7a3843508db023dd0811b90ce1eea9 100644 (file)
@@ -92,7 +92,7 @@ SkBitmapFilter *SkBitmapFilter::Allocate() {
     } else if (!strcmp(c_bitmapFilter, "box")) {
         return SkNEW(SkBoxFilter);
     } else {
-        SkASSERT(!!!"Unknown filter type");
+        SkDEBUGFAIL("Unknown filter type");
     }
 
     return NULL;
index 0a65e6f3c9497a90fd2dd427ed1ba83b51d2a866..ed5a3e5ce189891f7600dd53c62b1a8a0a836d3c 100644 (file)
@@ -74,10 +74,10 @@ class SkEmptyFontStyleSet : public SkFontStyleSet {
 public:
     virtual int count() SK_OVERRIDE { return 0; }
     virtual void getStyle(int, SkFontStyle*, SkString*) SK_OVERRIDE {
-        SkASSERT(!"SkFontStyleSet::getStyle called on empty set");
+        SkDEBUGFAIL("SkFontStyleSet::getStyle called on empty set");
     }
     virtual SkTypeface* createTypeface(int index) SK_OVERRIDE {
-        SkASSERT(!"SkFontStyleSet::createTypeface called on empty set");
+        SkDEBUGFAIL("SkFontStyleSet::createTypeface called on empty set");
         return NULL;
     }
     virtual SkTypeface* matchStyle(const SkFontStyle&) SK_OVERRIDE {
@@ -99,10 +99,10 @@ protected:
         return 0;
     }
     virtual void onGetFamilyName(int index, SkString* familyName) SK_OVERRIDE {
-        SkASSERT(!"onGetFamilyName called with bad index");
+        SkDEBUGFAIL("onGetFamilyName called with bad index");
     }
     virtual SkFontStyleSet* onCreateStyleSet(int index) SK_OVERRIDE {
-        SkASSERT(!"onCreateStyleSet called with bad index");
+        SkDEBUGFAIL("onCreateStyleSet called with bad index");
         return NULL;
     }
     virtual SkFontStyleSet* onMatchFamily(const char[]) SK_OVERRIDE {
index 47fa5524658b5d8e1f7fbeb51f37c1f00cac95de..ef872dc39aff78160a55fc4e2a5178903b6112b3 100644 (file)
@@ -514,7 +514,7 @@ bool SkPath::isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts
                 closedOrMoved = true;
                 break;
             default:
-                SkASSERT(!"unexpected verb");
+                SkDEBUGFAIL("unexpected verb");
                 break;
         }
         *currVerb += 1;
@@ -858,7 +858,7 @@ void SkPath::close() {
                 // don't add a close if it's the first verb or a repeat
                 break;
             default:
-                SkASSERT(!"unexpected verb");
+                SkDEBUGFAIL("unexpected verb");
                 break;
         }
     }
@@ -1594,7 +1594,7 @@ void SkPath::reverseAddPath(const SkPath& src) {
                 needClose = true;
                 break;
             default:
-                SkASSERT(!"unexpected verb");
+                SkDEBUGFAIL("unexpected verb");
         }
     }
 }
@@ -1662,7 +1662,7 @@ void SkPath::transform(const SkMatrix& matrix, SkPath* dst) const {
                     subdivide_quad_to(&tmp, pts);
                     break;
                 case kConic_Verb:
-                    SkASSERT(!"TODO: compute new weight");
+                    SkDEBUGFAIL("TODO: compute new weight");
                     tmp.conicTo(pts[1], pts[2], iter.conicWeight());
                     break;
                 case kCubic_Verb:
@@ -2498,7 +2498,7 @@ void ContourIter::next() {
             case SkPath::kClose_Verb:
                 break;
             default:
-                SkASSERT(!"unexpected verb");
+                SkDEBUGFAIL("unexpected verb");
                 break;
         }
     }
index cff75b640a301cf58353152da340a7b22cb38fea..b789de8c07471efffcd70b484abf690afa442fc0 100644 (file)
@@ -424,10 +424,10 @@ private:
                 pCnt = 0;
                 break;
             case SkPath::kDone_Verb:
-                SkASSERT(!"growForVerb called for kDone");
+                SkDEBUGFAIL("growForVerb called for kDone");
                 // fall through
             default:
-                SkASSERT(!"default is not reached");
+                SkDEBUGFAIL("default is not reached");
                 pCnt = 0;
         }
         size_t space = sizeof(uint8_t) + pCnt * sizeof (SkPoint);
index 0ec9eaf74d0c812b01bea81893d39ff61fb94d80..309b8a883fbc3c71c37cc9e01acdaff4d07ec394 100644 (file)
@@ -139,7 +139,7 @@ static inline uint32_t getPaintOffset(DrawType op, uint32_t opSize) {
 }
 
 SkDevice* SkPictureRecord::setDevice(SkDevice* device) {
-    SkASSERT(!"eeek, don't try to change the device on a recording canvas");
+    SkDEBUGFAIL("eeek, don't try to change the device on a recording canvas");
     return this->INHERITED::setDevice(device);
 }
 
index cdaf241366195da1cf8c7fa4523f99908c17a234..ce744e501b8cfebe07688ba6dc35d556b8b0540d 100644 (file)
@@ -44,7 +44,7 @@ SkStrokeRec::SkStrokeRec(const SkPaint& paint) {
             }
             break;
         default:
-            SkASSERT(!"unknown paint style");
+            SkDEBUGFAIL("unknown paint style");
             // fall back on just fill
             fWidth = kStrokeRec_FillStyleWidth;
             fStrokeAndFill = false;
index 442a51f507f4b751a8fd22ee76914abe99aa1c10..79bb6efe26b691d3fdc2066644d37a3a4431a593 100644 (file)
@@ -476,7 +476,7 @@ static XPS_SPREAD_METHOD xps_spread_method(SkShader::TileMode tileMode) {
     case SkShader::kMirror_TileMode:
         return XPS_SPREAD_METHOD_REFLECT;
     default:
-        SkASSERT(!"Unknown tile mode.");
+        SkDEBUGFAIL("Unknown tile mode.");
     }
     return XPS_SPREAD_METHOD_PAD;
 }
@@ -1370,7 +1370,7 @@ HRESULT SkXPSDevice::addXpsPathGeometry(
                 // the corresponding line/quad/cubic verbs
                 break;
             default:
-                SkASSERT(!"unexpected verb");
+                SkDEBUGFAIL("unexpected verb");
                 break;
         }
     }
@@ -1879,7 +1879,7 @@ void SkXPSDevice::drawPath(const SkDraw& d,
             break;
         }
         default:
-            SkASSERT(!"Unknown SkPath::FillType.");
+            SkDEBUGFAIL("Unknown SkPath::FillType.");
     }
     HRVM(shadedGeometry->SetFillRule(xpsFillRule),
          "Could not set fill rule for shaded path.");
@@ -2125,7 +2125,7 @@ HRESULT SkXPSDevice::AddGlyphs(const SkDraw& d,
                 "Could not set transform matrix.");
             useCanvasForClip = true;
         } else {
-            SkASSERT(!"Attempt to add glyphs in perspective.");
+            SkDEBUGFAIL("Attempt to add glyphs in perspective.");
             useCanvasForClip = false;
         }
     }
index e94c89bbeb7aab627a7eb9d798d69ec1640b3e8f..055c749792bb29c4de263c8e55f96d80b4ee08ab 100644 (file)
@@ -49,7 +49,7 @@ SkCanvas* SkDocument::beginPage(SkScalar width, SkScalar height,
                 return NULL;
         }
     }
-    SkASSERT(!"never get here");
+    SkDEBUGFAIL("never get here");
     return NULL;
 }
 
index dad0623d2f29308af983427d11560eae8cfcd287..6a3abb5a3c5e28547eb5bdbb2bece4eafeb077e2 100644 (file)
@@ -21,7 +21,7 @@ namespace {
 
 template<SkDisplacementMapEffect::ChannelSelectorType type>
 uint32_t getValue(SkColor, const SkUnPreMultiply::Scale*) {
-    SkASSERT(!"Unknown channel selector");
+    SkDEBUGFAIL("Unknown channel selector");
     return 0;
 }
 
@@ -97,7 +97,7 @@ void computeDisplacement(SkDisplacementMapEffect::ChannelSelectorType yChannelSe
         break;
       case SkDisplacementMapEffect::kUnknown_ChannelSelectorType:
       default:
-        SkASSERT(!"Unknown Y channel selector");
+        SkDEBUGFAIL("Unknown Y channel selector");
     }
 }
 
@@ -124,7 +124,7 @@ void computeDisplacement(SkDisplacementMapEffect::ChannelSelectorType xChannelSe
         break;
       case SkDisplacementMapEffect::kUnknown_ChannelSelectorType:
       default:
-        SkASSERT(!"Unknown X channel selector");
+        SkDEBUGFAIL("Unknown X channel selector");
     }
 }
 
@@ -456,7 +456,7 @@ void GrGLDisplacementMapEffect::emitCode(GrGLShaderBuilder* builder,
         break;
       case SkDisplacementMapEffect::kUnknown_ChannelSelectorType:
       default:
-        SkASSERT(!"Unknown X channel selector");
+        SkDEBUGFAIL("Unknown X channel selector");
     }
 
     switch (fYChannelSelector) {
@@ -474,7 +474,7 @@ void GrGLDisplacementMapEffect::emitCode(GrGLShaderBuilder* builder,
         break;
       case SkDisplacementMapEffect::kUnknown_ChannelSelectorType:
       default:
-        SkASSERT(!"Unknown Y channel selector");
+        SkDEBUGFAIL("Unknown Y channel selector");
     }
     builder->fsCodeAppend("-vec2(0.5));\t\t");
 
index 9184929efc9e1bc034b3f7028989d766b57cd96c..9776326f953c71fa03e8b0486ac7d6ea694c3ee7 100644 (file)
@@ -189,7 +189,7 @@ static GrPixelConfig maskformat2pixelconfig(GrMaskFormat format) {
         case kA888_GrMaskFormat:
             return kSkia8888_GrPixelConfig;
         default:
-            SkASSERT(!"unknown maskformat");
+            SkDEBUGFAIL("unknown maskformat");
     }
     return kUnknown_GrPixelConfig;
 }
index 1f33e95a77040d7249ddadf2d41e569b36d30345..bd52ce1f95dbacead7a12fe70f41b0ac6fceb411 100644 (file)
@@ -441,7 +441,7 @@ bool GrDefaultPathRenderer::internalDrawPath(const SkPath& path,
                     }
                     break;
                 default:
-                    SkASSERT(!"Unknown path fFill!");
+                    SkDEBUGFAIL("Unknown path fFill!");
                     return false;
             }
         }
index aeddd280e7d5bba109715555ed26d1406da8bab2..c48e633fd0a4cd09dbb0b06c06ccf5fe8a5775ae 100644 (file)
@@ -88,7 +88,7 @@ GrMaskFormat SkGrFontScaler::getMaskFormat() {
         case SkMask::kLCD32_Format:
             return kA888_GrMaskFormat;
         default:
-            SkASSERT(!"unsupported SkMask::Format");
+            SkDEBUGFAIL("unsupported SkMask::Format");
             return kA8_GrMaskFormat;
     }
 }
index f1bb1f3a1adc09f0918be5ade57a6da35534e0ac..83ab232810967d2cb91f9a1844f453e0289ff103 100644 (file)
@@ -364,7 +364,7 @@ GrGLuint compile_shader(const GrGLContext& gl,
             print_shader(stringCnt, strings, stringLengths);
             GrPrintf("\n%s", log.get());
         }
-        SkASSERT(!"Shader compilation failed!");
+        SkDEBUGFAIL("Shader compilation failed!");
         GR_GL_CALL(gli, DeleteShader(shader));
         return 0;
     }
@@ -742,7 +742,7 @@ bool GrGLProgram::bindOutputsAttribsAndLinkProgram(const GrGLShaderBuilder& buil
                                       (char*)log.get()));
             GrPrintf((char*)log.get());
         }
-        SkASSERT(!"Error linking program");
+        SkDEBUGFAIL("Error linking program");
         GL_CALL(DeleteProgram(fProgramID));
         fProgramID = 0;
         return false;
index 99efeaf6a6e84d075f8db0f54e8a60e9ea45e842..422f0c321a8be913b0bcbdef2051c2dacbb6a25d 100644 (file)
@@ -93,7 +93,7 @@ bool get_gl_version_for_mesa(int mesaMajorVersion, int* major, int* minor) {
 
 GrGLBinding GrGLGetBindingInUseFromString(const char* versionString) {
     if (NULL == versionString) {
-        SkASSERT(!"NULL GL version string.");
+        SkDEBUGFAIL("NULL GL version string.");
         return kNone_GrGLBinding;
     }
 
@@ -129,7 +129,7 @@ bool GrGLIsMesaFromVersionString(const char* versionString) {
 
 GrGLVersion GrGLGetVersionFromString(const char* versionString) {
     if (NULL == versionString) {
-        SkASSERT(!"NULL GL version string.");
+        SkDEBUGFAIL("NULL GL version string.");
         return 0;
     }
 
@@ -168,7 +168,7 @@ GrGLVersion GrGLGetVersionFromString(const char* versionString) {
 
 GrGLSLVersion GrGLGetGLSLVersionFromString(const char* versionString) {
     if (NULL == versionString) {
-        SkASSERT(!"NULL GLSL version string.");
+        SkDEBUGFAIL("NULL GLSL version string.");
         return 0;
     }
 
index 685d4e8e875e83e10181d8dca5bb8552dde81442..7a1f4be3fd9f4b1a4fa7a010bc028628a012fbf5 100644 (file)
@@ -891,7 +891,7 @@ FAILED:
 
 // good to set a break-point here to know when createTexture fails
 static GrTexture* return_null_texture() {
-//    SkASSERT(!"null texture");
+//    SkDEBUGFAIL("null texture");
     return NULL;
 }
 
index 7ead7b74b0f036d9858aeafbd78bb9d7c3c05952..5548320631d8bcce3b209c3250df050671858658 100644 (file)
@@ -291,7 +291,7 @@ bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC
                                                         colorStages.begin(),
                                                         coverageStages.begin()));
         if (NULL == fCurrentProgram.get()) {
-            SkASSERT(!"Failed to create program!");
+            SkDEBUGFAIL("Failed to create program!");
             return false;
         }
         fCurrentProgram.get()->ref();
index ca4a12cdcf42cfa882c81e765fde91f82e4f901e..945427237388d86e6ea901edd1addcb7de6eba9e 100644 (file)
@@ -54,7 +54,7 @@ SkBitmap::Config SkImageInfoToBitmapConfig(const SkImage::Info& info,
             }
             break;
     }
-    SkASSERT(!"how did we get here");
+    SkDEBUGFAIL("how did we get here");
     return SkBitmap::kNo_Config;
 }
 
index a671607ef36f811695fd8fbe4831749a294634d6..7c4c477e078c40fbb584da79590e775a30229775 100644 (file)
@@ -94,7 +94,7 @@ const char* SkImageDecoder::GetFormatName(Format format) {
         case kWEBP_Format:
             return "WEBP";
         default:
-            SkASSERT(!"Invalid format type!");
+            SkDEBUGFAIL("Invalid format type!");
     }
     return "Unknown Format";
 }
@@ -433,7 +433,7 @@ bool SkImageDecoder::DecodeMemoryToTarget(const void* buffer, size_t size,
 
     if (target->fRowBytes != SkToU32(bm.rowBytes())) {
         if (target->fRowBytes < SkImageMinRowBytes(*info)) {
-            SkASSERT(!"Desired row bytes is too small");
+            SkDEBUGFAIL("Desired row bytes is too small");
             return false;
         }
         bm.setConfig(bm.config(), bm.width(), bm.height(), target->fRowBytes);
index 6158f13576081c3eb089f3c56ebfba105109fefd..19e3efadd1b1f0a89dd0979a2b5a10b051711e07 100644 (file)
@@ -227,7 +227,7 @@ inline SkPath::Verb SkPathOpsPointsToVerb(int points) {
         case 1: SkASSERT(SkPath::kLine_Verb == verb); break;
         case 2: SkASSERT(SkPath::kQuad_Verb == verb); break;
         case 3: SkASSERT(SkPath::kCubic_Verb == verb); break;
-        default: SkASSERT(!"should not be here");
+        default: SkDEBUGFAIL("should not be here");
     }
 #endif
     return (SkPath::Verb)verb;
@@ -240,7 +240,7 @@ inline int SkPathOpsVerbToPoints(SkPath::Verb verb) {
         case SkPath::kLine_Verb: SkASSERT(1 == points); break;
         case SkPath::kQuad_Verb: SkASSERT(2 == points); break;
         case SkPath::kCubic_Verb: SkASSERT(3 == points); break;
-        default: SkASSERT(!"should not get here");
+        default: SkDEBUGFAIL("should not get here");
     }
 #endif
     return points;
index 4f54db6688b81a3c1baa14018f7cb526ba59aed7..b30821dcd926025062ad3a8c08d1df575a6e1330 100644 (file)
@@ -27,7 +27,7 @@ class SkWStream;
 
 #define NOT_IMPLEMENTED(condition, assert)                         \
     do {                                                           \
-        if (condition) {                                           \
+        if ((bool)(condition)) {                                   \
             PRINT_NOT_IMPL("NOT_IMPLEMENTED: " #condition "\n");   \
             SkDEBUGCODE(SkASSERT(!assert);)                        \
         }                                                          \
index 9b122082021fee0727e659797e644cc471a991c9..1aedf58d8b6c1dec8369fea8885d2e4be28a80aa 100644 (file)
@@ -414,7 +414,7 @@ void SkJSON::Object::dumpLevel(int level) const {
                 SkDebugf("%s", slot->fValue.fBool ? "true" : "false");
                 break;
             default:
-                SkASSERT(!"how did I get here");
+                SkDEBUGFAIL("how did I get here");
                 break;
         }
         if (slot->fNext) {
@@ -490,7 +490,7 @@ void SkJSON::Array::dumpLevel(int level) const {
             SkDebugf(" %s ", fArray.fInts[last] ? "true" : "false");
         } break;
         default:
-            SkASSERT(!"unsupported array type");
+            SkDEBUGFAIL("unsupported array type");
             break;
     }
 }
index 427093b2e71dc23db3611a56b071df5b9afb7fca..767e1772299ef1d2ef32ad37663f549d610dacc8 100644 (file)
@@ -906,7 +906,7 @@ static const char* rrect_type(const SkRRect& rr) {
         case SkRRect::kSimple_Type: return "simple";
         case SkRRect::kComplex_Type: return "complex";
     }
-    SkASSERT(!"never get here");
+    SkDEBUGFAIL("never get here");
     return "";
 }
 
index 87a4057ebd24e555b6d0ce7a80430ba197f2058a..45d3f1b23a19658850883441465847cc1d3600b2 100644 (file)
@@ -37,7 +37,7 @@ private:
 };
 
 static void not_supported() {
-    SkASSERT(!"this method should never be called");
+    SkDEBUGFAIL("this method should never be called");
 }
 
 static void nothing_to_do() {}
index 60f111c84e474c2857c7001f0e01bb9eed980ba5..ae75165a4e0f73b8e59d49f3286476bc041a4cf3 100755 (executable)
@@ -172,12 +172,12 @@ SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace,
 }
 
 SkTypeface* SkFontHost::CreateTypefaceFromStream(SkStream* stream) {
-    SkASSERT(!"SkFontHost::CreateTypeface unimplemented");
+    SkDEBUGFAIL("SkFontHost::CreateTypeface unimplemented");
     return NULL;
 }
 
 SkTypeface* SkFontHost::CreateTypefaceFromFile(char const*) {
-//    SkASSERT(!"SkFontHost::CreateTypefaceFromFile unimplemented");
+//    SkDEBUGFAIL("SkFontHost::CreateTypefaceFromFile unimplemented");
     return NULL;
 }
 
@@ -198,7 +198,7 @@ size_t SkFontHost::GetFileName(SkFontID fontID, char path[], size_t length,
 ///////////////////////////////////////////////////////////////////////////////
 
 void SkFontHost::Serialize(const SkTypeface* face, SkWStream* stream) {
-    SkASSERT(!"SkFontHost::Serialize unimplemented");
+    SkDEBUGFAIL("SkFontHost::Serialize unimplemented");
 }
 
 SkTypeface* SkFontHost::Deserialize(SkStream* stream) {
@@ -249,7 +249,7 @@ void SkFontHost::GetGammaTables(const uint8_t* tables[2]) {
 SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics(
                                                                   uint32_t fontID,
                                                                   SkAdvancedTypefaceMetrics::PerGlyphInfo perGlyphInfo) {
-    SkASSERT(!"SkFontHost::GetAdvancedTypefaceMetrics unimplemented");
+    SkDEBUGFAIL("SkFontHost::GetAdvancedTypefaceMetrics unimplemented");
     return NULL;
 }
 
@@ -257,6 +257,6 @@ void SkFontHost::FilterRec(SkScalerContext::Rec* rec, SkTypeface*) {
 }
 
 SkScalerContext* SkFontHost::CreateScalerContext(const SkDescriptor* desc) {
-    SkASSERT(!"SkFontHost::CreateScalarContext unimplemented");
+    SkDEBUGFAIL("SkFontHost::CreateScalarContext unimplemented");
     return NULL;
 }
\ No newline at end of file
index a68576130903aa6e1f4bf3491e454668b6de3070..e38ecfdab4deaab4e6bbd5486f7f1a012fc6a3f9 100755 (executable)
@@ -82,12 +82,12 @@ size_t sk_fread(void* buffer, size_t byteCount, SkFILE* rec) {
 }
 
 size_t sk_fwrite(const void* buffer, size_t byteCount, SkFILE* f) {
-    SkASSERT(!"Not supported yet");
+    SkDEBUGFAIL("Not supported yet");
     return 0;
 }
 
 void sk_fflush(SkFILE* f) {
-    SkASSERT(!"Not supported yet");
+    SkDEBUGFAIL("Not supported yet");
 }
 
 void sk_fclose(SkFILE* rec) {
index 5455e669ef6d992714b252391cc3a789fc2250a3..a12b514f7efc6b0c492d82abb67ddf9cc2bcc350 100644 (file)
@@ -53,21 +53,21 @@ void STDMETHODCALLTYPE SkDWriteGeometrySink::SetFillMode(D2D1_FILL_MODE fillMode
         fPath->setFillType(SkPath::kWinding_FillType);
         break;
     default:
-        SkASSERT(!"Unknown D2D1_FILL_MODE.");
+        SkDEBUGFAIL("Unknown D2D1_FILL_MODE.");
         break;
     }
 }
 
 void STDMETHODCALLTYPE SkDWriteGeometrySink::SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags) {
     if (vertexFlags == D2D1_PATH_SEGMENT_NONE || vertexFlags == D2D1_PATH_SEGMENT_FORCE_ROUND_LINE_JOIN) {
-        SkASSERT(!"Invalid D2D1_PATH_SEGMENT value.");
+        SkDEBUGFAIL("Invalid D2D1_PATH_SEGMENT value.");
     }
 }
 
 void STDMETHODCALLTYPE SkDWriteGeometrySink::BeginFigure(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin) {
     fPath->moveTo(SkFloatToScalar(startPoint.x), SkFloatToScalar(startPoint.y));
     if (figureBegin == D2D1_FIGURE_BEGIN_HOLLOW) {
-        SkASSERT(!"Invalid D2D1_FIGURE_BEGIN value.");
+        SkDEBUGFAIL("Invalid D2D1_FIGURE_BEGIN value.");
     }
 }
 
index 4c4ee60d0c67a15b1cdd87b6538a1763280bb273..b50757038a6d31e376509bff770ff2f67c90d649 100644 (file)
@@ -39,7 +39,7 @@ static bool operator==(const SkMask& a, const SkMask& b) {
             wbytes <<= 2;
             break;
         default:
-            SkASSERT(!"unknown mask format");
+            SkDEBUGFAIL("unknown mask format");
             return false;
     }
 
index dc520711a3fc5c8c5ae2f8ad72d983e8bea9e008..2462725a08202fa6170f1bdb1b965a229577bf2d 100644 (file)
@@ -65,7 +65,7 @@ static void slow_check(const SkClampRange& range,
         }
         if (range.fCount1 > 0 && fx != range.fFx1) {
             SkDebugf("%x %x\n", fx, range.fFx1);
-            R_ASSERT(!"bad fFx1");
+            R_ASSERT(false); // bad fFx1
             return;
         }
         for (i = 0; i < range.fCount1; i++) {
index e6795d63c5909bb370a5080d0b96d0e87c34e24c..ed80d41aa2f4c999f02a8a4513ec989085ed060d 100644 (file)
@@ -568,13 +568,13 @@ static void test_poly(skiatest::Reporter* reporter, const SkPath& path,
                 srcPts++;
                 break;
             case SkPath::kQuad_Verb:
-                REPORTER_ASSERT(reporter, !"unexpected quad verb");
+                REPORTER_ASSERT_MESSAGE(reporter, false, "unexpected quad verb");
                 break;
             case SkPath::kConic_Verb:
-                REPORTER_ASSERT(reporter, !"unexpected conic verb");
+                REPORTER_ASSERT_MESSAGE(reporter, false, "unexpected conic verb");
                 break;
             case SkPath::kCubic_Verb:
-                REPORTER_ASSERT(reporter, !"unexpected cubic verb");
+                REPORTER_ASSERT_MESSAGE(reporter, false, "unexpected cubic verb");
                 break;
             case SkPath::kClose_Verb:
                 REPORTER_ASSERT(reporter, !firstTime);
@@ -2117,7 +2117,7 @@ static void test_raw_iter(skiatest::Reporter* reporter) {
                     lastWasClose = true;
                     break;
                 default:
-                    SkASSERT(!"unexpected verb");
+                    SkDEBUGFAIL("unexpected verb");
             }
             expectedVerbs[numIterVerbs++] = nextVerb;
         }
@@ -2170,7 +2170,7 @@ static void test_raw_iter(skiatest::Reporter* reporter) {
                     lastPt = lastMoveTo;
                     break;
                 default:
-                    SkASSERT(!"unexpected verb");
+                    SkDEBUGFAIL("unexpected verb");
             }
         }
         REPORTER_ASSERT(reporter, numIterPts == numPoints);
index b088b4e4d38ec6675bd4c64c3b779b0cc5313975..084f48a8aab254f3a3e8cd496b547725bd7532a1 100644 (file)
@@ -278,7 +278,7 @@ void SkCommandLineFlags::Parse(int argc, char** argv) {
                             flag->setDouble(atof(argv[i]));
                             break;
                         default:
-                            SkASSERT(!"Invalid flag type");
+                            SkDEBUGFAIL("Invalid flag type");
                     }
                     break;
                 }
index 51af9334677b2c2f2ba458d152a785a634e76835..b0199f67173020357951a757fe97c866b0cebf08 100644 (file)
@@ -304,7 +304,7 @@ public:
         if (kString_FlagType == fFlagType) {
             fStrings->reset();
         } else {
-            SkASSERT(!"Can only call resetStrings on kString_FlagType");
+            SkDEBUGFAIL("Can only call resetStrings on kString_FlagType");
         }
     }
 
@@ -312,7 +312,7 @@ public:
         if (kString_FlagType == fFlagType) {
             fStrings->append(string);
         } else {
-            SkASSERT(!"Can only append to kString_FlagType");
+            SkDEBUGFAIL("Can only append to kString_FlagType");
         }
     }
 
@@ -320,7 +320,7 @@ public:
         if (kInt_FlagType == fFlagType) {
             *fIntValue = value;
         } else {
-            SkASSERT(!"Can only call setInt on kInt_FlagType");
+            SkDEBUGFAIL("Can only call setInt on kInt_FlagType");
         }
     }
 
@@ -328,7 +328,7 @@ public:
         if (kDouble_FlagType == fFlagType) {
             *fDoubleValue = value;
         } else {
-            SkASSERT(!"Can only call setDouble on kDouble_FlagType");
+            SkDEBUGFAIL("Can only call setDouble on kDouble_FlagType");
         }
     }
 
@@ -336,7 +336,7 @@ public:
         if (kBool_FlagType == fFlagType) {
             *fBoolValue = value;
         } else {
-            SkASSERT(!"Can only call setBool on kBool_FlagType");
+            SkDEBUGFAIL("Can only call setBool on kBool_FlagType");
         }
     }
 
@@ -363,7 +363,7 @@ public:
                 result.printf("%2.2f", fDefaultDouble);
                 break;
             default:
-                SkASSERT(!"Invalid flag type");
+                SkDEBUGFAIL("Invalid flag type");
         }
         return result;
     }
@@ -379,7 +379,7 @@ public:
             case SkFlagInfo::kDouble_FlagType:
                 return SkString("double");
             default:
-                SkASSERT(!"Invalid flag type");
+                SkDEBUGFAIL("Invalid flag type");
                 return SkString();
         }
     }