OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_GFX_GTK_UTIL_H_ | 5 #ifndef BASE_GFX_GTK_UTIL_H_ |
6 #define BASE_GFX_GTK_UTIL_H_ | 6 #define BASE_GFX_GTK_UTIL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 class Rect; | 21 class Rect; |
22 | 22 |
23 extern const GdkColor kGdkWhite; | 23 extern const GdkColor kGdkWhite; |
24 extern const GdkColor kGdkBlack; | 24 extern const GdkColor kGdkBlack; |
25 extern const GdkColor kGdkGreen; | 25 extern const GdkColor kGdkGreen; |
26 | 26 |
27 // Modify the given region by subtracting the given rectangles. | 27 // Modify the given region by subtracting the given rectangles. |
28 void SubtractRectanglesFromRegion(GdkRegion* region, | 28 void SubtractRectanglesFromRegion(GdkRegion* region, |
29 const std::vector<Rect>& cutouts); | 29 const std::vector<Rect>& cutouts); |
30 | 30 |
31 // Makes a copy of |pixels| with the ordering changed from BGRA to RGBA. | |
32 // The caller is responsible for free()ing the data. If |stride| is 0, | |
33 // it's assumed to be 4 * |width|. | |
34 uint8_t* BGRAToRGBA(const uint8_t* pixels, int width, int height, int stride); | |
35 | |
36 } // namespace gfx | 31 } // namespace gfx |
37 | 32 |
38 #endif // BASE_GFX_GTK_UTIL_H_ | 33 #endif // BASE_GFX_GTK_UTIL_H_ |
OLD | NEW |