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

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: fix HasFilterThatMovesPixels()/HasFilterThatAffectsOpacity() 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
« no previous file with comments | « cc/resources/managed_tile_state.cc ('k') | cc/resources/raster_mode.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/platform_color.h
diff --git a/cc/resources/platform_color.h b/cc/resources/platform_color.h
index 09a606ae5a596c8998e2149ded77d191e6a3f7df..bd27d82d7128c6667c1079511f6c378acbac5eb2 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;
+ return GL_RGBA;
+ 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:
« no previous file with comments | « cc/resources/managed_tile_state.cc ('k') | cc/resources/raster_mode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698