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

Side by Side Diff: ui/gfx/image/image_unittest_util.h

Issue 231733005: Delete the GTK+ port of Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remerge to ToT Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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_IMAGE_UNITTEST_UTIL_H_ 8 #ifndef UI_GFX_IMAGE_IMAGE_UNITTEST_UTIL_H_
9 #define UI_GFX_IMAGE_IMAGE_UNITTEST_UTIL_H_ 9 #define UI_GFX_IMAGE_IMAGE_UNITTEST_UTIL_H_
10 10
11 #include "ui/gfx/image/image.h" 11 #include "ui/gfx/image/image.h"
12 #include "third_party/skia/include/core/SkColor.h" 12 #include "third_party/skia/include/core/SkColor.h"
13 13
14 namespace gfx { 14 namespace gfx {
15 namespace test { 15 namespace test {
16 16
17 #if defined(OS_IOS) 17 #if defined(OS_IOS)
18 typedef UIImage* PlatformImage; 18 typedef UIImage* PlatformImage;
19 #elif defined(OS_MACOSX) 19 #elif defined(OS_MACOSX)
20 typedef NSImage* PlatformImage; 20 typedef NSImage* PlatformImage;
21 #elif defined(TOOLKIT_GTK)
22 typedef GdkPixbuf* PlatformImage;
23 #else 21 #else
24 typedef gfx::ImageSkia PlatformImage; 22 typedef gfx::ImageSkia PlatformImage;
25 #endif 23 #endif
26 24
27 std::vector<float> Get1xAnd2xScales(); 25 std::vector<float> Get1xAnd2xScales();
28 26
29 // Create a bitmap of |width|x|height|. 27 // Create a bitmap of |width|x|height|.
30 const SkBitmap CreateBitmap(int width, int height); 28 const SkBitmap CreateBitmap(int width, int height);
31 29
32 // Creates an ImageSkia of |width|x|height| DIP with bitmap data for an 30 // Creates an ImageSkia of |width|x|height| DIP with bitmap data for an
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 void CheckIsTransparent(SkColor color); 78 void CheckIsTransparent(SkColor color);
81 79
82 bool IsPlatformImageValid(PlatformImage image); 80 bool IsPlatformImageValid(PlatformImage image);
83 81
84 bool PlatformImagesEqual(PlatformImage image1, PlatformImage image2); 82 bool PlatformImagesEqual(PlatformImage image1, PlatformImage image2);
85 83
86 } // namespace test 84 } // namespace test
87 } // namespace gfx 85 } // namespace gfx
88 86
89 #endif // UI_GFX_IMAGE_IMAGE_UNITTEST_UTIL_H_ 87 #endif // UI_GFX_IMAGE_IMAGE_UNITTEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698