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

Unified Diff: chrome/browser/supervised_user/supervised_user_theme.cc

Issue 1869693002: Theme suppliers: Avoid all Image copying. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 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 | « chrome/browser/supervised_user/supervised_user_theme.h ('k') | chrome/browser/themes/browser_theme_pack.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/supervised_user/supervised_user_theme.cc
diff --git a/chrome/browser/supervised_user/supervised_user_theme.cc b/chrome/browser/supervised_user/supervised_user_theme.cc
index 22e702b3c579d942495274f0fe5fbeb773483a8b..fa008f5dd54dc7965c9de31eef456ad8c7f0fde9 100644
--- a/chrome/browser/supervised_user/supervised_user_theme.cc
+++ b/chrome/browser/supervised_user/supervised_user_theme.cc
@@ -56,9 +56,9 @@ bool SupervisedUserTheme::GetColor(int id, SkColor* color) const {
return false;
}
-gfx::Image SupervisedUserTheme::GetImageNamed(int id) {
+const gfx::Image& SupervisedUserTheme::GetImageNamed(int id) {
if (!HasCustomImage(id))
- return gfx::Image();
+ return empty_image();
id = MapToSupervisedUserResourceIds(id);
return ResourceBundle::GetSharedInstance().GetNativeImageNamed(id);
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_theme.h ('k') | chrome/browser/themes/browser_theme_pack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698