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

Unified Diff: cc/resources/resource_format.cc

Issue 1351283003: Allow task pools to reason about transparency. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
Index: cc/resources/resource_format.cc
diff --git a/cc/resources/resource_format.cc b/cc/resources/resource_format.cc
index c62ae934d728f5d749514164f5da80fc9094c4bd..f5959dce364f8e07847d9acc9f4c683907174e92 100644
--- a/cc/resources/resource_format.cc
+++ b/cc/resources/resource_format.cc
@@ -106,4 +106,29 @@ gfx::BufferFormat BufferFormat(ResourceFormat format) {
return gfx::BufferFormat::RGBA_8888;
}
+ResourceFormat BufferFormatToResourceFormat(gfx::BufferFormat format) {
+ switch (format) {
+ case gfx::BufferFormat::RGBA_8888:
+ return RGBA_8888;
+ case gfx::BufferFormat::BGRA_8888:
+ return BGRA_8888;
+ case gfx::BufferFormat::RGBA_4444:
+ return RGBA_4444;
+ case gfx::BufferFormat::ETC1:
+ return ETC1;
+ case gfx::BufferFormat::ATC:
+ case gfx::BufferFormat::ATCIA:
+ case gfx::BufferFormat::DXT1:
+ case gfx::BufferFormat::DXT5:
+ case gfx::BufferFormat::R_8:
+ case gfx::BufferFormat::BGRX_8888:
+ case gfx::BufferFormat::YUV_420:
+ case gfx::BufferFormat::YUV_420_BIPLANAR:
+ case gfx::BufferFormat::UYVY_422:
+ break;
+ }
+ NOTREACHED();
+ return RGBA_8888;
+}
+
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698