diff options
author | senorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-10 14:23:34 +0000 |
---|---|---|
committer | senorblanco@chromium.org <senorblanco@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-10 14:23:34 +0000 |
commit | 58d518b6820b4a73b7f2d8ab4233687e0ea952ad (patch) | |
tree | ec26057af2ddbe4574f992fc17c867ce64d3ac3e /skia | |
parent | 54f11545dabe73d353b14475bf0ca4ee74bec4ea (diff) | |
download | chromium_src-58d518b6820b4a73b7f2d8ab4233687e0ea952ad.zip chromium_src-58d518b6820b4a73b7f2d8ab4233687e0ea952ad.tar.gz chromium_src-58d518b6820b4a73b7f2d8ab4233687e0ea952ad.tar.bz2 |
Enable skia asserts. They were disabled some time ago due to
http://crbug.com/6372, which has since been fixed. Some existing asserts were
failing due to having been untested, and were fixed in this CL.
BUG=http://crbug.com/6373.
TEST=unit tests, layout tests, etc do not assert
Review URL: http://codereview.chromium.org/165223
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22916 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/config/SkUserConfig.h | 14 | ||||
-rw-r--r-- | skia/ext/SkFontHost_fontconfig.cpp | 2 | ||||
-rw-r--r-- | skia/ext/image_operations_unittest.cc | 8 | ||||
-rw-r--r-- | skia/ext/vector_platform_device_linux.cc | 7 |
4 files changed, 8 insertions, 23 deletions
diff --git a/skia/config/SkUserConfig.h b/skia/config/SkUserConfig.h index 09c99f0..e88e80c8 100644 --- a/skia/config/SkUserConfig.h +++ b/skia/config/SkUserConfig.h @@ -203,20 +203,6 @@ typedef unsigned uint32_t; // assertion. #define SK_CRASH() SkDebugf_FileLine(__FILE__, __LINE__, true, "SK_CRASH") -// TODO(brettw) bug 6373: Re-enable Skia assertions. This is blocked on fixing -// some of our transparency handling which generates purposely-invalid colors, -// in turn causing assertions. -//#ifndef NDEBUG -// #define SK_DEBUG -// #undef SK_RELEASE - #undef SK_SUPPORT_UNITTEST // This is only necessary in debug mode since - // we've disabled assertions. When we re-enable - // them, this line can be removed. -//#else - #define SK_RELEASE - #undef SK_DEBUG -//#endif - // For now (and to avoid rebaselining 1700+ tests), we'll use the old version // of SkAlpha255To256. #define SK_USE_OLD_255_TO_256 diff --git a/skia/ext/SkFontHost_fontconfig.cpp b/skia/ext/SkFontHost_fontconfig.cpp index 1c46194..46d8d45 100644 --- a/skia/ext/SkFontHost_fontconfig.cpp +++ b/skia/ext/SkFontHost_fontconfig.cpp @@ -81,7 +81,7 @@ static SkTypeface::Style UniqueIdToStyle(unsigned uniqueid) static unsigned FileIdAndStyleToUniqueId(unsigned fileid, SkTypeface::Style style) { - SkASSERT(style & 0xff == style); + SkASSERT((style & 0xff) == style); return (fileid << 8) | static_cast<int>(style); } diff --git a/skia/ext/image_operations_unittest.cc b/skia/ext/image_operations_unittest.cc index 5066683..dbf4fce 100644 --- a/skia/ext/image_operations_unittest.cc +++ b/skia/ext/image_operations_unittest.cc @@ -204,10 +204,10 @@ TEST(ImageOperations, CreateMaskedBitmap) { alpha.allocPixels(); for (int y = 0, i = 0; y < src_h; y++) { for (int x = 0; x < src_w; x++) { - *alpha.getAddr32(x, y) = SkColorSetARGB(i + 128 % 255, - i + 128 % 255, - i + 64 % 255, - i + 0 % 255); + *alpha.getAddr32(x, y) = SkColorSetARGB((i + 128) % 255, + (i + 128) % 255, + (i + 64) % 255, + (i + 0) % 255); i++; } } diff --git a/skia/ext/vector_platform_device_linux.cc b/skia/ext/vector_platform_device_linux.cc index 8c1b108..d20a791 100644 --- a/skia/ext/vector_platform_device_linux.cc +++ b/skia/ext/vector_platform_device_linux.cc @@ -33,7 +33,7 @@ VectorPlatformDevice::VectorPlatformDevice(const SkBitmap& bitmap) // for testing when we run chromium without sanboxing. surface_ = cairo_pdf_surface_create("chrome_printing_test.pdf", width(), height()); - SkASSERT(surface); + SkASSERT(surface_); context_ = cairo_create(surface_); SkASSERT(context_); @@ -41,7 +41,7 @@ VectorPlatformDevice::VectorPlatformDevice(const SkBitmap& bitmap) } VectorPlatformDevice::~VectorPlatformDevice() { - SkASSERT(surface); + SkASSERT(surface_); SkASSERT(context_); cairo_destroy(context_); @@ -72,7 +72,6 @@ void VectorPlatformDevice::drawDevice(const SkDraw& draw, int y, const SkPaint& paint) { SkASSERT(device); - SkASSERT(device->accessBitmap(false)); // TODO(myhuang): We may also have to consider http://b/1183870 . drawSprite(draw, device->accessBitmap(false), x, y, paint); @@ -248,7 +247,7 @@ void VectorPlatformDevice::drawPosText(const SkDraw& draw, const SkPaint& paint) { SkASSERT(text); SkASSERT(pos); - SkASSERT(paint.gettextEncoding() == SkPaint::kGlyphID_TextEncoding); + SkASSERT(paint.getTextEncoding() == SkPaint::kGlyphID_TextEncoding); SkASSERT(scalarsPerPos == 2); // Each pos contains x and y. if (!len) |