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

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

Issue 2839533002: Remove Layer/LayerImpl's FixedContainerSizeDelta (Closed)
Patch Set: Remove FixedContainerSizeDelta Created 3 years, 8 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_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.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 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 <algorithm> 10 #include <algorithm>
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 update_rect_ = gfx::Rect(); 369 update_rect_ = gfx::Rect();
370 layer_tree_impl()->RemoveLayerShouldPushProperties(this); 370 layer_tree_impl()->RemoveLayerShouldPushProperties(this);
371 } 371 }
372 372
373 bool LayerImpl::IsAffectedByPageScale() const { 373 bool LayerImpl::IsAffectedByPageScale() const {
374 TransformTree& transform_tree = GetTransformTree(); 374 TransformTree& transform_tree = GetTransformTree();
375 return transform_tree.Node(transform_tree_index()) 375 return transform_tree.Node(transform_tree_index())
376 ->in_subtree_of_page_scale_layer; 376 ->in_subtree_of_page_scale_layer;
377 } 377 }
378 378
379 gfx::Vector2dF LayerImpl::FixedContainerSizeDelta() const {
380 LayerImpl* scroll_clip_layer =
381 layer_tree_impl()->LayerById(scroll_clip_layer_id_);
382 if (!scroll_clip_layer)
383 return gfx::Vector2dF();
384
385 return scroll_clip_layer->ViewportBoundsDelta();
386 }
387
388 std::unique_ptr<base::DictionaryValue> LayerImpl::LayerTreeAsJson() { 379 std::unique_ptr<base::DictionaryValue> LayerImpl::LayerTreeAsJson() {
389 std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue); 380 std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue);
390 result->SetInteger("LayerId", id()); 381 result->SetInteger("LayerId", id());
391 result->SetString("LayerType", LayerTypeAsString()); 382 result->SetString("LayerType", LayerTypeAsString());
392 383
393 auto list = base::MakeUnique<base::ListValue>(); 384 auto list = base::MakeUnique<base::ListValue>();
394 list->AppendInteger(bounds().width()); 385 list->AppendInteger(bounds().width());
395 list->AppendInteger(bounds().height()); 386 list->AppendInteger(bounds().height());
396 result->Set("Bounds", std::move(list)); 387 result->Set("Bounds", std::move(list));
397 388
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 979
989 ScrollTree& LayerImpl::GetScrollTree() const { 980 ScrollTree& LayerImpl::GetScrollTree() const {
990 return GetPropertyTrees()->scroll_tree; 981 return GetPropertyTrees()->scroll_tree;
991 } 982 }
992 983
993 TransformTree& LayerImpl::GetTransformTree() const { 984 TransformTree& LayerImpl::GetTransformTree() const {
994 return GetPropertyTrees()->transform_tree; 985 return GetPropertyTrees()->transform_tree;
995 } 986 }
996 987
997 } // namespace cc 988 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698