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

Unified Diff: cc/resources/platform_color.h

Issue 1713503002: Reland Allow one-copy and zero-copy task tile worker pools to use compressed textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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/raster/zero_copy_tile_task_worker_pool.cc ('k') | cc/resources/resource_format.h » ('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 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;
« no previous file with comments | « cc/raster/zero_copy_tile_task_worker_pool.cc ('k') | cc/resources/resource_format.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698