| 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_RESOURCE_POOL_H_ | 5 #ifndef CC_RESOURCES_RESOURCE_POOL_H_ |
| 6 #define CC_RESOURCES_RESOURCE_POOL_H_ | 6 #define CC_RESOURCES_RESOURCE_POOL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "cc/base/cc_export.h" | |
| 12 #include "cc/output/renderer.h" | 11 #include "cc/output/renderer.h" |
| 13 #include "cc/resources/resource.h" | 12 #include "cc/resources/resource.h" |
| 14 #include "cc/resources/resource_format.h" | 13 #include "cc/resources/resource_format.h" |
| 15 | 14 |
| 16 namespace cc { | 15 namespace cc { |
| 17 class ScopedResource; | 16 class ScopedResource; |
| 18 | 17 |
| 19 class CC_EXPORT ResourcePool { | 18 class ResourcePool { |
| 20 public: | 19 public: |
| 21 static scoped_ptr<ResourcePool> Create(ResourceProvider* resource_provider, | 20 static scoped_ptr<ResourcePool> Create(ResourceProvider* resource_provider, |
| 22 GLenum target) { | 21 GLenum target) { |
| 23 return make_scoped_ptr(new ResourcePool(resource_provider, target)); | 22 return make_scoped_ptr(new ResourcePool(resource_provider, target)); |
| 24 } | 23 } |
| 25 | 24 |
| 26 virtual ~ResourcePool(); | 25 virtual ~ResourcePool(); |
| 27 | 26 |
| 28 scoped_ptr<ScopedResource> AcquireResource(const gfx::Size& size, | 27 scoped_ptr<ScopedResource> AcquireResource(const gfx::Size& size, |
| 29 ResourceFormat format); | 28 ResourceFormat format); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 typedef std::list<ScopedResource*> ResourceList; | 68 typedef std::list<ScopedResource*> ResourceList; |
| 70 ResourceList unused_resources_; | 69 ResourceList unused_resources_; |
| 71 ResourceList busy_resources_; | 70 ResourceList busy_resources_; |
| 72 | 71 |
| 73 DISALLOW_COPY_AND_ASSIGN(ResourcePool); | 72 DISALLOW_COPY_AND_ASSIGN(ResourcePool); |
| 74 }; | 73 }; |
| 75 | 74 |
| 76 } // namespace cc | 75 } // namespace cc |
| 77 | 76 |
| 78 #endif // CC_RESOURCES_RESOURCE_POOL_H_ | 77 #endif // CC_RESOURCES_RESOURCE_POOL_H_ |
| OLD | NEW |