Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / libgtk2ui / skia_utils_gtk2.h
blob1ce81a52bf2f7c1c3a2dde11d6f8f6bf945acafd
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_LIBGTK2UI_SKIA_UTILS_GTK2_H_
6 #define CHROME_BROWSER_UI_LIBGTK2UI_SKIA_UTILS_GTK2_H_
8 #include "third_party/skia/include/core/SkColor.h"
10 typedef struct _GdkColor GdkColor;
11 typedef struct _GdkPixbuf GdkPixbuf;
13 class SkBitmap;
15 namespace libgtk2ui {
17 // Converts GdkColors to the ARGB layout Skia expects.
18 SkColor GdkColorToSkColor(GdkColor color);
20 // Converts ARGB to GdkColor.
21 GdkColor SkColorToGdkColor(SkColor color);
23 const SkBitmap GdkPixbufToImageSkia(GdkPixbuf* pixbuf);
25 // Convert and copy a SkBitmap to a GdkPixbuf. NOTE: this uses BGRAToRGBA, so
26 // it is an expensive operation. The returned GdkPixbuf will have a refcount of
27 // 1, and the caller is responsible for unrefing it when done.
28 GdkPixbuf* GdkPixbufFromSkBitmap(const SkBitmap& bitmap);
30 } // namespace libgtk2ui
32 #endif // CHROME_BROWSER_UI_LIBGTK2UI_SKIA_UTILS_GTK2_H_