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

Unified Diff: app/theme_provider.h

Issue 288005: First fix to minimize copying of image data. (Closed)
Patch Set: Modify gyp Created 11 years, 2 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: app/theme_provider.h
diff --git a/app/theme_provider.h b/app/theme_provider.h
index c3b8a9c26eb87c3d9d8d1bb69f3acde55e46a35b..410e69976bcb24e42375f85cf4628d0e13e72172 100644
--- a/app/theme_provider.h
+++ b/app/theme_provider.h
@@ -23,6 +23,7 @@ class NSImage;
#endif // OS_*
class Profile;
+class RefCountedMemory;
class SkBitmap;
////////////////////////////////////////////////////////////////////////////////
@@ -60,10 +61,9 @@ class ThemeProvider {
// doesn't provide a certain image, but custom themes might (badges, etc).
virtual bool HasCustomImage(int id) const = 0;
- // Reads the image data from the theme file into the specified vector. Returns
- // true on success.
- virtual bool GetRawData(int id,
- std::vector<unsigned char>* raw_data) const = 0;
+ // Reads the image data from the theme file into the specified
+ // vector. Returns NULL on error.
+ virtual RefCountedMemory* GetRawData(int id) const = 0;
#if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS)
// Gets the GdkPixbuf with the specified |id|. Returns a pointer to a shared
« no previous file with comments | « app/resource_bundle_win.cc ('k') | base/base.gyp » ('j') | base/ref_counted_memory.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698