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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 463663002: Support an ALPHA_8 UIResourceBitmap format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 6 years, 4 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/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 2d7a9323edf74e7bceb7eab96100f2d8996b12f6..b623f1b523e1617215be89ef560d6335104e5510 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -3265,8 +3265,16 @@ void LayerTreeHostImpl::CreateUIResource(UIResourceId uid,
DeleteUIResource(uid);
ResourceFormat format = resource_provider_->best_texture_format();
- if (bitmap.GetFormat() == UIResourceBitmap::ETC1)
- format = ETC1;
+ switch (bitmap.GetFormat()) {
+ case UIResourceBitmap::RGBA8:
+ break;
+ case UIResourceBitmap::ALPHA_8:
+ format = ALPHA_8;
+ break;
+ case UIResourceBitmap::ETC1:
+ format = ETC1;
+ break;
+ };
id = resource_provider_->CreateResource(
bitmap.GetSize(),
wrap_mode,

Powered by Google App Engine
This is Rietveld 408576698