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

Unified Diff: trunk/src/cc/layers/scrollbar_layer_unittest.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/layers/painted_scrollbar_layer.cc ('k') | trunk/src/cc/resources/scoped_ui_resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/layers/scrollbar_layer_unittest.cc
===================================================================
--- trunk/src/cc/layers/scrollbar_layer_unittest.cc (revision 223178)
+++ trunk/src/cc/layers/scrollbar_layer_unittest.cc (working copy)
@@ -527,8 +527,7 @@
virtual UIResourceId CreateUIResource(UIResourceClient* content) OVERRIDE {
total_ui_resource_created_++;
UIResourceId nid = next_id_++;
- ui_resource_bitmap_map_.insert(
- std::make_pair(nid, content->GetBitmap(nid, false)));
+ ui_resource_bitmap_map_[nid] = content->GetBitmap(nid, false);
return nid;
}
@@ -547,13 +546,13 @@
gfx::Size ui_resource_size(UIResourceId id) {
UIResourceBitmapMap::iterator iter = ui_resource_bitmap_map_.find(id);
- if (iter != ui_resource_bitmap_map_.end())
- return iter->second.GetSize();
+ if (iter != ui_resource_bitmap_map_.end() && iter->second.get())
+ return iter->second->GetSize();
return gfx::Size();
}
private:
- typedef base::hash_map<UIResourceId, UIResourceBitmap>
+ typedef base::hash_map<UIResourceId, scoped_refptr<UIResourceBitmap> >
UIResourceBitmapMap;
UIResourceBitmapMap ui_resource_bitmap_map_;
« no previous file with comments | « trunk/src/cc/layers/painted_scrollbar_layer.cc ('k') | trunk/src/cc/resources/scoped_ui_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698