Index: cc/resources/platform_color.h |
diff --git a/cc/resources/platform_color.h b/cc/resources/platform_color.h |
index f7d3705d838eef41e90814917769c0add265e84f..26d6b0269a3e92c3d4648f1bbb16afc57434151a 100644 |
--- a/cc/resources/platform_color.h |
+++ b/cc/resources/platform_color.h |
@@ -24,7 +24,19 @@ class PlatformColor { |
} |
// Returns the most efficient texture format for this platform. |
- static ResourceFormat BestTextureFormat(bool supports_bgra8888) { |
+ static ResourceFormat BestTextureFormat() { |
+ switch (Format()) { |
+ case SOURCE_FORMAT_BGRA8: |
+ return BGRA_8888; |
+ case SOURCE_FORMAT_RGBA8: |
+ return RGBA_8888; |
+ } |
+ NOTREACHED(); |
+ return RGBA_8888; |
+ } |
+ |
+ // Returns the most efficient supported texture format for this platform. |
+ static ResourceFormat BestSupportedTextureFormat(bool supports_bgra8888) { |
switch (Format()) { |
case SOURCE_FORMAT_BGRA8: |
return (supports_bgra8888) ? BGRA_8888 : RGBA_8888; |