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

Unified Diff: cc/layers/ui_resource_layer_unittest.cc

Issue 2322943003: cc: Move UI Resource management out of LayerTreeHost. (Closed)
Patch Set: virtual dtor Created 4 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/layers/ui_resource_layer.cc ('k') | cc/resources/scoped_ui_resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/ui_resource_layer_unittest.cc
diff --git a/cc/layers/ui_resource_layer_unittest.cc b/cc/layers/ui_resource_layer_unittest.cc
index 62906af1076743d861b6eb25cedb81cfcc6412a0..c5fc041a9318d635bc1c6064aa989ce99b3d9d89 100644
--- a/cc/layers/ui_resource_layer_unittest.cc
+++ b/cc/layers/ui_resource_layer_unittest.cc
@@ -103,8 +103,9 @@ TEST_F(UIResourceLayerTest, SetUIResourceId) {
EXPECT_FALSE(test_layer->DrawsContent());
bool is_opaque = false;
- std::unique_ptr<ScopedUIResource> resource = ScopedUIResource::Create(
- layer_tree_host_.get(), UIResourceBitmap(gfx::Size(10, 10), is_opaque));
+ std::unique_ptr<ScopedUIResource> resource =
+ ScopedUIResource::Create(layer_tree_host_->GetUIResourceManager(),
+ UIResourceBitmap(gfx::Size(10, 10), is_opaque));
test_layer->SetUIResourceId(resource->id());
test_layer->Update();
@@ -112,8 +113,9 @@ TEST_F(UIResourceLayerTest, SetUIResourceId) {
// ID is preserved even when you set ID first and attach it to the tree.
layer_tree_host_->SetRootLayer(nullptr);
- std::unique_ptr<ScopedUIResource> shared_resource = ScopedUIResource::Create(
- layer_tree_host_.get(), UIResourceBitmap(gfx::Size(5, 5), is_opaque));
+ std::unique_ptr<ScopedUIResource> shared_resource =
+ ScopedUIResource::Create(layer_tree_host_->GetUIResourceManager(),
+ UIResourceBitmap(gfx::Size(5, 5), is_opaque));
test_layer->SetUIResourceId(shared_resource->id());
layer_tree_host_->SetRootLayer(test_layer);
EXPECT_EQ(shared_resource->id(), test_layer->GetUIResourceId());
« no previous file with comments | « cc/layers/ui_resource_layer.cc ('k') | cc/resources/scoped_ui_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698