| 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/resource_pool.h" | 5 #include "cc/resources/resource_pool.h" |
| 6 | 6 |
| 7 #include "cc/resource_provider.h" | 7 #include "cc/resources/resource_provider.h" |
| 8 | 8 |
| 9 namespace cc { | 9 namespace cc { |
| 10 | 10 |
| 11 ResourcePool::Resource::Resource(cc::ResourceProvider* resource_provider, | 11 ResourcePool::Resource::Resource(cc::ResourceProvider* resource_provider, |
| 12 const gfx::Size& size, | 12 const gfx::Size& size, |
| 13 GLenum format) | 13 GLenum format) |
| 14 : cc::Resource(resource_provider->CreateManagedResource( | 14 : cc::Resource(resource_provider->CreateManagedResource( |
| 15 size, | 15 size, |
| 16 format, | 16 format, |
| 17 ResourceProvider::TextureUsageAny), | 17 ResourceProvider::TextureUsageAny), |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 if (memory_usage_bytes_ <= max_memory_usage_bytes_) | 88 if (memory_usage_bytes_ <= max_memory_usage_bytes_) |
| 89 break; | 89 break; |
| 90 Resource* resource = resources_.front(); | 90 Resource* resource = resources_.front(); |
| 91 resources_.pop_front(); | 91 resources_.pop_front(); |
| 92 memory_usage_bytes_ -= resource->bytes(); | 92 memory_usage_bytes_ -= resource->bytes(); |
| 93 delete resource; | 93 delete resource; |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace cc | 97 } // namespace cc |
| OLD | NEW |