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

Side by Side Diff: cc/layers/layer_impl.cc

Issue 1547893003: WIP - compositor worker mega patch. 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
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/test/fake_layer_tree_host_client.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #include "cc/layers/layer_impl.h" 5 #include "cc/layers/layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 gfx::ScrollOffset current_offset = scroll_offset_->Current(IsActive()); 1557 gfx::ScrollOffset current_offset = scroll_offset_->Current(IsActive());
1558 if (node->data.scroll_offset != current_offset) { 1558 if (node->data.scroll_offset != current_offset) {
1559 node->data.scroll_offset = current_offset; 1559 node->data.scroll_offset = current_offset;
1560 node->data.needs_local_transform_update = true; 1560 node->data.needs_local_transform_update = true;
1561 transform_tree.set_needs_update(true); 1561 transform_tree.set_needs_update(true);
1562 } 1562 }
1563 } 1563 }
1564 } 1564 }
1565 1565
1566 void LayerImpl::DidUpdateScrollOffset() { 1566 void LayerImpl::DidUpdateScrollOffset() {
1567 TRACE_EVENT2("compositor-worker,scroll-compensation",
1568 "LayerImpl::DidUpdateScrollOffset", "x",
1569 scroll_offset_->Current(IsActive()).x(), "y",
1570 scroll_offset_->Current(IsActive()).y());
1571
1567 DCHECK(scroll_offset_); 1572 DCHECK(scroll_offset_);
1568 1573
1569 layer_tree_impl()->DidUpdateScrollState(id()); 1574 layer_tree_impl()->DidUpdateScrollState(id());
1570 NoteLayerPropertyChangedForSubtree(); 1575 NoteLayerPropertyChangedForSubtree();
1571 1576
1572 UpdatePropertyTreeScrollOffset(); 1577 UpdatePropertyTreeScrollOffset();
1573 1578
1574 // Inform the pending twin that a property changed. 1579 // Inform the pending twin that a property changed.
1575 if (layer_tree_impl()->IsActiveTree()) { 1580 if (layer_tree_impl()->IsActiveTree()) {
1576 LayerImpl* pending_twin = layer_tree_impl()->FindPendingTreeLayerById(id()); 1581 LayerImpl* pending_twin = layer_tree_impl()->FindPendingTreeLayerById(id());
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1916 .layer_transforms_should_scale_layer_contents) { 1921 .layer_transforms_should_scale_layer_contents) {
1917 return default_scale; 1922 return default_scale;
1918 } 1923 }
1919 1924
1920 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1925 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1921 DrawTransform(), default_scale); 1926 DrawTransform(), default_scale);
1922 return std::max(transform_scales.x(), transform_scales.y()); 1927 return std::max(transform_scales.x(), transform_scales.y());
1923 } 1928 }
1924 1929
1925 } // namespace cc 1930 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/test/fake_layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698