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

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

Issue 2683433002: Set m_graphicsLayer as fixed position container (Closed)
Patch Set: Add test, remove cc workaround Created 3 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 | « no previous file | third_party/WebKit/LayoutTests/compositing/fixed-position-container.html » ('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 #include "cc/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 transform_node->transform_changed = true; 593 transform_node->transform_changed = true;
594 layer_tree_host_->property_trees()->transform_tree.set_needs_update(true); 594 layer_tree_host_->property_trees()->transform_tree.set_needs_update(true);
595 SetNeedsCommitNoRebuild(); 595 SetNeedsCommitNoRebuild();
596 return; 596 return;
597 } 597 }
598 598
599 SetNeedsCommit(); 599 SetNeedsCommit();
600 } 600 }
601 601
602 bool Layer::IsContainerForFixedPositionLayers() const { 602 bool Layer::IsContainerForFixedPositionLayers() const {
603 if (!inputs_.transform.IsIdentityOrTranslation())
604 return true;
605 if (parent_ && !parent_->inputs_.transform.IsIdentityOrTranslation())
606 return true;
607 return inputs_.is_container_for_fixed_position_layers; 603 return inputs_.is_container_for_fixed_position_layers;
608 } 604 }
609 605
610 bool Are2dAxisAligned(const gfx::Transform& a, const gfx::Transform& b) { 606 bool Are2dAxisAligned(const gfx::Transform& a, const gfx::Transform& b) {
611 if (a.IsScaleOrTranslation() && b.IsScaleOrTranslation()) { 607 if (a.IsScaleOrTranslation() && b.IsScaleOrTranslation()) {
612 return true; 608 return true;
613 } 609 }
614 610
615 gfx::Transform inverse(gfx::Transform::kSkipInitialization); 611 gfx::Transform inverse(gfx::Transform::kSkipInitialization);
616 if (b.GetInverse(&inverse)) { 612 if (b.GetInverse(&inverse)) {
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 ->num_copy_requests_in_subtree; 1569 ->num_copy_requests_in_subtree;
1574 } 1570 }
1575 1571
1576 gfx::Transform Layer::screen_space_transform() const { 1572 gfx::Transform Layer::screen_space_transform() const {
1577 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); 1573 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId);
1578 return draw_property_utils::ScreenSpaceTransform( 1574 return draw_property_utils::ScreenSpaceTransform(
1579 this, layer_tree_host_->property_trees()->transform_tree); 1575 this, layer_tree_host_->property_trees()->transform_tree);
1580 } 1576 }
1581 1577
1582 } // namespace cc 1578 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/compositing/fixed-position-container.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698