| 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 3a95b5b69d4d3cc06c5afe9fbfef43d41577c0c2..97ceea520ffd65e396d1d51f8bca1dc2d0157daf 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -2629,14 +2629,13 @@ void LayerTreeHostImpl::SetDebugState(
|
| SetFullRootLayerDamage();
|
| }
|
|
|
| -void LayerTreeHostImpl::CreateUIResource(
|
| - UIResourceId uid,
|
| - scoped_refptr<UIResourceBitmap> bitmap) {
|
| +void LayerTreeHostImpl::CreateUIResource(UIResourceId uid,
|
| + const UIResourceBitmap& bitmap) {
|
| DCHECK_GT(uid, 0);
|
| - DCHECK_EQ(bitmap->GetFormat(), UIResourceBitmap::RGBA8);
|
| + DCHECK_EQ(bitmap.GetFormat(), UIResourceBitmap::RGBA8);
|
|
|
| GLint wrap_mode = 0;
|
| - switch (bitmap->GetWrapMode()) {
|
| + switch (bitmap.GetWrapMode()) {
|
| case UIResourceBitmap::CLAMP_TO_EDGE:
|
| wrap_mode = GL_CLAMP_TO_EDGE;
|
| break;
|
| @@ -2651,16 +2650,16 @@ void LayerTreeHostImpl::CreateUIResource(
|
| if (id)
|
| DeleteUIResource(uid);
|
| id = resource_provider_->CreateResource(
|
| - bitmap->GetSize(),
|
| + bitmap.GetSize(),
|
| wrap_mode,
|
| ResourceProvider::TextureUsageAny,
|
| resource_provider_->best_texture_format());
|
|
|
| ui_resource_map_[uid] = id;
|
| resource_provider_->SetPixels(id,
|
| - reinterpret_cast<uint8_t*>(bitmap->GetPixels()),
|
| - gfx::Rect(bitmap->GetSize()),
|
| - gfx::Rect(bitmap->GetSize()),
|
| + bitmap.GetPixels(),
|
| + gfx::Rect(bitmap.GetSize()),
|
| + gfx::Rect(bitmap.GetSize()),
|
| gfx::Vector2d(0, 0));
|
| MarkUIResourceNotEvicted(uid);
|
| }
|
|
|