| 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 a16e9c17c33ac3b81b21f1dcbe36aa1524c8a8af..5d3887858bf4bec789796a4fc38d6d338f4e3ca7 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -2734,7 +2734,6 @@ void LayerTreeHostImpl::SetDebugState(
|
| void LayerTreeHostImpl::CreateUIResource(UIResourceId uid,
|
| const UIResourceBitmap& bitmap) {
|
| DCHECK_GT(uid, 0);
|
| - DCHECK_EQ(bitmap.GetFormat(), UIResourceBitmap::RGBA8);
|
|
|
| GLint wrap_mode = 0;
|
| switch (bitmap.GetWrapMode()) {
|
| @@ -2751,11 +2750,15 @@ void LayerTreeHostImpl::CreateUIResource(UIResourceId uid,
|
| ResourceProvider::ResourceId id = ResourceIdForUIResource(uid);
|
| if (id)
|
| DeleteUIResource(uid);
|
| +
|
| + ResourceFormat format = resource_provider_->best_texture_format();
|
| + if (bitmap.GetFormat() == UIResourceBitmap::ETC1)
|
| + format = ETC1;
|
| id = resource_provider_->CreateResource(
|
| bitmap.GetSize(),
|
| wrap_mode,
|
| ResourceProvider::TextureUsageAny,
|
| - resource_provider_->best_texture_format());
|
| + format);
|
|
|
| UIResourceData data;
|
| data.resource_id = id;
|
|
|