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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 938893002: cc: Stop using TextureUploader for UIResources, HUD, and tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: uiresource: etc1 Created 5 years, 10 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/texture_uploader.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4c847ebf871de1f277b09c486441f2595e7b62e0..16a3f776e20d2ff199e1f445037aeb08de9ff544 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -3380,11 +3380,9 @@ void LayerTreeHostImpl::CreateUIResource(UIResourceId uid,
format = ETC1;
break;
}
- id =
- resource_provider_->CreateResource(bitmap.GetSize(),
- wrap_mode,
- ResourceProvider::TextureHintImmutable,
- format);
+ id = resource_provider_->CreateResource(
+ bitmap.GetSize(), wrap_mode, ResourceProvider::TextureHintImmutable,
+ format);
UIResourceData data;
data.resource_id = id;
@@ -3394,11 +3392,8 @@ void LayerTreeHostImpl::CreateUIResource(UIResourceId uid,
ui_resource_map_[uid] = data;
AutoLockUIResourceBitmap bitmap_lock(bitmap);
- resource_provider_->SetPixels(id,
- bitmap_lock.GetPixels(),
- gfx::Rect(bitmap.GetSize()),
- gfx::Rect(bitmap.GetSize()),
- gfx::Vector2d(0, 0));
+ resource_provider_->CopyToResource(id, bitmap_lock.GetPixels(),
+ bitmap.GetSize());
MarkUIResourceNotEvicted(uid);
}
« no previous file with comments | « cc/resources/texture_uploader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698