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

Unified Diff: base/gfx/gtk_util.h

Issue 38009: Move GdkPixbufFromSkBitmap to gtk_util so it can easily be shared. (Closed)
Patch Set: Merge / warning Created 11 years, 9 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 | « no previous file | base/gfx/gtk_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/gfx/gtk_util.h
diff --git a/base/gfx/gtk_util.h b/base/gfx/gtk_util.h
index 7062d59f8f0fc2ae82f287ccdb21bf0ffb031ea6..9d0a45ced974d58c75e6609ffc3c76c5e3b49efc 100755
--- a/base/gfx/gtk_util.h
+++ b/base/gfx/gtk_util.h
@@ -7,6 +7,7 @@
#include <vector>
+typedef struct _GdkPixbuf GdkPixbuf;
typedef struct _GdkRegion GdkRegion;
namespace gfx {
@@ -17,6 +18,10 @@ class Rect;
void SubtractRectanglesFromRegion(GdkRegion* region,
const std::vector<gfx::Rect>& cutouts);
+// Convert and copy a SkBitmap to a GdkPixbuf. NOTE: This is an expensive
+// operation, all of the pixels must be copied and their order swapped.
+GdkPixbuf* GdkPixbufFromSkBitmap(const SkBitmap* bitmap);
+
} // namespace gfx
#endif // BASE_GFX_GTK_UTIL_H_
« no previous file with comments | « no previous file | base/gfx/gtk_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698