Chromium Code Reviews| 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 <list> | 9 #include <list> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 265 | 265 |
| 266 void SetImplTransform(const gfx::Transform& transform); | 266 void SetImplTransform(const gfx::Transform& transform); |
| 267 void SetLatencyInfo(const ui::LatencyInfo& latency_info); | 267 void SetLatencyInfo(const ui::LatencyInfo& latency_info); |
| 268 | 268 |
| 269 virtual void StartRateLimiter(WebKit::WebGraphicsContext3D* context3d); | 269 virtual void StartRateLimiter(WebKit::WebGraphicsContext3D* context3d); |
| 270 virtual void StopRateLimiter(WebKit::WebGraphicsContext3D* context3d); | 270 virtual void StopRateLimiter(WebKit::WebGraphicsContext3D* context3d); |
| 271 | 271 |
| 272 // RateLimiterClient implementation. | 272 // RateLimiterClient implementation. |
| 273 virtual void RateLimit() OVERRIDE; | 273 virtual void RateLimit() OVERRIDE; |
| 274 | 274 |
| 275 size_t MaxPartialTextureUpdates() const { | |
|
danakj
2013/10/03 17:42:26
rename to max_partial_texture_updates()
| |
| 276 return max_partial_texture_updates_; | |
| 277 } | |
| 275 bool buffered_updates() const { | 278 bool buffered_updates() const { |
| 276 return settings_.max_partial_texture_updates != | 279 return max_partial_texture_updates_ != |
| 277 std::numeric_limits<size_t>::max(); | 280 std::numeric_limits<size_t>::max(); |
| 278 } | 281 } |
| 279 bool RequestPartialTextureUpdate(); | 282 bool RequestPartialTextureUpdate(); |
| 280 | 283 |
| 281 void SetDeviceScaleFactor(float device_scale_factor); | 284 void SetDeviceScaleFactor(float device_scale_factor); |
| 282 float device_scale_factor() const { return device_scale_factor_; } | 285 float device_scale_factor() const { return device_scale_factor_; } |
| 283 | 286 |
| 284 void UpdateTopControlsState(TopControlsState constraints, | 287 void UpdateTopControlsState(TopControlsState constraints, |
| 285 TopControlsState current, | 288 TopControlsState current, |
| 286 bool animate); | 289 bool animate); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 382 | 385 |
| 383 scoped_refptr<Layer> root_layer_; | 386 scoped_refptr<Layer> root_layer_; |
| 384 scoped_refptr<HeadsUpDisplayLayer> hud_layer_; | 387 scoped_refptr<HeadsUpDisplayLayer> hud_layer_; |
| 385 | 388 |
| 386 scoped_ptr<PrioritizedResourceManager> contents_texture_manager_; | 389 scoped_ptr<PrioritizedResourceManager> contents_texture_manager_; |
| 387 scoped_ptr<PrioritizedResource> surface_memory_placeholder_; | 390 scoped_ptr<PrioritizedResource> surface_memory_placeholder_; |
| 388 | 391 |
| 389 base::WeakPtr<InputHandler> input_handler_weak_ptr_; | 392 base::WeakPtr<InputHandler> input_handler_weak_ptr_; |
| 390 base::WeakPtr<TopControlsManager> top_controls_manager_weak_ptr_; | 393 base::WeakPtr<TopControlsManager> top_controls_manager_weak_ptr_; |
| 391 | 394 |
| 392 LayerTreeSettings settings_; | 395 const LayerTreeSettings settings_; |
| 393 LayerTreeDebugState debug_state_; | 396 LayerTreeDebugState debug_state_; |
| 394 | 397 |
| 395 gfx::Size device_viewport_size_; | 398 gfx::Size device_viewport_size_; |
| 396 float overdraw_bottom_height_; | 399 float overdraw_bottom_height_; |
| 397 float device_scale_factor_; | 400 float device_scale_factor_; |
| 398 | 401 |
| 399 bool visible_; | 402 bool visible_; |
| 400 | 403 |
| 401 typedef base::hash_map<WebKit::WebGraphicsContext3D*, | 404 typedef base::hash_map<WebKit::WebGraphicsContext3D*, |
| 402 scoped_refptr<RateLimiter> > RateLimiterMap; | 405 scoped_refptr<RateLimiter> > RateLimiterMap; |
| 403 RateLimiterMap rate_limiters_; | 406 RateLimiterMap rate_limiters_; |
| 404 | 407 |
| 405 float page_scale_factor_; | 408 float page_scale_factor_; |
| 406 float min_page_scale_factor_; | 409 float min_page_scale_factor_; |
| 407 float max_page_scale_factor_; | 410 float max_page_scale_factor_; |
| 408 gfx::Transform impl_transform_; | 411 gfx::Transform impl_transform_; |
| 409 bool trigger_idle_updates_; | 412 bool trigger_idle_updates_; |
| 410 | 413 |
| 411 SkColor background_color_; | 414 SkColor background_color_; |
| 412 bool has_transparent_background_; | 415 bool has_transparent_background_; |
| 413 | 416 |
| 414 // If set, this texture is used to fill in the parts of the screen not | 417 // If set, this texture is used to fill in the parts of the screen not |
| 415 // covered by layers. | 418 // covered by layers. |
| 416 scoped_ptr<ScopedUIResource> overhang_ui_resource_; | 419 scoped_ptr<ScopedUIResource> overhang_ui_resource_; |
| 417 | 420 |
| 418 typedef ScopedPtrVector<PrioritizedResource> TextureList; | 421 typedef ScopedPtrVector<PrioritizedResource> TextureList; |
| 419 size_t partial_texture_update_requests_; | 422 size_t partial_texture_update_requests_; |
| 423 size_t max_partial_texture_updates_; | |
| 420 | 424 |
| 421 scoped_ptr<AnimationRegistrar> animation_registrar_; | 425 scoped_ptr<AnimationRegistrar> animation_registrar_; |
| 422 | 426 |
| 423 struct PendingPageScaleAnimation { | 427 struct PendingPageScaleAnimation { |
| 424 gfx::Vector2d target_offset; | 428 gfx::Vector2d target_offset; |
| 425 bool use_anchor; | 429 bool use_anchor; |
| 426 float scale; | 430 float scale; |
| 427 base::TimeDelta duration; | 431 base::TimeDelta duration; |
| 428 }; | 432 }; |
| 429 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 433 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 451 scoped_refptr<Layer> page_scale_layer_; | 455 scoped_refptr<Layer> page_scale_layer_; |
| 452 scoped_refptr<Layer> inner_viewport_scroll_layer_; | 456 scoped_refptr<Layer> inner_viewport_scroll_layer_; |
| 453 scoped_refptr<Layer> outer_viewport_scroll_layer_; | 457 scoped_refptr<Layer> outer_viewport_scroll_layer_; |
| 454 | 458 |
| 455 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 459 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 456 }; | 460 }; |
| 457 | 461 |
| 458 } // namespace cc | 462 } // namespace cc |
| 459 | 463 |
| 460 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 464 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |