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

Unified Diff: cc/resources/resource_format.cc

Issue 793693003: Tile Compression (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/resource_format.h ('k') | cc/resources/resource_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_format.cc
diff --git a/cc/resources/resource_format.cc b/cc/resources/resource_format.cc
index 45581b800f140f3b6725a6bae4959686e66f03d0..a0cb0836738ad268df8d6554e6515d41374e0228 100644
--- a/cc/resources/resource_format.cc
+++ b/cc/resources/resource_format.cc
@@ -13,6 +13,10 @@ SkColorType ResourceFormatToSkColorType(ResourceFormat format) {
case RGBA_8888:
case BGRA_8888:
return kN32_SkColorType;
+ case ATC:
+ case ATC_IA:
+ case DXT1:
+ case DXT5:
case ETC1:
case ALPHA_8:
case LUMINANCE_8:
@@ -25,4 +29,17 @@ SkColorType ResourceFormatToSkColorType(ResourceFormat format) {
return kN32_SkColorType;
}
+bool IsFormatCompressed(ResourceFormat format) {
+ switch (format) {
+ case ATC:
+ case ATC_IA:
+ case DXT1:
+ case DXT5:
+ case ETC1:
+ return true;
+ default:
+ return false;
+ }
+}
+
} // namespace cc
« no previous file with comments | « cc/resources/resource_format.h ('k') | cc/resources/resource_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698