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

Unified Diff: cc/test/fake_scoped_ui_resource.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/test/fake_scoped_ui_resource.h ('k') | cc/trees/layer_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_scoped_ui_resource.cc
diff --git a/cc/test/fake_scoped_ui_resource.cc b/cc/test/fake_scoped_ui_resource.cc
index 9d1ac454a794dc60723869878bd73f75557c316f..63fa31fd8ea336000d85487e18d433c00fe16722 100644
--- a/cc/test/fake_scoped_ui_resource.cc
+++ b/cc/test/fake_scoped_ui_resource.cc
@@ -5,6 +5,7 @@
#include "cc/test/fake_scoped_ui_resource.h"
#include "base/memory/ptr_util.h"
+#include "cc/resources/ui_resource_manager.h"
#include "cc/trees/layer_tree_host.h"
namespace cc {
@@ -19,21 +20,22 @@ UIResourceBitmap CreateMockUIResourceBitmap() {
} // anonymous namespace
std::unique_ptr<FakeScopedUIResource> FakeScopedUIResource::Create(
- LayerTreeHost* host) {
- return base::WrapUnique(new FakeScopedUIResource(host));
+ UIResourceManager* ui_resource_manager) {
+ return base::WrapUnique(new FakeScopedUIResource(ui_resource_manager));
}
-FakeScopedUIResource::FakeScopedUIResource(LayerTreeHost* host)
- : ScopedUIResource(host, CreateMockUIResourceBitmap()) {
+FakeScopedUIResource::FakeScopedUIResource(
+ UIResourceManager* ui_resource_manager)
+ : ScopedUIResource(ui_resource_manager, CreateMockUIResourceBitmap()) {
// The constructor of ScopedUIResource already created a resource so we need
// to delete the created resource to wipe the state clean.
- host_->DeleteUIResource(id_);
+ ui_resource_manager_->DeleteUIResource(id_);
ResetCounters();
- id_ = host_->CreateUIResource(this);
+ id_ = ui_resource_manager_->CreateUIResource(this);
}
void FakeScopedUIResource::DeleteResource() {
- host_->DeleteUIResource(id_);
+ ui_resource_manager_->DeleteUIResource(id_);
id_ = 0;
}
« no previous file with comments | « cc/test/fake_scoped_ui_resource.h ('k') | cc/trees/layer_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698