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

Side by Side Diff: cc/layers/layer.h

Issue 960873002: Update from https://crrev.com/318214 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/layers/heads_up_display_layer_impl.cc ('k') | cc/layers/layer.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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_LAYERS_LAYER_H_ 5 #ifndef CC_LAYERS_LAYER_H_
6 #define CC_LAYERS_LAYER_H_ 6 #define CC_LAYERS_LAYER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 403
404 LayerTreeHost* layer_tree_host() { return layer_tree_host_; } 404 LayerTreeHost* layer_tree_host() { return layer_tree_host_; }
405 const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } 405 const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; }
406 406
407 // Set the priority of all desired textures in this layer. 407 // Set the priority of all desired textures in this layer.
408 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {} 408 virtual void SetTexturePriorities(const PriorityCalculator& priority_calc) {}
409 409
410 bool AddAnimation(scoped_ptr<Animation> animation); 410 bool AddAnimation(scoped_ptr<Animation> animation);
411 void PauseAnimation(int animation_id, double time_offset); 411 void PauseAnimation(int animation_id, double time_offset);
412 void RemoveAnimation(int animation_id); 412 void RemoveAnimation(int animation_id);
413 void RemoveAnimation(int animation_id, Animation::TargetProperty property);
413 414
414 LayerAnimationController* layer_animation_controller() { 415 LayerAnimationController* layer_animation_controller() {
415 return layer_animation_controller_.get(); 416 return layer_animation_controller_.get();
416 } 417 }
417 void SetLayerAnimationControllerForTest( 418 void SetLayerAnimationControllerForTest(
418 scoped_refptr<LayerAnimationController> controller); 419 scoped_refptr<LayerAnimationController> controller);
419 420
420 void set_layer_animation_delegate(AnimationDelegate* delegate) { 421 void set_layer_animation_delegate(AnimationDelegate* delegate) {
421 layer_animation_controller_->set_layer_animation_delegate(delegate); 422 layer_animation_controller_->set_layer_animation_delegate(delegate);
422 } 423 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 needs_push_properties_ = false; 466 needs_push_properties_ = false;
466 } 467 }
467 468
468 virtual void RunMicroBenchmark(MicroBenchmark* benchmark); 469 virtual void RunMicroBenchmark(MicroBenchmark* benchmark);
469 470
470 void Set3dSortingContextId(int id); 471 void Set3dSortingContextId(int id);
471 int sorting_context_id() const { return sorting_context_id_; } 472 int sorting_context_id() const { return sorting_context_id_; }
472 473
473 void set_transform_tree_index(int index) { transform_tree_index_ = index; } 474 void set_transform_tree_index(int index) { transform_tree_index_ = index; }
474 void set_clip_tree_index(int index) { clip_tree_index_ = index; } 475 void set_clip_tree_index(int index) { clip_tree_index_ = index; }
476 void set_opacity_tree_index(int index) { opacity_tree_index_ = index; }
475 int clip_tree_index() const { return clip_tree_index_; } 477 int clip_tree_index() const { return clip_tree_index_; }
476 int transform_tree_index() const { return transform_tree_index_; } 478 int transform_tree_index() const { return transform_tree_index_; }
479 int opacity_tree_index() const { return opacity_tree_index_; }
477 480
478 void set_offset_to_transform_parent(gfx::Vector2dF offset) { 481 void set_offset_to_transform_parent(gfx::Vector2dF offset) {
479 offset_to_transform_parent_ = offset; 482 offset_to_transform_parent_ = offset;
480 } 483 }
481 gfx::Vector2dF offset_to_transform_parent() const { 484 gfx::Vector2dF offset_to_transform_parent() const {
482 return offset_to_transform_parent_; 485 return offset_to_transform_parent_;
483 } 486 }
484 487
485 // TODO(vollick): Once we transition to transform and clip trees, rename these 488 // TODO(vollick): Once we transition to transform and clip trees, rename these
486 // functions and related values. The "from property trees" functions below 489 // functions and related values. The "from property trees" functions below
487 // use the transform and clip trees. Eventually, we will use these functions 490 // use the transform and clip trees. Eventually, we will use these functions
488 // to compute the official values, but these functions are retained for 491 // to compute the official values, but these functions are retained for
489 // testing purposes until we've migrated. 492 // testing purposes until we've migrated.
490 493
491 const gfx::Rect& visible_rect_from_property_trees() const { 494 const gfx::Rect& visible_rect_from_property_trees() const {
492 return visible_rect_from_property_trees_; 495 return visible_rect_from_property_trees_;
493 } 496 }
494 void set_visible_rect_from_property_trees(const gfx::Rect& rect) { 497 void set_visible_rect_from_property_trees(const gfx::Rect& rect) {
495 visible_rect_from_property_trees_ = rect; 498 visible_rect_from_property_trees_ = rect;
496 } 499 }
497 500
498 gfx::Transform screen_space_transform_from_property_trees( 501 gfx::Transform screen_space_transform_from_property_trees(
499 const TransformTree& tree) const; 502 const TransformTree& tree) const;
500 gfx::Transform draw_transform_from_property_trees( 503 gfx::Transform draw_transform_from_property_trees(
501 const TransformTree& tree) const; 504 const TransformTree& tree) const;
505 float DrawOpacityFromPropertyTrees(const OpacityTree& tree) const;
502 506
503 // TODO(vollick): These values are temporary and will be removed as soon as 507 // TODO(vollick): These values are temporary and will be removed as soon as
504 // render surface determinations are moved out of CDP. They only exist because 508 // render surface determinations are moved out of CDP. They only exist because
505 // certain logic depends on whether or not a layer would render to a separate 509 // certain logic depends on whether or not a layer would render to a separate
506 // surface, but CDP destroys surfaces and targets it doesn't need, so without 510 // surface, but CDP destroys surfaces and targets it doesn't need, so without
507 // this boolean, this is impossible to determine after the fact without 511 // this boolean, this is impossible to determine after the fact without
508 // wastefully recomputing it. This is public for the time being so that it can 512 // wastefully recomputing it. This is public for the time being so that it can
509 // be accessed from CDP. 513 // be accessed from CDP.
510 bool has_render_surface() const { 514 bool has_render_surface() const {
511 return has_render_surface_; 515 return has_render_surface_;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 715
712 std::vector<FrameTimingRequest> frame_timing_requests_; 716 std::vector<FrameTimingRequest> frame_timing_requests_;
713 bool frame_timing_requests_dirty_; 717 bool frame_timing_requests_dirty_;
714 718
715 DISALLOW_COPY_AND_ASSIGN(Layer); 719 DISALLOW_COPY_AND_ASSIGN(Layer);
716 }; 720 };
717 721
718 } // namespace cc 722 } // namespace cc
719 723
720 #endif // CC_LAYERS_LAYER_H_ 724 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layers/heads_up_display_layer_impl.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698