aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bench/GradientBench.cpp4
-rw-r--r--bench/benchmain.cpp2
-rw-r--r--experimental/StrokePathRenderer/GrStrokePathRenderer.cpp4
-rw-r--r--src/core/SkBitmapFilter.cpp2
-rw-r--r--src/core/SkFontHost.cpp8
-rw-r--r--src/core/SkPath.cpp10
-rw-r--r--src/core/SkPathRef.h4
-rw-r--r--src/core/SkPictureRecord.cpp2
-rw-r--r--src/core/SkStrokeRec.cpp2
-rw-r--r--src/device/xps/SkXPSDevice.cpp8
-rw-r--r--src/doc/SkDocument.cpp2
-rw-r--r--src/effects/SkDisplacementMapEffect.cpp10
-rw-r--r--src/gpu/GrAtlas.cpp2
-rw-r--r--src/gpu/GrDefaultPathRenderer.cpp2
-rw-r--r--src/gpu/SkGrFontScaler.cpp2
-rw-r--r--src/gpu/gl/GrGLProgram.cpp4
-rw-r--r--src/gpu/gl/GrGLUtil.cpp6
-rw-r--r--src/gpu/gl/GrGpuGL.cpp2
-rw-r--r--src/gpu/gl/GrGpuGL_program.cpp2
-rw-r--r--src/image/SkImagePriv.cpp2
-rw-r--r--src/images/SkImageDecoder.cpp4
-rw-r--r--src/pathops/SkPathOpsTypes.h4
-rw-r--r--src/pdf/SkPDFUtils.h2
-rw-r--r--src/utils/SkJSON.cpp4
-rw-r--r--src/utils/SkLua.cpp2
-rw-r--r--src/utils/SkPictureUtils.cpp2
-rwxr-xr-xsrc/utils/ios/SkFontHost_iOS.mm10
-rwxr-xr-xsrc/utils/ios/SkOSFile_iOS.mm4
-rw-r--r--src/utils/win/SkDWriteGeometrySink.cpp6
-rw-r--r--tests/AAClipTest.cpp2
-rw-r--r--tests/ClampRangeTest.cpp2
-rw-r--r--tests/PathTest.cpp10
-rw-r--r--tools/flags/SkCommandLineFlags.cpp2
-rw-r--r--tools/flags/SkCommandLineFlags.h14
34 files changed, 74 insertions, 74 deletions
diff --git a/bench/GradientBench.cpp b/bench/GradientBench.cpp
index b20fc9a65d..773522e164 100644
--- a/bench/GradientBench.cpp
+++ b/bench/GradientBench.cpp
@@ -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";
}
}
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index 9cb7468be0..c2ba7f388a 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -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;
}
diff --git a/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp b/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp
index 0b0ea60afa..fbfc7654bb 100644
--- a/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp
+++ b/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp
@@ -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;
}
diff --git a/src/core/SkBitmapFilter.cpp b/src/core/SkBitmapFilter.cpp
index c2f68d4879..5128d9b5dc 100644
--- a/src/core/SkBitmapFilter.cpp
+++ b/src/core/SkBitmapFilter.cpp
@@ -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;
diff --git a/src/core/SkFontHost.cpp b/src/core/SkFontHost.cpp
index 0a65e6f3c9..ed5a3e5ce1 100644
--- a/src/core/SkFontHost.cpp
+++ b/src/core/SkFontHost.cpp
@@ -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 {
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 47fa552465..ef872dc39a 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -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;
}
}
diff --git a/src/core/SkPathRef.h b/src/core/SkPathRef.h
index cff75b640a..b789de8c07 100644
--- a/src/core/SkPathRef.h
+++ b/src/core/SkPathRef.h
@@ -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);
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 0ec9eaf74d..309b8a883f 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -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);
}
diff --git a/src/core/SkStrokeRec.cpp b/src/core/SkStrokeRec.cpp
index cdaf241366..ce744e501b 100644
--- a/src/core/SkStrokeRec.cpp
+++ b/src/core/SkStrokeRec.cpp
@@ -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;
diff --git a/src/device/xps/SkXPSDevice.cpp b/src/device/xps/SkXPSDevice.cpp
index 442a51f507..79bb6efe26 100644
--- a/src/device/xps/SkXPSDevice.cpp
+++ b/src/device/xps/SkXPSDevice.cpp
@@ -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;
}
}
diff --git a/src/doc/SkDocument.cpp b/src/doc/SkDocument.cpp
index e94c89bbeb..055c749792 100644
--- a/src/doc/SkDocument.cpp
+++ b/src/doc/SkDocument.cpp
@@ -49,7 +49,7 @@ SkCanvas* SkDocument::beginPage(SkScalar width, SkScalar height,
return NULL;
}
}
- SkASSERT(!"never get here");
+ SkDEBUGFAIL("never get here");
return NULL;
}
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index dad0623d2f..6a3abb5a3c 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -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");
diff --git a/src/gpu/GrAtlas.cpp b/src/gpu/GrAtlas.cpp
index 9184929efc..9776326f95 100644
--- a/src/gpu/GrAtlas.cpp
+++ b/src/gpu/GrAtlas.cpp
@@ -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;
}
diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp
index 1f33e95a77..bd52ce1f95 100644
--- a/src/gpu/GrDefaultPathRenderer.cpp
+++ b/src/gpu/GrDefaultPathRenderer.cpp
@@ -441,7 +441,7 @@ bool GrDefaultPathRenderer::internalDrawPath(const SkPath& path,
}
break;
default:
- SkASSERT(!"Unknown path fFill!");
+ SkDEBUGFAIL("Unknown path fFill!");
return false;
}
}
diff --git a/src/gpu/SkGrFontScaler.cpp b/src/gpu/SkGrFontScaler.cpp
index aeddd280e7..c48e633fd0 100644
--- a/src/gpu/SkGrFontScaler.cpp
+++ b/src/gpu/SkGrFontScaler.cpp
@@ -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;
}
}
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index f1bb1f3a1a..83ab232810 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -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;
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp
index 99efeaf6a6..422f0c321a 100644
--- a/src/gpu/gl/GrGLUtil.cpp
+++ b/src/gpu/gl/GrGLUtil.cpp
@@ -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;
}
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 685d4e8e87..7a1f4be3fd 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -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;
}
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index 7ead7b74b0..5548320631 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -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();
diff --git a/src/image/SkImagePriv.cpp b/src/image/SkImagePriv.cpp
index ca4a12cdcf..9454272373 100644
--- a/src/image/SkImagePriv.cpp
+++ b/src/image/SkImagePriv.cpp
@@ -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;
}
diff --git a/src/images/SkImageDecoder.cpp b/src/images/SkImageDecoder.cpp
index a671607ef3..7c4c477e07 100644
--- a/src/images/SkImageDecoder.cpp
+++ b/src/images/SkImageDecoder.cpp
@@ -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);
diff --git a/src/pathops/SkPathOpsTypes.h b/src/pathops/SkPathOpsTypes.h
index 6158f13576..19e3efadd1 100644
--- a/src/pathops/SkPathOpsTypes.h
+++ b/src/pathops/SkPathOpsTypes.h
@@ -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;
diff --git a/src/pdf/SkPDFUtils.h b/src/pdf/SkPDFUtils.h
index 4f54db6688..b30821dcd9 100644
--- a/src/pdf/SkPDFUtils.h
+++ b/src/pdf/SkPDFUtils.h
@@ -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);) \
} \
diff --git a/src/utils/SkJSON.cpp b/src/utils/SkJSON.cpp
index 9b12208202..1aedf58d8b 100644
--- a/src/utils/SkJSON.cpp
+++ b/src/utils/SkJSON.cpp
@@ -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;
}
}
diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp
index 427093b2e7..767e177229 100644
--- a/src/utils/SkLua.cpp
+++ b/src/utils/SkLua.cpp
@@ -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 "";
}
diff --git a/src/utils/SkPictureUtils.cpp b/src/utils/SkPictureUtils.cpp
index 87a4057ebd..45d3f1b23a 100644
--- a/src/utils/SkPictureUtils.cpp
+++ b/src/utils/SkPictureUtils.cpp
@@ -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() {}
diff --git a/src/utils/ios/SkFontHost_iOS.mm b/src/utils/ios/SkFontHost_iOS.mm
index 60f111c84e..ae75165a4e 100755
--- a/src/utils/ios/SkFontHost_iOS.mm
+++ b/src/utils/ios/SkFontHost_iOS.mm
@@ -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
diff --git a/src/utils/ios/SkOSFile_iOS.mm b/src/utils/ios/SkOSFile_iOS.mm
index a685761309..e38ecfdab4 100755
--- a/src/utils/ios/SkOSFile_iOS.mm
+++ b/src/utils/ios/SkOSFile_iOS.mm
@@ -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) {
diff --git a/src/utils/win/SkDWriteGeometrySink.cpp b/src/utils/win/SkDWriteGeometrySink.cpp
index 5455e669ef..a12b514f7e 100644
--- a/src/utils/win/SkDWriteGeometrySink.cpp
+++ b/src/utils/win/SkDWriteGeometrySink.cpp
@@ -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.");
}
}
diff --git a/tests/AAClipTest.cpp b/tests/AAClipTest.cpp
index 4c4ee60d0c..b50757038a 100644
--- a/tests/AAClipTest.cpp
+++ b/tests/AAClipTest.cpp
@@ -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;
}
diff --git a/tests/ClampRangeTest.cpp b/tests/ClampRangeTest.cpp
index dc520711a3..2462725a08 100644
--- a/tests/ClampRangeTest.cpp
+++ b/tests/ClampRangeTest.cpp
@@ -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++) {
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index e6795d63c5..ed80d41aa2 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -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);
diff --git a/tools/flags/SkCommandLineFlags.cpp b/tools/flags/SkCommandLineFlags.cpp
index b088b4e4d3..084f48a8aa 100644
--- a/tools/flags/SkCommandLineFlags.cpp
+++ b/tools/flags/SkCommandLineFlags.cpp
@@ -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;
}
diff --git a/tools/flags/SkCommandLineFlags.h b/tools/flags/SkCommandLineFlags.h
index 51af933467..b0199f6717 100644
--- a/tools/flags/SkCommandLineFlags.h
+++ b/tools/flags/SkCommandLineFlags.h
@@ -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();
}
}