OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "skia/ext/bitmap_platform_device_mac.h" | 5 #include "skia/ext/bitmap_platform_device_mac.h" |
6 | 6 |
7 #include <time.h> | 7 #include <time.h> |
8 | 8 |
9 #include "SkMatrix.h" | 9 #include "SkMatrix.h" |
10 #include "SkRegion.h" | 10 #include "SkRegion.h" |
11 #include "SkUtils.h" | 11 #include "SkUtils.h" |
12 | 12 |
13 #include "base/gfx/skia_utils_mac.h" | |
14 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "skia/ext/skia_utils_mac.h" |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // Constrains position and size to fit within available_size. If |size| is -1, | 20 // Constrains position and size to fit within available_size. If |size| is -1, |
21 // all the |available_size| is used. Returns false if the position is out of | 21 // all the |available_size| is used. Returns false if the position is out of |
22 // |available_size|. | 22 // |available_size|. |
23 bool Constrain(int available_size, int* position, int *size) { | 23 bool Constrain(int available_size, int* position, int *size) { |
24 if (*size < -2) | 24 if (*size < -2) |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 size_t offset = (i + bitmap_start_y) * row_words + bitmap_start_x; | 281 size_t offset = (i + bitmap_start_y) * row_words + bitmap_start_x; |
282 for (int j = 0; j < width; j++) { | 282 for (int j = 0; j < width; j++) { |
283 adjustor(data + offset + j); | 283 adjustor(data + offset + j); |
284 } | 284 } |
285 } | 285 } |
286 } | 286 } |
287 } | 287 } |
288 | 288 |
289 } // namespace gfx | 289 } // namespace gfx |
290 | 290 |
OLD | NEW |