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

Unified Diff: cc/resources/resource_format.cc

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed a signed vs. unsigned comparison in video_resource_updater.cc Created 7 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
« 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
new file mode 100644
index 0000000000000000000000000000000000000000..28bb1e4dced02d4dede3cab4cf59c71628a1bf8b
--- /dev/null
+++ b/cc/resources/resource_format.cc
@@ -0,0 +1,24 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/resources/resource_format.h"
+
+namespace cc {
+
+SkBitmap::Config SkBitmapConfigFromFormat(ResourceFormat format) {
+ switch (format) {
+ case RGBA_4444:
+ return SkBitmap::kARGB_4444_Config;
+ case RGBA_8888:
+ case BGRA_8888:
+ return SkBitmap::kARGB_8888_Config;
+ case LUMINANCE_8:
+ NOTREACHED();
+ break;
+ }
+ NOTREACHED();
+ return SkBitmap::kARGB_8888_Config;
+}
+
+} // 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