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