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 #define _USE_MATH_DEFINES | 5 #define _USE_MATH_DEFINES |
6 #include <algorithm> | 6 #include <algorithm> |
7 #include <cmath> | 7 #include <cmath> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "skia/ext/image_operations.h" | 10 #include "skia/ext/image_operations.h" |
11 | 11 |
12 // TODO(pkasting): skia/ext should not depend on base/! | 12 // TODO(pkasting): skia/ext should not depend on base/! |
13 #include "base/containers/stack_container.h" | 13 #include "base/containers/stack_container.h" |
14 #include "base/debug/trace_event.h" | |
15 #include "base/logging.h" | 14 #include "base/logging.h" |
16 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
17 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "base/trace_event/trace_event.h" |
18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
19 #include "skia/ext/convolver.h" | 19 #include "skia/ext/convolver.h" |
20 #include "third_party/skia/include/core/SkColorPriv.h" | 20 #include "third_party/skia/include/core/SkColorPriv.h" |
21 #include "third_party/skia/include/core/SkRect.h" | 21 #include "third_party/skia/include/core/SkRect.h" |
22 | 22 |
23 namespace skia { | 23 namespace skia { |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 // Returns the ceiling/floor as an integer. | 27 // Returns the ceiling/floor as an integer. |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 SkBitmap ImageOperations::Resize(const SkBitmap& source, | 404 SkBitmap ImageOperations::Resize(const SkBitmap& source, |
405 ResizeMethod method, | 405 ResizeMethod method, |
406 int dest_width, int dest_height, | 406 int dest_width, int dest_height, |
407 SkBitmap::Allocator* allocator) { | 407 SkBitmap::Allocator* allocator) { |
408 SkIRect dest_subset = { 0, 0, dest_width, dest_height }; | 408 SkIRect dest_subset = { 0, 0, dest_width, dest_height }; |
409 return Resize(source, method, dest_width, dest_height, dest_subset, | 409 return Resize(source, method, dest_width, dest_height, dest_subset, |
410 allocator); | 410 allocator); |
411 } | 411 } |
412 | 412 |
413 } // namespace skia | 413 } // namespace skia |
OLD | NEW |