| 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_LAYER_TREE_HOST_H_ | 5 #ifndef CC_LAYER_TREE_HOST_H_ |
| 6 #define CC_LAYER_TREE_HOST_H_ | 6 #define CC_LAYER_TREE_HOST_H_ |
| 7 | 7 |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/cancelable_callback.h" | 11 #include "base/cancelable_callback.h" |
| 12 #include "base/hash_tables.h" | 12 #include "base/hash_tables.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/time.h" | 15 #include "base/time.h" |
| 16 #include "cc/animation_events.h" | 16 #include "cc/animation_events.h" |
| 17 #include "cc/cc_export.h" | 17 #include "cc/cc_export.h" |
| 18 #include "cc/layer_tree_host_client.h" | 18 #include "cc/layer_tree_host_client.h" |
| 19 #include "cc/layer_tree_host_common.h" | 19 #include "cc/layer_tree_host_common.h" |
| 20 #include "cc/layer_tree_settings.h" | 20 #include "cc/layer_tree_settings.h" |
| 21 #include "cc/occlusion_tracker.h" | 21 #include "cc/occlusion_tracker.h" |
| 22 #include "cc/output_surface.h" | 22 #include "cc/output_surface.h" |
| 23 #include "cc/prioritized_resource_manager.h" | 23 #include "cc/prioritized_resource_manager.h" |
| 24 #include "cc/proxy.h" | 24 #include "cc/proxy.h" |
| 25 #include "cc/rate_limiter.h" | 25 #include "cc/rate_limiter.h" |
| 26 #include "cc/rendering_stats.h" | 26 #include "cc/rendering_stats.h" |
| 27 #include "cc/scoped_ptr_vector.h" | 27 #include "cc/scoped_ptr_vector.h" |
| 28 #include "skia/ext/refptr.h" |
| 28 #include "third_party/skia/include/core/SkColor.h" | 29 #include "third_party/skia/include/core/SkColor.h" |
| 30 #include "third_party/skia/include/core/SkPicture.h" |
| 29 #include "ui/gfx/rect.h" | 31 #include "ui/gfx/rect.h" |
| 30 | 32 |
| 31 #if defined(COMPILER_GCC) | 33 #if defined(COMPILER_GCC) |
| 32 namespace BASE_HASH_NAMESPACE { | 34 namespace BASE_HASH_NAMESPACE { |
| 33 template<> | 35 template<> |
| 34 struct hash<WebKit::WebGraphicsContext3D*> { | 36 struct hash<WebKit::WebGraphicsContext3D*> { |
| 35 size_t operator()(WebKit::WebGraphicsContext3D* ptr) const { | 37 size_t operator()(WebKit::WebGraphicsContext3D* ptr) const { |
| 36 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); | 38 return hash<size_t>()(reinterpret_cast<size_t>(ptr)); |
| 37 } | 39 } |
| 38 }; | 40 }; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 196 |
| 195 void setDeviceScaleFactor(float); | 197 void setDeviceScaleFactor(float); |
| 196 float deviceScaleFactor() const { return m_deviceScaleFactor; } | 198 float deviceScaleFactor() const { return m_deviceScaleFactor; } |
| 197 | 199 |
| 198 HeadsUpDisplayLayer* hudLayer() const { return m_hudLayer.get(); } | 200 HeadsUpDisplayLayer* hudLayer() const { return m_hudLayer.get(); } |
| 199 | 201 |
| 200 Proxy* proxy() const { return m_proxy.get(); } | 202 Proxy* proxy() const { return m_proxy.get(); } |
| 201 | 203 |
| 202 AnimationRegistrar* animationRegistrar() const { return m_animationRegistrar
.get(); } | 204 AnimationRegistrar* animationRegistrar() const { return m_animationRegistrar
.get(); } |
| 203 | 205 |
| 206 skia::RefPtr<SkPicture> capturePicture(); |
| 207 |
| 204 protected: | 208 protected: |
| 205 LayerTreeHost(LayerTreeHostClient*, const LayerTreeSettings&); | 209 LayerTreeHost(LayerTreeHostClient*, const LayerTreeSettings&); |
| 206 bool initialize(scoped_ptr<Thread> implThread); | 210 bool initialize(scoped_ptr<Thread> implThread); |
| 207 bool initializeForTesting(scoped_ptr<Proxy> proxyForTesting); | 211 bool initializeForTesting(scoped_ptr<Proxy> proxyForTesting); |
| 208 | 212 |
| 209 private: | 213 private: |
| 210 typedef std::vector<scoped_refptr<Layer> > LayerList; | 214 typedef std::vector<scoped_refptr<Layer> > LayerList; |
| 211 | 215 |
| 212 bool initializeProxy(scoped_ptr<Proxy> proxy); | 216 bool initializeProxy(scoped_ptr<Proxy> proxy); |
| 213 void initializeRenderer(); | 217 void initializeRenderer(); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 scoped_ptr<AnimationRegistrar> m_animationRegistrar; | 282 scoped_ptr<AnimationRegistrar> m_animationRegistrar; |
| 279 | 283 |
| 280 static bool s_needsFilterContext; | 284 static bool s_needsFilterContext; |
| 281 | 285 |
| 282 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 286 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 283 }; | 287 }; |
| 284 | 288 |
| 285 } // namespace cc | 289 } // namespace cc |
| 286 | 290 |
| 287 #endif // CC_LAYER_TREE_HOST_H_ | 291 #endif // CC_LAYER_TREE_HOST_H_ |
| OLD | NEW |