| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 static std::unique_ptr<ResourcePool> Create( | 38 static std::unique_ptr<ResourcePool> Create( |
| 39 ResourceProvider* resource_provider, | 39 ResourceProvider* resource_provider, |
| 40 base::SingleThreadTaskRunner* task_runner) { | 40 base::SingleThreadTaskRunner* task_runner) { |
| 41 return base::WrapUnique( | 41 return base::WrapUnique( |
| 42 new ResourcePool(resource_provider, task_runner, false)); | 42 new ResourcePool(resource_provider, task_runner, false)); |
| 43 } | 43 } |
| 44 | 44 |
| 45 ~ResourcePool() override; | 45 ~ResourcePool() override; |
| 46 | 46 |
| 47 Resource* AcquireResource(const gfx::Size& size, ResourceFormat format); | 47 Resource* AcquireResource(const gfx::Size& size, |
| 48 ResourceFormat format, |
| 49 const gfx::ColorSpace& color_space); |
| 48 | 50 |
| 49 // Tries to acquire the resource with |previous_content_id| for us in partial | 51 // Tries to acquire the resource with |previous_content_id| for us in partial |
| 50 // raster. If successful, this function will retun the invalidated rect which | 52 // raster. If successful, this function will retun the invalidated rect which |
| 51 // must be re-rastered in |total_invalidated_rect|. | 53 // must be re-rastered in |total_invalidated_rect|. |
| 52 Resource* TryAcquireResourceForPartialRaster( | 54 Resource* TryAcquireResourceForPartialRaster( |
| 53 uint64_t new_content_id, | 55 uint64_t new_content_id, |
| 54 const gfx::Rect& new_invalidated_rect, | 56 const gfx::Rect& new_invalidated_rect, |
| 55 uint64_t previous_content_id, | 57 uint64_t previous_content_id, |
| 56 gfx::Rect* total_invalidated_rect); | 58 gfx::Rect* total_invalidated_rect); |
| 57 | 59 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 base::TimeDelta resource_expiration_delay_; | 161 base::TimeDelta resource_expiration_delay_; |
| 160 | 162 |
| 161 base::WeakPtrFactory<ResourcePool> weak_ptr_factory_; | 163 base::WeakPtrFactory<ResourcePool> weak_ptr_factory_; |
| 162 | 164 |
| 163 DISALLOW_COPY_AND_ASSIGN(ResourcePool); | 165 DISALLOW_COPY_AND_ASSIGN(ResourcePool); |
| 164 }; | 166 }; |
| 165 | 167 |
| 166 } // namespace cc | 168 } // namespace cc |
| 167 | 169 |
| 168 #endif // CC_RESOURCES_RESOURCE_POOL_H_ | 170 #endif // CC_RESOURCES_RESOURCE_POOL_H_ |
| OLD | NEW |