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 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 return animation_registrar_.get(); | 238 return animation_registrar_.get(); |
239 } | 239 } |
240 | 240 |
241 skia::RefPtr<SkPicture> CapturePicture(); | 241 skia::RefPtr<SkPicture> CapturePicture(); |
242 | 242 |
243 bool BlocksPendingCommit() const; | 243 bool BlocksPendingCommit() const; |
244 | 244 |
245 // Obtains a thorough dump of the LayerTreeHost as a value. | 245 // Obtains a thorough dump of the LayerTreeHost as a value. |
246 scoped_ptr<base::Value> AsValue() const; | 246 scoped_ptr<base::Value> AsValue() const; |
247 | 247 |
| 248 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } |
| 249 |
248 protected: | 250 protected: |
249 LayerTreeHost(LayerTreeHostClient* client, const LayerTreeSettings& settings); | 251 LayerTreeHost(LayerTreeHostClient* client, const LayerTreeSettings& settings); |
250 bool Initialize(scoped_ptr<Thread> impl_thread); | 252 bool Initialize(scoped_ptr<Thread> impl_thread); |
251 bool InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); | 253 bool InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); |
252 | 254 |
253 private: | 255 private: |
254 bool InitializeProxy(scoped_ptr<Proxy> proxy); | 256 bool InitializeProxy(scoped_ptr<Proxy> proxy); |
255 void InitializeRenderer(); | 257 void InitializeRenderer(); |
256 | 258 |
257 bool PaintLayerContents(const LayerList& render_surface_layer_list, | 259 bool PaintLayerContents(const LayerList& render_surface_layer_list, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 float overdraw_bottom_height_; | 308 float overdraw_bottom_height_; |
307 float device_scale_factor_; | 309 float device_scale_factor_; |
308 | 310 |
309 bool visible_; | 311 bool visible_; |
310 | 312 |
311 typedef base::hash_map<WebKit::WebGraphicsContext3D*, | 313 typedef base::hash_map<WebKit::WebGraphicsContext3D*, |
312 scoped_refptr<RateLimiter> > RateLimiterMap; | 314 scoped_refptr<RateLimiter> > RateLimiterMap; |
313 RateLimiterMap rate_limiters_; | 315 RateLimiterMap rate_limiters_; |
314 | 316 |
315 float page_scale_factor_; | 317 float page_scale_factor_; |
316 float min_page_scale_factor_, max_page_scale_factor_; | 318 float min_page_scale_factor_; |
| 319 float max_page_scale_factor_; |
317 gfx::Transform impl_transform_; | 320 gfx::Transform impl_transform_; |
318 bool trigger_idle_updates_; | 321 bool trigger_idle_updates_; |
319 | 322 |
320 SkColor background_color_; | 323 SkColor background_color_; |
321 bool has_transparent_background_; | 324 bool has_transparent_background_; |
322 | 325 |
323 typedef ScopedPtrVector<PrioritizedResource> TextureList; | 326 typedef ScopedPtrVector<PrioritizedResource> TextureList; |
324 size_t partial_texture_update_requests_; | 327 size_t partial_texture_update_requests_; |
325 | 328 |
326 scoped_ptr<AnimationRegistrar> animation_registrar_; | 329 scoped_ptr<AnimationRegistrar> animation_registrar_; |
327 | 330 |
328 struct PendingPageScaleAnimation { | 331 struct PendingPageScaleAnimation { |
329 gfx::Vector2d target_offset; | 332 gfx::Vector2d target_offset; |
330 bool use_anchor; | 333 bool use_anchor; |
331 float scale; | 334 float scale; |
332 base::TimeDelta duration; | 335 base::TimeDelta duration; |
333 }; | 336 }; |
334 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 337 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
335 | 338 |
| 339 bool in_paint_layer_contents_; |
| 340 |
336 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 341 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
337 }; | 342 }; |
338 | 343 |
339 } // namespace cc | 344 } // namespace cc |
340 | 345 |
341 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 346 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |