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

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

Issue 1588093004: Compute if a layer is drawn without LayerTree hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PROPERTY_TREE_H_ 5 #ifndef CC_TREES_PROPERTY_TREE_H_
6 #define CC_TREES_PROPERTY_TREE_H_ 6 #define CC_TREES_PROPERTY_TREE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 typedef TreeNode<ClipNodeData> ClipNode; 236 typedef TreeNode<ClipNodeData> ClipNode;
237 237
238 struct CC_EXPORT EffectNodeData { 238 struct CC_EXPORT EffectNodeData {
239 EffectNodeData(); 239 EffectNodeData();
240 240
241 float opacity; 241 float opacity;
242 float screen_space_opacity; 242 float screen_space_opacity;
243 243
244 bool has_render_surface; 244 bool has_render_surface;
245 bool has_copy_request;
246 bool has_background_filters;
247 bool is_drawn;
248 bool screen_space_opacity_is_animating;
245 int num_copy_requests_in_subtree; 249 int num_copy_requests_in_subtree;
246 int transform_id; 250 int transform_id;
247 int clip_id; 251 int clip_id;
248 252
249 bool operator==(const EffectNodeData& other) const; 253 bool operator==(const EffectNodeData& other) const;
250 254
251 void ToProtobuf(proto::TreeNode* proto) const; 255 void ToProtobuf(proto::TreeNode* proto) const;
252 void FromProtobuf(const proto::TreeNode& proto); 256 void FromProtobuf(const proto::TreeNode& proto);
253 }; 257 };
254 258
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 }; 476 };
473 477
474 class CC_EXPORT EffectTree final : public PropertyTree<EffectNode> { 478 class CC_EXPORT EffectTree final : public PropertyTree<EffectNode> {
475 public: 479 public:
476 bool operator==(const EffectTree& other) const; 480 bool operator==(const EffectTree& other) const;
477 481
478 void UpdateEffects(int id); 482 void UpdateEffects(int id);
479 483
480 void ClearCopyRequests(); 484 void ClearCopyRequests();
481 485
486 bool ContributesToDrawnSurface(int id);
487
482 void ToProtobuf(proto::PropertyTree* proto) const; 488 void ToProtobuf(proto::PropertyTree* proto) const;
483 void FromProtobuf(const proto::PropertyTree& proto); 489 void FromProtobuf(const proto::PropertyTree& proto);
484 490
485 private: 491 private:
486 void UpdateOpacities(EffectNode* node, EffectNode* parent_node); 492 void UpdateOpacities(EffectNode* node, EffectNode* parent_node);
493 void UpdateIsDrawn(EffectNode* node, EffectNode* parent_node);
487 }; 494 };
488 495
489 class CC_EXPORT PropertyTrees final { 496 class CC_EXPORT PropertyTrees final {
490 public: 497 public:
491 PropertyTrees(); 498 PropertyTrees();
492 499
493 bool operator==(const PropertyTrees& other) const; 500 bool operator==(const PropertyTrees& other) const;
494 501
495 void ToProtobuf(proto::PropertyTrees* proto) const; 502 void ToProtobuf(proto::PropertyTrees* proto) const;
496 void FromProtobuf(const proto::PropertyTrees& proto); 503 void FromProtobuf(const proto::PropertyTrees& proto);
497 504
498 TransformTree transform_tree; 505 TransformTree transform_tree;
499 EffectTree effect_tree; 506 EffectTree effect_tree;
500 ClipTree clip_tree; 507 ClipTree clip_tree;
501 bool needs_rebuild; 508 bool needs_rebuild;
502 bool non_root_surfaces_enabled; 509 bool non_root_surfaces_enabled;
503 int sequence_number; 510 int sequence_number;
504 }; 511 };
505 512
506 } // namespace cc 513 } // namespace cc
507 514
508 #endif // CC_TREES_PROPERTY_TREE_H_ 515 #endif // CC_TREES_PROPERTY_TREE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698