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/tiles/picture_layer_tiling.h" | 5 #include "cc/tiles/picture_layer_tiling.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <cmath> | 10 #include <cmath> |
11 #include <limits> | 11 #include <limits> |
12 #include <set> | 12 #include <set> |
13 | 13 |
14 #include "base/containers/small_map.h" | 14 #include "base/containers/small_map.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/memory/ptr_util.h" | 16 #include "base/memory/ptr_util.h" |
17 #include "base/numerics/safe_conversions.h" | 17 #include "base/numerics/safe_conversions.h" |
18 #include "base/trace_event/trace_event.h" | 18 #include "base/trace_event/trace_event.h" |
19 #include "base/trace_event/trace_event_argument.h" | 19 #include "base/trace_event/trace_event_argument.h" |
20 #include "cc/base/math_util.h" | 20 #include "cc/base/math_util.h" |
21 #include "cc/playback/raster_source.h" | 21 #include "cc/raster/raster_source.h" |
22 #include "cc/tiles/prioritized_tile.h" | 22 #include "cc/tiles/prioritized_tile.h" |
23 #include "cc/tiles/tile.h" | 23 #include "cc/tiles/tile.h" |
24 #include "cc/tiles/tile_priority.h" | 24 #include "cc/tiles/tile_priority.h" |
25 #include "ui/gfx/geometry/point_conversions.h" | 25 #include "ui/gfx/geometry/point_conversions.h" |
26 #include "ui/gfx/geometry/rect_conversions.h" | 26 #include "ui/gfx/geometry/rect_conversions.h" |
27 #include "ui/gfx/geometry/rect_f.h" | 27 #include "ui/gfx/geometry/rect_f.h" |
28 #include "ui/gfx/geometry/safe_integer_conversions.h" | 28 #include "ui/gfx/geometry/safe_integer_conversions.h" |
29 #include "ui/gfx/geometry/size_conversions.h" | 29 #include "ui/gfx/geometry/size_conversions.h" |
30 | 30 |
31 namespace cc { | 31 namespace cc { |
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 size_t PictureLayerTiling::GPUMemoryUsageInBytes() const { | 938 size_t PictureLayerTiling::GPUMemoryUsageInBytes() const { |
939 size_t amount = 0; | 939 size_t amount = 0; |
940 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) { | 940 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) { |
941 const Tile* tile = it->second.get(); | 941 const Tile* tile = it->second.get(); |
942 amount += tile->GPUMemoryUsageInBytes(); | 942 amount += tile->GPUMemoryUsageInBytes(); |
943 } | 943 } |
944 return amount; | 944 return amount; |
945 } | 945 } |
946 | 946 |
947 } // namespace cc | 947 } // namespace cc |
OLD | NEW |