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

Unified Diff: chrome/browser/themes/theme_service_aurax11.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/themes/theme_service.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_service_aurax11.cc
diff --git a/chrome/browser/themes/theme_service_aurax11.cc b/chrome/browser/themes/theme_service_aurax11.cc
index 71a573ab303036f13f63031db536f328bff3cb82..0e6897123cb2e4492332a0dc6a7c572c081b0856 100644
--- a/chrome/browser/themes/theme_service_aurax11.cc
+++ b/chrome/browser/themes/theme_service_aurax11.cc
@@ -25,7 +25,7 @@ class SystemThemeX11 : public CustomThemeSupplier {
void StopUsingTheme() override;
bool GetTint(int id, color_utils::HSL* hsl) const override;
bool GetColor(int id, SkColor* color) const override;
- gfx::Image GetImageNamed(int id) override;
+ const gfx::Image& GetImageNamed(int id) override;
bool HasCustomImage(int id) const override;
private:
@@ -64,8 +64,8 @@ bool SystemThemeX11::GetColor(int id, SkColor* color) const {
return linux_ui_ && linux_ui_->GetColor(id, color);
}
-gfx::Image SystemThemeX11::GetImageNamed(int id) {
- return linux_ui_ ? linux_ui_->GetThemeImageNamed(id) : gfx::Image();
+const gfx::Image& SystemThemeX11::GetImageNamed(int id) {
+ return linux_ui_ ? linux_ui_->GetThemeImageNamed(id) : empty_image();
}
bool SystemThemeX11::HasCustomImage(int id) const {
« no previous file with comments | « chrome/browser/themes/theme_service.cc ('k') | chrome/browser/ui/libgtk2ui/gtk2_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698