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/tile.h" | 5 #include "cc/resources/tile.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/debug/trace_event_argument.h" | 9 #include "base/trace_event/trace_event_argument.h" |
10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
11 #include "cc/debug/traced_value.h" | 11 #include "cc/debug/traced_value.h" |
12 #include "cc/resources/tile_manager.h" | 12 #include "cc/resources/tile_manager.h" |
13 #include "third_party/khronos/GLES2/gl2.h" | 13 #include "third_party/khronos/GLES2/gl2.h" |
14 | 14 |
15 namespace cc { | 15 namespace cc { |
16 | 16 |
17 Tile::Id Tile::s_next_id_ = 0; | 17 Tile::Id Tile::s_next_id_ = 0; |
18 | 18 |
19 Tile::Tile(TileManager* tile_manager, | 19 Tile::Tile(TileManager* tile_manager, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 res->SetInteger("gpu_memory_usage", GPUMemoryUsageInBytes()); | 83 res->SetInteger("gpu_memory_usage", GPUMemoryUsageInBytes()); |
84 } | 84 } |
85 | 85 |
86 size_t Tile::GPUMemoryUsageInBytes() const { | 86 size_t Tile::GPUMemoryUsageInBytes() const { |
87 if (draw_info_.resource_) | 87 if (draw_info_.resource_) |
88 return draw_info_.resource_->bytes(); | 88 return draw_info_.resource_->bytes(); |
89 return 0; | 89 return 0; |
90 } | 90 } |
91 | 91 |
92 } // namespace cc | 92 } // namespace cc |
OLD | NEW |