| 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
|
| + 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:
|
|
|