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

Side by Side Diff: ui/gfx/image/image_ios.mm

Issue 832953002: Cleanup: Update the path to gfx size headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 11 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
« no previous file with comments | « ui/gfx/image/image_family.cc ('k') | ui/gfx/image/image_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "ui/gfx/image/image.h" 5 #include "ui/gfx/image/image.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/mac/scoped_cftyperef.h" 12 #include "base/mac/scoped_cftyperef.h"
13 #include "base/mac/scoped_nsobject.h" 13 #include "base/mac/scoped_nsobject.h"
14 #include "ui/gfx/geometry/size.h"
14 #include "ui/gfx/image/image_png_rep.h" 15 #include "ui/gfx/image/image_png_rep.h"
15 #include "ui/gfx/image/image_skia.h" 16 #include "ui/gfx/image/image_skia.h"
16 #include "ui/gfx/image/image_skia_util_ios.h" 17 #include "ui/gfx/image/image_skia_util_ios.h"
17 #include "ui/gfx/size.h"
18 18
19 namespace gfx { 19 namespace gfx {
20 namespace internal { 20 namespace internal {
21 21
22 namespace { 22 namespace {
23 23
24 // Returns a 16x16 red UIImage to visually show when a UIImage cannot be 24 // Returns a 16x16 red UIImage to visually show when a UIImage cannot be
25 // created from PNG data. Logs error as well. 25 // created from PNG data. Logs error as well.
26 // Caller takes ownership of returned UIImage. 26 // Caller takes ownership of returned UIImage.
27 UIImage* CreateErrorUIImage(float scale) { 27 UIImage* CreateErrorUIImage(float scale) {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 126
127 gfx::Size UIImageSize(UIImage* image) { 127 gfx::Size UIImageSize(UIImage* image) {
128 int width = static_cast<int>(image.size.width); 128 int width = static_cast<int>(image.size.width);
129 int height = static_cast<int>(image.size.height); 129 int height = static_cast<int>(image.size.height);
130 return gfx::Size(width, height); 130 return gfx::Size(width, height);
131 } 131 }
132 132
133 } // namespace internal 133 } // namespace internal
134 } // namespace gfx 134 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/image/image_family.cc ('k') | ui/gfx/image/image_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698