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

Unified Diff: ui/gfx/image/image_unittest_util.cc

Issue 10799014: Add support for PNG representation in gfx::Image (Closed) Base URL: http://git.chromium.org/chromium/src.git@bookmark-sync
Patch Set: Created 8 years, 5 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/image_unittest_util.cc
diff --git a/ui/gfx/image/image_unittest_util.cc b/ui/gfx/image/image_unittest_util.cc
index 04620a7f66c3677241226809a7b811ca8b6066b5..e28e7828defe7678ff98879f579dae5369821404 100644
--- a/ui/gfx/image/image_unittest_util.cc
+++ b/ui/gfx/image/image_unittest_util.cc
@@ -113,6 +113,16 @@ PlatformImage ToPlatformType(const gfx::Image& image) {
#endif
}
+PlatformImage CopyPlatformType(const gfx::Image& image) {
+#if defined(OS_MACOSX)
+ return image.CopyNSImage();
+#elif defined(TOOLKIT_GTK)
+ return image.CopyGdkPixbuf();
+#else
+ return *image.ToSkBitmap();
+#endif
+}
+
bool IsPlatformImageValid(PlatformImage image) {
#if defined(OS_MACOSX) || defined(TOOLKIT_GTK)
return image != NULL;

Powered by Google App Engine
This is Rietveld 408576698