OLD | NEW |
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 #include "ui/gfx/image/image_util.h" | 5 #include "ui/gfx/image/image_util.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include <algorithm> | 9 #include <algorithm> |
8 | 10 |
9 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "build/build_config.h" |
10 #include "third_party/skia/include/core/SkBitmap.h" | 13 #include "third_party/skia/include/core/SkBitmap.h" |
11 #include "ui/gfx/codec/jpeg_codec.h" | 14 #include "ui/gfx/codec/jpeg_codec.h" |
12 #include "ui/gfx/image/image.h" | 15 #include "ui/gfx/image/image.h" |
13 #include "ui/gfx/image/image_skia.h" | 16 #include "ui/gfx/image/image_skia.h" |
14 | 17 |
15 namespace gfx { | 18 namespace gfx { |
16 | 19 |
17 const uint32_t kMinimumVisibleOpacity = 12; | 20 const uint32_t kMinimumVisibleOpacity = 12; |
18 | 21 |
19 // The iOS implementations of the JPEG functions are in image_util_ios.mm. | 22 // The iOS implementations of the JPEG functions are in image_util_ios.mm. |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 *trailing = bitmap.width()/2 + 1; | 99 *trailing = bitmap.width()/2 + 1; |
97 return true; | 100 return true; |
98 } | 101 } |
99 | 102 |
100 *leading = inner_min; | 103 *leading = inner_min; |
101 *trailing = inner_max; | 104 *trailing = inner_max; |
102 return true; | 105 return true; |
103 } | 106 } |
104 | 107 |
105 } // namespace gfx | 108 } // namespace gfx |
OLD | NEW |