| 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 #ifndef CC_RESOURCES_PRIORITIZED_RESOURCE_MANAGER_H_ | 5 #ifndef CC_RESOURCES_PRIORITIZED_RESOURCE_MANAGER_H_ |
| 6 #define CC_RESOURCES_PRIORITIZED_RESOURCE_MANAGER_H_ | 6 #define CC_RESOURCES_PRIORITIZED_RESOURCE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
| 15 #include "cc/base/cc_export.h" | 15 #include "cc/base/cc_export.h" |
| 16 #include "cc/resources/prioritized_resource.h" | 16 #include "cc/resources/prioritized_resource.h" |
| 17 #include "cc/resources/priority_calculator.h" | 17 #include "cc/resources/priority_calculator.h" |
| 18 #include "cc/resources/resource.h" | 18 #include "cc/resources/resource.h" |
| 19 #include "cc/trees/proxy.h" | 19 #include "ui/gfx/geometry/size.h" |
| 20 #include "ui/gfx/size.h" | |
| 21 | 20 |
| 22 namespace cc { | 21 namespace cc { |
| 23 | 22 |
| 24 class PriorityCalculator; | |
| 25 class Proxy; | 23 class Proxy; |
| 26 | 24 |
| 27 class CC_EXPORT PrioritizedResourceManager { | 25 class CC_EXPORT PrioritizedResourceManager { |
| 28 public: | 26 public: |
| 29 static scoped_ptr<PrioritizedResourceManager> Create(const Proxy* proxy) { | 27 static scoped_ptr<PrioritizedResourceManager> Create(const Proxy* proxy) { |
| 30 return make_scoped_ptr(new PrioritizedResourceManager(proxy)); | 28 return make_scoped_ptr(new PrioritizedResourceManager(proxy)); |
| 31 } | 29 } |
| 32 scoped_ptr<PrioritizedResource> CreateTexture( | 30 scoped_ptr<PrioritizedResource> CreateTexture( |
| 33 const gfx::Size& size, ResourceFormat format) { | 31 const gfx::Size& size, ResourceFormat format) { |
| 34 return make_scoped_ptr(new PrioritizedResource(this, size, format)); | 32 return make_scoped_ptr(new PrioritizedResource(this, size, format)); |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 // Statistics copied at the time of PushTexturePrioritiesToBackings. | 226 // Statistics copied at the time of PushTexturePrioritiesToBackings. |
| 229 size_t memory_visible_last_pushed_bytes_; | 227 size_t memory_visible_last_pushed_bytes_; |
| 230 size_t memory_visible_and_nearby_last_pushed_bytes_; | 228 size_t memory_visible_and_nearby_last_pushed_bytes_; |
| 231 | 229 |
| 232 DISALLOW_COPY_AND_ASSIGN(PrioritizedResourceManager); | 230 DISALLOW_COPY_AND_ASSIGN(PrioritizedResourceManager); |
| 233 }; | 231 }; |
| 234 | 232 |
| 235 } // namespace cc | 233 } // namespace cc |
| 236 | 234 |
| 237 #endif // CC_RESOURCES_PRIORITIZED_RESOURCE_MANAGER_H_ | 235 #endif // CC_RESOURCES_PRIORITIZED_RESOURCE_MANAGER_H_ |
| OLD | NEW |