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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 310 |
311 void StartPageScaleAnimation(const gfx::Vector2d& target_offset, | 311 void StartPageScaleAnimation(const gfx::Vector2d& target_offset, |
312 bool use_anchor, | 312 bool use_anchor, |
313 float scale, | 313 float scale, |
314 base::TimeDelta duration); | 314 base::TimeDelta duration); |
315 bool HasPendingPageScaleAnimation() const; | 315 bool HasPendingPageScaleAnimation() const; |
316 | 316 |
317 void SetDeviceScaleFactor(float device_scale_factor); | 317 void SetDeviceScaleFactor(float device_scale_factor); |
318 float device_scale_factor() const { return device_scale_factor_; } | 318 float device_scale_factor() const { return device_scale_factor_; } |
319 | 319 |
| 320 void SetRecordingScaleFactor(float recording_scale_factor); |
| 321 |
320 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor); | 322 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor); |
321 float painted_device_scale_factor() const { | 323 float painted_device_scale_factor() const { |
322 return painted_device_scale_factor_; | 324 return painted_device_scale_factor_; |
323 } | 325 } |
324 | 326 |
325 void SetContentSourceId(uint32_t); | 327 void SetContentSourceId(uint32_t); |
326 uint32_t content_source_id() const { return content_source_id_; } | 328 uint32_t content_source_id() const { return content_source_id_; } |
327 | 329 |
328 // If this LayerTreeHost needs a valid LocalSurfaceId then commits will be | 330 // If this LayerTreeHost needs a valid LocalSurfaceId then commits will be |
329 // deferred until a valid LocalSurfaceId is provided. | 331 // deferred until a valid LocalSurfaceId is provided. |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 | 486 |
485 void ScrollOffsetAnimationFinished() override {} | 487 void ScrollOffsetAnimationFinished() override {} |
486 gfx::ScrollOffset GetScrollOffsetForAnimation( | 488 gfx::ScrollOffset GetScrollOffsetForAnimation( |
487 ElementId element_id) const override; | 489 ElementId element_id) const override; |
488 | 490 |
489 void QueueImageDecode(const PaintImage& image, | 491 void QueueImageDecode(const PaintImage& image, |
490 const base::Callback<void(bool)>& callback); | 492 const base::Callback<void(bool)>& callback); |
491 | 493 |
492 void RequestBeginMainFrameNotExpected(bool new_state); | 494 void RequestBeginMainFrameNotExpected(bool new_state); |
493 | 495 |
| 496 float recording_scale_factor() const { return recording_scale_factor_; } |
| 497 |
494 protected: | 498 protected: |
495 LayerTreeHost(InitParams* params, CompositorMode mode); | 499 LayerTreeHost(InitParams* params, CompositorMode mode); |
496 | 500 |
497 void InitializeThreaded( | 501 void InitializeThreaded( |
498 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 502 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
499 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 503 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
500 void InitializeSingleThreaded( | 504 void InitializeSingleThreaded( |
501 LayerTreeHostSingleThreadClient* single_thread_client, | 505 LayerTreeHostSingleThreadClient* single_thread_client, |
502 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); | 506 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); |
503 void InitializeForTesting( | 507 void InitializeForTesting( |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 ViewportLayers viewport_layers_; | 595 ViewportLayers viewport_layers_; |
592 | 596 |
593 float top_controls_height_ = 0.f; | 597 float top_controls_height_ = 0.f; |
594 float top_controls_shown_ratio_ = 0.f; | 598 float top_controls_shown_ratio_ = 0.f; |
595 bool browser_controls_shrink_blink_size_ = false; | 599 bool browser_controls_shrink_blink_size_ = false; |
596 | 600 |
597 float bottom_controls_height_ = 0.f; | 601 float bottom_controls_height_ = 0.f; |
598 | 602 |
599 float device_scale_factor_ = 1.f; | 603 float device_scale_factor_ = 1.f; |
600 float painted_device_scale_factor_ = 1.f; | 604 float painted_device_scale_factor_ = 1.f; |
| 605 float recording_scale_factor_ = 1.f; |
601 float page_scale_factor_ = 1.f; | 606 float page_scale_factor_ = 1.f; |
602 float min_page_scale_factor_ = 1.f; | 607 float min_page_scale_factor_ = 1.f; |
603 float max_page_scale_factor_ = 1.f; | 608 float max_page_scale_factor_ = 1.f; |
604 gfx::ColorSpace raster_color_space_; | 609 gfx::ColorSpace raster_color_space_; |
605 | 610 |
606 uint32_t content_source_id_; | 611 uint32_t content_source_id_; |
607 LocalSurfaceId local_surface_id_; | 612 LocalSurfaceId local_surface_id_; |
608 bool defer_commits_ = false; | 613 bool defer_commits_ = false; |
609 | 614 |
610 SkColor background_color_ = SK_ColorWHITE; | 615 SkColor background_color_ = SK_ColorWHITE; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 | 658 |
654 std::vector<std::pair<PaintImage, base::Callback<void(bool)>>> | 659 std::vector<std::pair<PaintImage, base::Callback<void(bool)>>> |
655 queued_image_decodes_; | 660 queued_image_decodes_; |
656 | 661 |
657 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 662 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
658 }; | 663 }; |
659 | 664 |
660 } // namespace cc | 665 } // namespace cc |
661 | 666 |
662 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 667 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |