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

Unified Diff: chrome/browser/themes/browser_theme_pack.h

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
Index: chrome/browser/themes/browser_theme_pack.h
diff --git a/chrome/browser/themes/browser_theme_pack.h b/chrome/browser/themes/browser_theme_pack.h
index 5d5d09269aa84b9ec32203dd32cdd54d8023f20f..e01f24b6a57b1fd2600ed4a390a7998d4cdead28 100644
--- a/chrome/browser/themes/browser_theme_pack.h
+++ b/chrome/browser/themes/browser_theme_pack.h
@@ -84,7 +84,7 @@ class BrowserThemePack : public CustomThemeSupplier {
bool GetTint(int id, color_utils::HSL* hsl) const override;
bool GetColor(int id, SkColor* color) const override;
bool GetDisplayProperty(int id, int* result) const override;
- gfx::Image GetImageNamed(int id) override;
+ const gfx::Image& GetImageNamed(int id) override;
base::RefCountedMemory* GetRawData(int id, ui::ScaleFactor scale_factor)
const override;
bool HasCustomImage(int id) const override;
@@ -181,8 +181,7 @@ class BrowserThemePack : public CustomThemeSupplier {
// Takes all images in |source| and puts them in |destination|, freeing any
// image already in |destination| that |source| would overwrite.
- void MergeImageCaches(const ImageCache& source,
- ImageCache* destination) const;
+ void MergeImageCaches(ImageCache source, ImageCache* destination) const;
// Copies images from |source| to |destination| such that the lifetimes of
// the images in |destination| are not affected by the lifetimes of the
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_theme.cc ('k') | chrome/browser/themes/browser_theme_pack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698