| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_TREES_LAYER_TREE_HOST_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_H_ |
| 7 | 7 |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/cancelable_callback.h" | 12 #include "base/cancelable_callback.h" |
| 13 #include "base/hash_tables.h" | 13 #include "base/hash_tables.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "base/time.h" | 17 #include "base/time.h" |
| 18 #include "cc/animation/animation_events.h" | 18 #include "cc/animation/animation_events.h" |
| 19 #include "cc/base/cc_export.h" | 19 #include "cc/base/cc_export.h" |
| 20 #include "cc/base/scoped_ptr_vector.h" | 20 #include "cc/base/scoped_ptr_vector.h" |
| 21 #include "cc/layers/layer_lists.h" |
| 21 #include "cc/output/output_surface.h" | 22 #include "cc/output/output_surface.h" |
| 22 #include "cc/scheduler/rate_limiter.h" | 23 #include "cc/scheduler/rate_limiter.h" |
| 23 #include "cc/trees/layer_tree_host_client.h" | 24 #include "cc/trees/layer_tree_host_client.h" |
| 24 #include "cc/trees/layer_tree_host_common.h" | 25 #include "cc/trees/layer_tree_host_common.h" |
| 25 #include "cc/trees/layer_tree_settings.h" | 26 #include "cc/trees/layer_tree_settings.h" |
| 26 #include "cc/trees/occlusion_tracker.h" | 27 #include "cc/trees/occlusion_tracker.h" |
| 27 #include "cc/trees/proxy.h" | 28 #include "cc/trees/proxy.h" |
| 28 #include "skia/ext/refptr.h" | 29 #include "skia/ext/refptr.h" |
| 29 #include "third_party/skia/include/core/SkColor.h" | 30 #include "third_party/skia/include/core/SkColor.h" |
| 30 #include "third_party/skia/include/core/SkPicture.h" | 31 #include "third_party/skia/include/core/SkPicture.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 243 |
| 243 // Obtains a thorough dump of the LayerTreeHost as a value. | 244 // Obtains a thorough dump of the LayerTreeHost as a value. |
| 244 scoped_ptr<base::Value> AsValue() const; | 245 scoped_ptr<base::Value> AsValue() const; |
| 245 | 246 |
| 246 protected: | 247 protected: |
| 247 LayerTreeHost(LayerTreeHostClient* client, const LayerTreeSettings& settings); | 248 LayerTreeHost(LayerTreeHostClient* client, const LayerTreeSettings& settings); |
| 248 bool Initialize(scoped_ptr<Thread> impl_thread); | 249 bool Initialize(scoped_ptr<Thread> impl_thread); |
| 249 bool InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); | 250 bool InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); |
| 250 | 251 |
| 251 private: | 252 private: |
| 252 typedef std::vector<scoped_refptr<Layer> > LayerList; | |
| 253 | |
| 254 bool InitializeProxy(scoped_ptr<Proxy> proxy); | 253 bool InitializeProxy(scoped_ptr<Proxy> proxy); |
| 255 void InitializeRenderer(); | 254 void InitializeRenderer(); |
| 256 | 255 |
| 257 bool PaintLayerContents(const LayerList& render_surface_layer_list, | 256 bool PaintLayerContents(const LayerList& render_surface_layer_list, |
| 258 ResourceUpdateQueue* quue); | 257 ResourceUpdateQueue* quue); |
| 259 bool PaintMasksForRenderSurface(Layer* render_surface_layer, | 258 bool PaintMasksForRenderSurface(Layer* render_surface_layer, |
| 260 ResourceUpdateQueue* queue, | 259 ResourceUpdateQueue* queue, |
| 261 RenderingStats* stats); | 260 RenderingStats* stats); |
| 262 | 261 |
| 263 void UpdateLayers(Layer* root_layer, ResourceUpdateQueue* queue); | 262 void UpdateLayers(Layer* root_layer, ResourceUpdateQueue* queue); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 base::TimeDelta duration; | 335 base::TimeDelta duration; |
| 337 }; | 336 }; |
| 338 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 337 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
| 339 | 338 |
| 340 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 339 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 341 }; | 340 }; |
| 342 | 341 |
| 343 } // namespace cc | 342 } // namespace cc |
| 344 | 343 |
| 345 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 344 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |