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_UPDATE_CONTROLLER_H_ | 5 #ifndef CC_RESOURCES_RESOURCE_UPDATE_CONTROLLER_H_ |
6 #define CC_RESOURCES_RESOURCE_UPDATE_CONTROLLER_H_ | 6 #define CC_RESOURCES_RESOURCE_UPDATE_CONTROLLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 void UpdateTexture(ResourceUpdate update); | 65 void UpdateTexture(ResourceUpdate update); |
66 | 66 |
67 // This returns true when there were textures left to update. | 67 // This returns true when there were textures left to update. |
68 bool UpdateMoreTexturesIfEnoughTimeRemaining(); | 68 bool UpdateMoreTexturesIfEnoughTimeRemaining(); |
69 void UpdateMoreTexturesNow(); | 69 void UpdateMoreTexturesNow(); |
70 void OnTimerFired(); | 70 void OnTimerFired(); |
71 | 71 |
72 ResourceUpdateControllerClient* client_; | 72 ResourceUpdateControllerClient* client_; |
73 scoped_ptr<ResourceUpdateQueue> queue_; | 73 scoped_ptr<ResourceUpdateQueue> queue_; |
74 bool contents_textures_purged_; | |
75 ResourceProvider* resource_provider_; | 74 ResourceProvider* resource_provider_; |
76 base::TimeTicks time_limit_; | 75 base::TimeTicks time_limit_; |
77 size_t texture_updates_per_tick_; | 76 size_t texture_updates_per_tick_; |
78 bool first_update_attempt_; | 77 bool first_update_attempt_; |
79 base::SingleThreadTaskRunner* task_runner_; | 78 base::SingleThreadTaskRunner* task_runner_; |
80 bool task_posted_; | 79 bool task_posted_; |
81 bool ready_to_finalize_; | 80 bool ready_to_finalize_; |
82 base::WeakPtrFactory<ResourceUpdateController> weak_factory_; | 81 base::WeakPtrFactory<ResourceUpdateController> weak_factory_; |
83 | 82 |
84 DISALLOW_COPY_AND_ASSIGN(ResourceUpdateController); | 83 DISALLOW_COPY_AND_ASSIGN(ResourceUpdateController); |
85 }; | 84 }; |
86 | 85 |
87 } // namespace cc | 86 } // namespace cc |
88 | 87 |
89 #endif // CC_RESOURCES_RESOURCE_UPDATE_CONTROLLER_H_ | 88 #endif // CC_RESOURCES_RESOURCE_UPDATE_CONTROLLER_H_ |
OLD | NEW |