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

Unified Diff: trunk/src/cc/resources/scoped_ui_resource.cc

Issue 23740010: Revert 223162 "Update the nine patch layer to use UI resources" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
« no previous file with comments | « trunk/src/cc/resources/scoped_ui_resource.h ('k') | trunk/src/cc/resources/ui_resource_bitmap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/resources/scoped_ui_resource.cc
===================================================================
--- trunk/src/cc/resources/scoped_ui_resource.cc (revision 223178)
+++ trunk/src/cc/resources/scoped_ui_resource.cc (working copy)
@@ -12,12 +12,12 @@
scoped_ptr<ScopedUIResource> ScopedUIResource::Create(
LayerTreeHost* host,
- const UIResourceBitmap& bitmap) {
+ scoped_refptr<UIResourceBitmap> bitmap) {
return make_scoped_ptr(new ScopedUIResource(host, bitmap));
}
ScopedUIResource::ScopedUIResource(LayerTreeHost* host,
- const UIResourceBitmap& bitmap)
+ scoped_refptr<UIResourceBitmap> bitmap)
: bitmap_(bitmap), host_(host) {
DCHECK(host_);
id_ = host_->CreateUIResource(this);
@@ -32,9 +32,16 @@
}
}
-UIResourceBitmap ScopedUIResource::GetBitmap(UIResourceId uid,
- bool resource_lost) {
+gfx::Size ScopedUIResource::GetSize() const {
+ return bitmap_->GetSize();
+}
+
+scoped_refptr<UIResourceBitmap> ScopedUIResource::GetBitmap(
+ UIResourceId uid,
+ bool resource_lost) {
return bitmap_;
}
+ScopedUIResource::ScopedUIResource() {}
+
} // namespace cc
« no previous file with comments | « trunk/src/cc/resources/scoped_ui_resource.h ('k') | trunk/src/cc/resources/ui_resource_bitmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698