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

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

Issue 10378009: Get rid of Image::Image(SkBitmap*) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 8 years, 7 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
« no previous file with comments | « ui/gfx/image/image_unittest.cc ('k') | ui/gfx/image/image_unittest_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_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 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(TOOLKIT_GTK) 18 #elif defined(TOOLKIT_GTK)
19 typedef GdkPixbuf* PlatformImage; 19 typedef GdkPixbuf* PlatformImage;
20 #else 20 #else
21 typedef const SkBitmap* PlatformImage; 21 typedef const SkBitmap PlatformImage;
sky 2012/05/09 14:24:03 You sure you want this const?
22 #endif 22 #endif
23 23
24 SkBitmap* CreateBitmap(int width, int height); 24 const SkBitmap CreateBitmap(int width, int height);
25 25
26 gfx::Image CreateImage(); 26 gfx::Image CreateImage();
27 27
28 bool IsEqual(const gfx::Image& image1, const gfx::Image& image2); 28 bool IsEqual(const gfx::Image& image1, const gfx::Image& image2);
29 29
30 bool IsEmpty(const gfx::Image& image); 30 bool IsEmpty(const gfx::Image& image);
31 31
32 PlatformImage CreatePlatformImage(); 32 PlatformImage CreatePlatformImage();
33 33
34 gfx::Image::RepresentationType GetPlatformRepresentationType(); 34 gfx::Image::RepresentationType GetPlatformRepresentationType();
35 35
36 PlatformImage ToPlatformType(const gfx::Image& image); 36 PlatformImage ToPlatformType(const gfx::Image& image);
37 37
38 // Gets the platform representation and returns true if it is valid.
sky 2012/05/09 14:24:03 How about just: Returns true if the platform repre
pkotwicz 2012/05/10 21:56:07 This function is often used in unittests to genera
39 bool PlatformRepresentationIsValid(const gfx::Image& image);
40
41 bool PlatformImagesEqual(PlatformImage image1, PlatformImage image2);
42
38 } // namespace test 43 } // namespace test
39 } // namespace gfx 44 } // namespace gfx
40 45
41 #endif // UI_GFX_IMAGE_IMAGE_UNITTEST_UTIL_H_ 46 #endif // UI_GFX_IMAGE_IMAGE_UNITTEST_UTIL_H_
OLDNEW
« no previous file with comments | « ui/gfx/image/image_unittest.cc ('k') | ui/gfx/image/image_unittest_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698