Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: cc/trees/layer_tree_host.h

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Sync with ToT Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/raster/raster_source_unittest.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 void StartPageScaleAnimation(const gfx::Vector2d& target_offset, 313 void StartPageScaleAnimation(const gfx::Vector2d& target_offset,
314 bool use_anchor, 314 bool use_anchor,
315 float scale, 315 float scale,
316 base::TimeDelta duration); 316 base::TimeDelta duration);
317 bool HasPendingPageScaleAnimation() const; 317 bool HasPendingPageScaleAnimation() const;
318 318
319 void SetDeviceScaleFactor(float device_scale_factor); 319 void SetDeviceScaleFactor(float device_scale_factor);
320 float device_scale_factor() const { return device_scale_factor_; } 320 float device_scale_factor() const { return device_scale_factor_; }
321 321
322 void SetRecordingScaleFactor(float recording_scale_factor);
323
322 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor); 324 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor);
323 float painted_device_scale_factor() const { 325 float painted_device_scale_factor() const {
324 return painted_device_scale_factor_; 326 return painted_device_scale_factor_;
325 } 327 }
326 328
327 void SetContentSourceId(uint32_t); 329 void SetContentSourceId(uint32_t);
328 uint32_t content_source_id() const { return content_source_id_; } 330 uint32_t content_source_id() const { return content_source_id_; }
329 331
330 // If this LayerTreeHost needs a valid viz::LocalSurfaceId then commits will 332 // If this LayerTreeHost needs a valid viz::LocalSurfaceId then commits will
331 // be deferred until a valid viz::LocalSurfaceId is provided. 333 // be deferred until a valid viz::LocalSurfaceId is provided.
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 490
489 void ScrollOffsetAnimationFinished() override {} 491 void ScrollOffsetAnimationFinished() override {}
490 gfx::ScrollOffset GetScrollOffsetForAnimation( 492 gfx::ScrollOffset GetScrollOffsetForAnimation(
491 ElementId element_id) const override; 493 ElementId element_id) const override;
492 494
493 void QueueImageDecode(const PaintImage& image, 495 void QueueImageDecode(const PaintImage& image,
494 const base::Callback<void(bool)>& callback); 496 const base::Callback<void(bool)>& callback);
495 497
496 void RequestBeginMainFrameNotExpected(bool new_state); 498 void RequestBeginMainFrameNotExpected(bool new_state);
497 499
500 float recording_scale_factor() const { return recording_scale_factor_; }
501
498 protected: 502 protected:
499 LayerTreeHost(InitParams* params, CompositorMode mode); 503 LayerTreeHost(InitParams* params, CompositorMode mode);
500 504
501 void InitializeThreaded( 505 void InitializeThreaded(
502 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 506 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
503 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 507 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
504 void InitializeSingleThreaded( 508 void InitializeSingleThreaded(
505 LayerTreeHostSingleThreadClient* single_thread_client, 509 LayerTreeHostSingleThreadClient* single_thread_client,
506 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); 510 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner);
507 void InitializeForTesting( 511 void InitializeForTesting(
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 ViewportLayers viewport_layers_; 599 ViewportLayers viewport_layers_;
596 600
597 float top_controls_height_ = 0.f; 601 float top_controls_height_ = 0.f;
598 float top_controls_shown_ratio_ = 0.f; 602 float top_controls_shown_ratio_ = 0.f;
599 bool browser_controls_shrink_blink_size_ = false; 603 bool browser_controls_shrink_blink_size_ = false;
600 604
601 float bottom_controls_height_ = 0.f; 605 float bottom_controls_height_ = 0.f;
602 606
603 float device_scale_factor_ = 1.f; 607 float device_scale_factor_ = 1.f;
604 float painted_device_scale_factor_ = 1.f; 608 float painted_device_scale_factor_ = 1.f;
609 float recording_scale_factor_ = 1.f;
605 float page_scale_factor_ = 1.f; 610 float page_scale_factor_ = 1.f;
606 float min_page_scale_factor_ = 1.f; 611 float min_page_scale_factor_ = 1.f;
607 float max_page_scale_factor_ = 1.f; 612 float max_page_scale_factor_ = 1.f;
608 gfx::ColorSpace raster_color_space_; 613 gfx::ColorSpace raster_color_space_;
609 614
610 uint32_t content_source_id_; 615 uint32_t content_source_id_;
611 viz::LocalSurfaceId local_surface_id_; 616 viz::LocalSurfaceId local_surface_id_;
612 bool defer_commits_ = false; 617 bool defer_commits_ = false;
613 618
614 SkColor background_color_ = SK_ColorWHITE; 619 SkColor background_color_ = SK_ColorWHITE;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 662
658 std::vector<std::pair<PaintImage, base::Callback<void(bool)>>> 663 std::vector<std::pair<PaintImage, base::Callback<void(bool)>>>
659 queued_image_decodes_; 664 queued_image_decodes_;
660 665
661 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 666 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
662 }; 667 };
663 668
664 } // namespace cc 669 } // namespace cc
665 670
666 #endif // CC_TREES_LAYER_TREE_HOST_H_ 671 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/raster/raster_source_unittest.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698