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

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

Issue 2877673002: Rewrite Layer::SetScrollOffset{FromImplSide} property tree fast-path (Closed)
Patch Set: Suppress bug in PaintArtifactCompositor Created 3 years, 7 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 | « no previous file | cc/layers/layer.cc » ('j') | cc/layers/layer.cc » ('J')
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 void RemoveFromClipTree(); 498 void RemoveFromClipTree();
499 499
500 // When we detach or attach layer to new LayerTreeHost, all property trees' 500 // When we detach or attach layer to new LayerTreeHost, all property trees'
501 // indices becomes invalid. 501 // indices becomes invalid.
502 void InvalidatePropertyTreesIndices(); 502 void InvalidatePropertyTreesIndices();
503 503
504 // This is set whenever a property changed on layer that affects whether this 504 // This is set whenever a property changed on layer that affects whether this
505 // layer should own a property tree node or not. 505 // layer should own a property tree node or not.
506 void SetPropertyTreesNeedRebuild(); 506 void SetPropertyTreesNeedRebuild();
507 507
508 // Fast-path for |SetScrollOffset| and |SetScrollOffsetFromImplSide| to
509 // directly update scroll offset property values in the property tree without
510 // needing a full tree rebuild. Returns true if the property tree nodes were
511 // updated, false otherwise.
512 bool UpdateExistingScrollOffsetPropertyTreeNodes(const gfx::ScrollOffset&);
wkorman 2017/05/11 17:42:13 What about just "UpdateScrollOffset"? The rest see
enne (OOO) 2017/05/11 17:44:28 I assume this dance here is because you can SetScr
pdr. 2017/05/11 18:03:37 Good idears. Done.
513
508 // Encapsulates all data, callbacks or interfaces received from the embedder. 514 // Encapsulates all data, callbacks or interfaces received from the embedder.
509 // TODO(khushalsagar): This is only valid when PropertyTrees are built 515 // TODO(khushalsagar): This is only valid when PropertyTrees are built
510 // internally in cc. Update this for the SPv2 path where blink generates 516 // internally in cc. Update this for the SPv2 path where blink generates
511 // PropertyTrees. 517 // PropertyTrees.
512 struct Inputs { 518 struct Inputs {
513 explicit Inputs(int layer_id); 519 explicit Inputs(int layer_id);
514 ~Inputs(); 520 ~Inputs();
515 521
516 int layer_id; 522 int layer_id;
517 523
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 // These all act like draw properties, so don't need push properties. 635 // These all act like draw properties, so don't need push properties.
630 gfx::Rect visible_layer_rect_; 636 gfx::Rect visible_layer_rect_;
631 size_t num_unclipped_descendants_; 637 size_t num_unclipped_descendants_;
632 638
633 DISALLOW_COPY_AND_ASSIGN(Layer); 639 DISALLOW_COPY_AND_ASSIGN(Layer);
634 }; 640 };
635 641
636 } // namespace cc 642 } // namespace cc
637 643
638 #endif // CC_LAYERS_LAYER_H_ 644 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer.cc » ('j') | cc/layers/layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698