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

Unified Diff: cc/resources/scoped_ui_resource.cc

Issue 22870016: Update the nine patch layer to use UI resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ccameron's fix for exisiting nine-patch uses Created 7 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
Index: cc/resources/scoped_ui_resource.cc
diff --git a/cc/resources/scoped_ui_resource.cc b/cc/resources/scoped_ui_resource.cc
index 0136a8e7e5ad8d57f29276c50ed96f5bb0954d1d..e69b4bc936800eb1a53cc1e5e5fee1e58477c55b 100644
--- a/cc/resources/scoped_ui_resource.cc
+++ b/cc/resources/scoped_ui_resource.cc
@@ -12,12 +12,12 @@ namespace cc {
scoped_ptr<ScopedUIResource> ScopedUIResource::Create(
LayerTreeHost* host,
- scoped_refptr<UIResourceBitmap> bitmap) {
+ const UIResourceBitmap& bitmap) {
return make_scoped_ptr(new ScopedUIResource(host, bitmap));
}
ScopedUIResource::ScopedUIResource(LayerTreeHost* host,
- scoped_refptr<UIResourceBitmap> bitmap)
+ const UIResourceBitmap& bitmap)
: bitmap_(bitmap), host_(host) {
DCHECK(host_);
id_ = host_->CreateUIResource(this);
@@ -32,16 +32,9 @@ ScopedUIResource::~ScopedUIResource() {
}
}
-gfx::Size ScopedUIResource::GetSize() const {
- return bitmap_->GetSize();
-}
-
-scoped_refptr<UIResourceBitmap> ScopedUIResource::GetBitmap(
- UIResourceId uid,
- bool resource_lost) {
+UIResourceBitmap ScopedUIResource::GetBitmap(UIResourceId uid,
+ bool resource_lost) {
return bitmap_;
}
-ScopedUIResource::ScopedUIResource() {}
-
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698