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

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

Issue 1508893003: Use proper namespace in skia/ext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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
« no previous file with comments | « ui/gfx/image/image_skia_util_mac.mm ('k') | ui/gfx/image/image_unittest_util_mac.mm » ('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) 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 #include "ui/gfx/image/image_unittest_util.h" 8 #include "ui/gfx/image/image_unittest_util.h"
9 9
10 #include <cmath> 10 #include <cmath>
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 209
210 PlatformImage CreatePlatformImage() { 210 PlatformImage CreatePlatformImage() {
211 const SkBitmap bitmap(CreateBitmap(25, 25)); 211 const SkBitmap bitmap(CreateBitmap(25, 25));
212 #if defined(OS_IOS) 212 #if defined(OS_IOS)
213 float scale = ImageSkia::GetMaxSupportedScale(); 213 float scale = ImageSkia::GetMaxSupportedScale();
214 214
215 base::ScopedCFTypeRef<CGColorSpaceRef> color_space( 215 base::ScopedCFTypeRef<CGColorSpaceRef> color_space(
216 CGColorSpaceCreateDeviceRGB()); 216 CGColorSpaceCreateDeviceRGB());
217 UIImage* image = 217 UIImage* image =
218 gfx::SkBitmapToUIImageWithColorSpace(bitmap, scale, color_space); 218 skia::SkBitmapToUIImageWithColorSpace(bitmap, scale, color_space);
219 base::mac::NSObjectRetain(image); 219 base::mac::NSObjectRetain(image);
220 return image; 220 return image;
221 #elif defined(OS_MACOSX) 221 #elif defined(OS_MACOSX)
222 NSImage* image = gfx::SkBitmapToNSImageWithColorSpace( 222 NSImage* image = skia::SkBitmapToNSImageWithColorSpace(
223 bitmap, base::mac::GetGenericRGBColorSpace()); 223 bitmap, base::mac::GetGenericRGBColorSpace());
224 base::mac::NSObjectRetain(image); 224 base::mac::NSObjectRetain(image);
225 return image; 225 return image;
226 #else 226 #else
227 return gfx::ImageSkia::CreateFrom1xBitmap(bitmap); 227 return gfx::ImageSkia::CreateFrom1xBitmap(bitmap);
228 #endif 228 #endif
229 } 229 }
230 230
231 gfx::Image::RepresentationType GetPlatformRepresentationType() { 231 gfx::Image::RepresentationType GetPlatformRepresentationType() {
232 #if defined(OS_IOS) 232 #if defined(OS_IOS)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 bool PlatformImagesEqual(PlatformImage image1, PlatformImage image2) { 287 bool PlatformImagesEqual(PlatformImage image1, PlatformImage image2) {
288 #if defined(OS_MACOSX) 288 #if defined(OS_MACOSX)
289 return image1 == image2; 289 return image1 == image2;
290 #else 290 #else
291 return image1.BackedBySameObjectAs(image2); 291 return image1.BackedBySameObjectAs(image2);
292 #endif 292 #endif
293 } 293 }
294 294
295 } // namespace test 295 } // namespace test
296 } // namespace gfx 296 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/image/image_skia_util_mac.mm ('k') | ui/gfx/image/image_unittest_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698