OLD | NEW |
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 "cc/resources/picture_layer_tiling.h" | 5 #include "cc/tiles/picture_layer_tiling.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <limits> | 9 #include <limits> |
10 #include <set> | 10 #include <set> |
11 | 11 |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/trace_event/trace_event.h" | 13 #include "base/trace_event/trace_event.h" |
14 #include "base/trace_event/trace_event_argument.h" | 14 #include "base/trace_event/trace_event_argument.h" |
15 #include "cc/base/math_util.h" | 15 #include "cc/base/math_util.h" |
16 #include "cc/resources/prioritized_tile.h" | 16 #include "cc/playback/raster_source.h" |
17 #include "cc/resources/raster_source.h" | 17 #include "cc/tiles/prioritized_tile.h" |
18 #include "cc/resources/tile.h" | 18 #include "cc/tiles/tile.h" |
19 #include "cc/resources/tile_priority.h" | 19 #include "cc/tiles/tile_priority.h" |
20 #include "ui/gfx/geometry/point_conversions.h" | 20 #include "ui/gfx/geometry/point_conversions.h" |
21 #include "ui/gfx/geometry/rect_conversions.h" | 21 #include "ui/gfx/geometry/rect_conversions.h" |
22 #include "ui/gfx/geometry/safe_integer_conversions.h" | 22 #include "ui/gfx/geometry/safe_integer_conversions.h" |
23 #include "ui/gfx/geometry/size_conversions.h" | 23 #include "ui/gfx/geometry/size_conversions.h" |
24 | 24 |
25 namespace cc { | 25 namespace cc { |
26 namespace { | 26 namespace { |
27 | 27 |
28 const float kSoonBorderDistanceViewportPercentage = 0.15f; | 28 const float kSoonBorderDistanceViewportPercentage = 0.15f; |
29 const float kMaxSoonBorderDistanceInScreenPixels = 312.f; | 29 const float kMaxSoonBorderDistanceInScreenPixels = 312.f; |
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1071 break; | 1071 break; |
1072 } | 1072 } |
1073 | 1073 |
1074 gfx::Rect result(origin_x, origin_y, width, height); | 1074 gfx::Rect result(origin_x, origin_y, width, height); |
1075 if (cache) | 1075 if (cache) |
1076 cache->previous_result = result; | 1076 cache->previous_result = result; |
1077 return result; | 1077 return result; |
1078 } | 1078 } |
1079 | 1079 |
1080 } // namespace cc | 1080 } // namespace cc |
OLD | NEW |