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

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

Issue 10928093: Adds an iOS implementation of gfx::Image. (Closed) Base URL: http://git.chromium.org/chromium/src.git@skia
Patch Set: Cleanup. Created 8 years, 3 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
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_MACOSX) 17 #if defined(OS_IOS)
18 typedef UIImage* PlatformImage;
19 #elif defined(OS_MACOSX)
18 typedef NSImage* PlatformImage; 20 typedef NSImage* PlatformImage;
19 #elif defined(TOOLKIT_GTK) 21 #elif defined(TOOLKIT_GTK)
20 typedef GdkPixbuf* PlatformImage; 22 typedef GdkPixbuf* PlatformImage;
21 #else 23 #else
22 typedef const SkBitmap PlatformImage; 24 typedef const SkBitmap PlatformImage;
23 #endif 25 #endif
24 26
25 void SetSupportedScaleFactorsTo1xAnd2x(); 27 void SetSupportedScaleFactorsTo1xAnd2x();
26 28
27 const SkBitmap CreateBitmap(int width, int height); 29 const SkBitmap CreateBitmap(int width, int height);
(...skipping 17 matching lines...) Expand all
45 void CheckColor(SkColor color, bool is_red); 47 void CheckColor(SkColor color, bool is_red);
46 48
47 bool IsPlatformImageValid(PlatformImage image); 49 bool IsPlatformImageValid(PlatformImage image);
48 50
49 bool PlatformImagesEqual(PlatformImage image1, PlatformImage image2); 51 bool PlatformImagesEqual(PlatformImage image1, PlatformImage image2);
50 52
51 } // namespace test 53 } // namespace test
52 } // namespace gfx 54 } // namespace gfx
53 55
54 #endif // UI_GFX_IMAGE_IMAGE_UNITTEST_UTIL_H_ 56 #endif // UI_GFX_IMAGE_IMAGE_UNITTEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698