| 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> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/cancelable_callback.h" | 13 #include "base/cancelable_callback.h" |
| 14 #include "base/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 19 #include "cc/animation/animation_events.h" | 19 #include "cc/animation/animation_events.h" |
| 20 #include "cc/base/cc_export.h" | 20 #include "cc/base/cc_export.h" |
| 21 #include "cc/base/scoped_ptr_vector.h" | 21 #include "cc/base/scoped_ptr_vector.h" |
| 22 #include "cc/input/input_handler.h" | 22 #include "cc/input/input_handler.h" |
| 23 #include "cc/input/scrollbar.h" | 23 #include "cc/input/scrollbar.h" |
| 24 #include "cc/input/top_controls_state.h" | 24 #include "cc/input/top_controls_state.h" |
| 25 #include "cc/layers/layer_lists.h" | 25 #include "cc/layers/layer_lists.h" |
| 26 #include "cc/output/output_surface.h" | 26 #include "cc/output/output_surface.h" |
| 27 #include "cc/resources/scoped_ui_resource.h" |
| 27 #include "cc/resources/ui_resource_bitmap.h" | 28 #include "cc/resources/ui_resource_bitmap.h" |
| 28 #include "cc/resources/ui_resource_client.h" | 29 #include "cc/resources/ui_resource_client.h" |
| 29 #include "cc/scheduler/rate_limiter.h" | 30 #include "cc/scheduler/rate_limiter.h" |
| 30 #include "cc/trees/layer_tree_host_client.h" | 31 #include "cc/trees/layer_tree_host_client.h" |
| 31 #include "cc/trees/layer_tree_host_common.h" | 32 #include "cc/trees/layer_tree_host_common.h" |
| 32 #include "cc/trees/layer_tree_settings.h" | 33 #include "cc/trees/layer_tree_settings.h" |
| 33 #include "cc/trees/occlusion_tracker.h" | 34 #include "cc/trees/occlusion_tracker.h" |
| 34 #include "cc/trees/proxy.h" | 35 #include "cc/trees/proxy.h" |
| 35 #include "third_party/skia/include/core/SkColor.h" | 36 #include "third_party/skia/include/core/SkColor.h" |
| 36 #include "ui/base/latency_info.h" | 37 #include "ui/base/latency_info.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 float max_page_scale_factor); | 218 float max_page_scale_factor); |
| 218 float page_scale_factor() const { return page_scale_factor_; } | 219 float page_scale_factor() const { return page_scale_factor_; } |
| 219 | 220 |
| 220 SkColor background_color() const { return background_color_; } | 221 SkColor background_color() const { return background_color_; } |
| 221 void set_background_color(SkColor color) { background_color_ = color; } | 222 void set_background_color(SkColor color) { background_color_ = color; } |
| 222 | 223 |
| 223 void set_has_transparent_background(bool transparent) { | 224 void set_has_transparent_background(bool transparent) { |
| 224 has_transparent_background_ = transparent; | 225 has_transparent_background_ = transparent; |
| 225 } | 226 } |
| 226 | 227 |
| 228 void SetOverhangBitmap(const SkBitmap& bitmap); |
| 229 |
| 227 PrioritizedResourceManager* contents_texture_manager() const { | 230 PrioritizedResourceManager* contents_texture_manager() const { |
| 228 return contents_texture_manager_.get(); | 231 return contents_texture_manager_.get(); |
| 229 } | 232 } |
| 230 | 233 |
| 231 void SetVisible(bool visible); | 234 void SetVisible(bool visible); |
| 232 bool visible() const { return visible_; } | 235 bool visible() const { return visible_; } |
| 233 | 236 |
| 234 void StartPageScaleAnimation(gfx::Vector2d target_offset, | 237 void StartPageScaleAnimation(gfx::Vector2d target_offset, |
| 235 bool use_anchor, | 238 bool use_anchor, |
| 236 float scale, | 239 float scale, |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 | 375 |
| 373 float page_scale_factor_; | 376 float page_scale_factor_; |
| 374 float min_page_scale_factor_; | 377 float min_page_scale_factor_; |
| 375 float max_page_scale_factor_; | 378 float max_page_scale_factor_; |
| 376 gfx::Transform impl_transform_; | 379 gfx::Transform impl_transform_; |
| 377 bool trigger_idle_updates_; | 380 bool trigger_idle_updates_; |
| 378 | 381 |
| 379 SkColor background_color_; | 382 SkColor background_color_; |
| 380 bool has_transparent_background_; | 383 bool has_transparent_background_; |
| 381 | 384 |
| 385 // If set, this texture is used to fill in the parts of the screen not |
| 386 // covered by layers. |
| 387 scoped_ptr<ScopedUIResource> overhang_ui_resource_; |
| 388 |
| 382 typedef ScopedPtrVector<PrioritizedResource> TextureList; | 389 typedef ScopedPtrVector<PrioritizedResource> TextureList; |
| 383 size_t partial_texture_update_requests_; | 390 size_t partial_texture_update_requests_; |
| 384 | 391 |
| 385 scoped_ptr<AnimationRegistrar> animation_registrar_; | 392 scoped_ptr<AnimationRegistrar> animation_registrar_; |
| 386 | 393 |
| 387 struct PendingPageScaleAnimation { | 394 struct PendingPageScaleAnimation { |
| 388 gfx::Vector2d target_offset; | 395 gfx::Vector2d target_offset; |
| 389 bool use_anchor; | 396 bool use_anchor; |
| 390 float scale; | 397 float scale; |
| 391 base::TimeDelta duration; | 398 base::TimeDelta duration; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 411 }; | 418 }; |
| 412 LCDTextMetrics lcd_text_metrics_; | 419 LCDTextMetrics lcd_text_metrics_; |
| 413 int tree_id_; | 420 int tree_id_; |
| 414 | 421 |
| 415 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 422 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 416 }; | 423 }; |
| 417 | 424 |
| 418 } // namespace cc | 425 } // namespace cc |
| 419 | 426 |
| 420 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 427 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |