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

Unified Diff: ui/gfx/image_unittest.h

Issue 6849030: Add support for multi resolution icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added unit test for gfx::Image Created 9 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: ui/gfx/image_unittest.h
diff --git a/ui/gfx/image_unittest.h b/ui/gfx/image_unittest.h
index 09abfcedc6bd449de39665cc1396250deab3bde5..8935cb785cff0271e06590b58ab8137c087ffa87 100644
--- a/ui/gfx/image_unittest.h
+++ b/ui/gfx/image_unittest.h
@@ -30,16 +30,16 @@ typedef GdkPixbuf* PlatformImage;
typedef const SkBitmap* PlatformImage;
#endif
-SkBitmap* CreateBitmap() {
+inline SkBitmap* CreateBitmap(int width, int height) {
Robert Sesek 2011/04/19 02:41:41 just curious: why inline?
sail 2011/04/19 04:56:59 This function is being included by image_unittest.
SkBitmap* bitmap = new SkBitmap();
- bitmap->setConfig(SkBitmap::kARGB_8888_Config, 25, 25);
+ bitmap->setConfig(SkBitmap::kARGB_8888_Config, width, height);
bitmap->allocPixels();
bitmap->eraseRGB(255, 0, 0);
return bitmap;
}
-PlatformImage CreatePlatformImage() {
- scoped_ptr<SkBitmap> bitmap(CreateBitmap());
+inline PlatformImage CreatePlatformImage() {
+ scoped_ptr<SkBitmap> bitmap(CreateBitmap(25, 25));
#if defined(OS_MACOSX)
NSImage* image = gfx::SkBitmapToNSImage(*(bitmap.get()));
base::mac::NSObjectRetain(image);
@@ -51,7 +51,7 @@ PlatformImage CreatePlatformImage() {
#endif
}
-gfx::Image::RepresentationType GetPlatformRepresentationType() {
+inline gfx::Image::RepresentationType GetPlatformRepresentationType() {
#if defined(OS_MACOSX)
return gfx::Image::kNSImageRep;
#elif defined(OS_LINUX) && !defined(TOOLKIT_VIEWS)

Powered by Google App Engine
This is Rietveld 408576698