OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Because the unit tests for gfx::Image are spread across multiple | 5 // Because the unit tests for gfx::Image are spread across multiple |
6 // implementation files, this header contains the reusable components. | 6 // implementation files, this header contains the reusable components. |
7 | 7 |
8 #ifndef UI_GFX_IMAGE_UNITTEST_UTIL_H_ | 8 #ifndef UI_GFX_IMAGE_UNITTEST_UTIL_H_ |
9 #define UI_GFX_IMAGE_UNITTEST_UTIL_H_ | 9 #define UI_GFX_IMAGE_UNITTEST_UTIL_H_ |
10 | 10 |
11 #include "ui/gfx/image.h" | 11 #include "ui/gfx/image.h" |
12 | 12 |
13 namespace gfx { | 13 namespace gfx { |
14 namespace test { | 14 namespace test { |
15 | 15 |
16 #if defined(OS_MACOSX) | 16 #if defined(OS_MACOSX) |
17 typedef NSImage* PlatformImage; | 17 typedef NSImage* PlatformImage; |
18 #elif defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) | 18 #elif defined(TOOLKIT_GTK) |
Robert Sesek
2011/05/24 16:24:12
TOOLKIT_USES_GTK?
| |
19 typedef GdkPixbuf* PlatformImage; | 19 typedef GdkPixbuf* PlatformImage; |
20 #else | 20 #else |
21 typedef const SkBitmap* PlatformImage; | 21 typedef const SkBitmap* PlatformImage; |
22 #endif | 22 #endif |
23 | 23 |
24 SkBitmap* CreateBitmap(int width, int height); | 24 SkBitmap* CreateBitmap(int width, int height); |
25 | 25 |
26 PlatformImage CreatePlatformImage(); | 26 PlatformImage CreatePlatformImage(); |
27 | 27 |
28 gfx::Image::RepresentationType GetPlatformRepresentationType(); | 28 gfx::Image::RepresentationType GetPlatformRepresentationType(); |
29 | 29 |
30 } // namespace test | 30 } // namespace test |
31 } // namespace gfx | 31 } // namespace gfx |
32 | 32 |
33 #endif // UI_GFX_IMAGE_UNITTEST_UTIL_H_ | 33 #endif // UI_GFX_IMAGE_UNITTEST_UTIL_H_ |
OLD | NEW |