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

Unified Diff: cc/resources/platform_color.h

Issue 22875045: cc: Remove unnecessary "default" cases from switch statements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove changes to enums that require arraysize Created 7 years, 4 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
Index: cc/resources/platform_color.h
diff --git a/cc/resources/platform_color.h b/cc/resources/platform_color.h
index 09a606ae5a596c8998e2149ded77d191e6a3f7df..2672a787fe3e1759424f73a1145a79d8b9eeba7e 100644
--- a/cc/resources/platform_color.h
+++ b/cc/resources/platform_color.h
@@ -26,19 +26,16 @@ class PlatformColor {
// Returns the most efficient texture format for this platform.
static GLenum BestTextureFormat(bool supports_bgra8888) {
- GLenum texture_format = GL_RGBA;
switch (Format()) {
- case SOURCE_FORMAT_RGBA8:
- break;
case SOURCE_FORMAT_BGRA8:
if (supports_bgra8888)
- texture_format = GL_BGRA_EXT;
- break;
- default:
- NOTREACHED();
- break;
+ return GL_BGRA_EXT;
+ // fall-through
danakj 2013/08/26 15:55:39 how about just return GL_RGBA here?
vmpstr 2013/08/26 16:04:26 +1 :)
reveman 2013/08/26 17:16:57 Done.
+ case SOURCE_FORMAT_RGBA8:
+ return GL_RGBA;
}
- return texture_format;
+ NOTREACHED();
+ return GL_RGBA;
}
// Return true if the given texture format has the same component order
@@ -49,10 +46,9 @@ class PlatformColor {
return texture_format == GL_RGBA;
case SOURCE_FORMAT_BGRA8:
return texture_format == GL_BGRA_EXT;
- default:
- NOTREACHED();
- return false;
}
+ NOTREACHED();
+ return false;
}
private:

Powered by Google App Engine
This is Rietveld 408576698