Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: src/core/SkBitmap.cpp

Issue 32623002: change ERROR label to BAD_CONFIG -- avoid windows complaint (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmap.cpp
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp
index bad63bac18f5d25ba1445a06fbc2fef17f2ad68f..05f5208a69bfd62fba985d9f2e54e59d4853bb0d 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -299,17 +299,17 @@ static bool validate_alphaType(SkBitmap::Config config, SkAlphaType alphaType,
bool SkBitmap::setConfig(Config config, int width, int height, size_t rowBytes,
SkAlphaType alphaType) {
if ((width | height) < 0) {
- goto ERROR;
+ goto BAD_CONFIG;
}
if (rowBytes == 0) {
rowBytes = SkBitmap::ComputeRowBytes(config, width);
if (0 == rowBytes && kNo_Config != config) {
- goto ERROR;
+ goto BAD_CONFIG;
}
}
if (!validate_alphaType(config, alphaType, &alphaType)) {
- goto ERROR;
+ goto BAD_CONFIG;
}
this->freePixels();
@@ -326,7 +326,7 @@ bool SkBitmap::setConfig(Config config, int width, int height, size_t rowBytes,
return true;
// if we got here, we had an error, so we reset the bitmap to empty
-ERROR:
+BAD_CONFIG:
this->reset();
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698