| 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 "cc/base/math_util.h" | 7 #include "cc/base/math_util.h" |
| 8 #include "cc/debug/traced_value.h" | 8 #include "cc/debug/traced_value.h" |
| 9 #include "cc/resources/tile_manager.h" | 9 #include "cc/resources/tile_manager.h" |
| 10 #include "third_party/khronos/GLES2/gl2.h" | 10 #include "third_party/khronos/GLES2/gl2.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 res->Set("content_rect", MathUtil::AsValue(content_rect_).release()); | 60 res->Set("content_rect", MathUtil::AsValue(content_rect_).release()); |
| 61 res->SetInteger("layer_id", layer_id_); | 61 res->SetInteger("layer_id", layer_id_); |
| 62 res->Set("active_priority", priority_[ACTIVE_TREE].AsValue().release()); | 62 res->Set("active_priority", priority_[ACTIVE_TREE].AsValue().release()); |
| 63 res->Set("pending_priority", priority_[PENDING_TREE].AsValue().release()); | 63 res->Set("pending_priority", priority_[PENDING_TREE].AsValue().release()); |
| 64 res->Set("managed_state", managed_state_.AsValue().release()); | 64 res->Set("managed_state", managed_state_.AsValue().release()); |
| 65 return res.PassAs<base::Value>(); | 65 return res.PassAs<base::Value>(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 size_t Tile::GPUMemoryUsageInBytes() const { | 68 size_t Tile::GPUMemoryUsageInBytes() const { |
| 69 size_t total_size = 0; | 69 size_t total_size = 0; |
| 70 for (int mode = 0; mode < NUM_RASTER_MODES; ++mode) | 70 for (int mode = 0; mode < RasterMode_ARRAYSIZE; ++mode) |
| 71 total_size += managed_state_.tile_versions[mode].GPUMemoryUsageInBytes(); | 71 total_size += managed_state_.tile_versions[mode].GPUMemoryUsageInBytes(); |
| 72 return total_size; | 72 return total_size; |
| 73 } | 73 } |
| 74 | 74 |
| 75 } // namespace cc | 75 } // namespace cc |
| OLD | NEW |