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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/ScrollPaintPropertyNode.cpp

Issue 2651093003: Make scroll translation transform nodes reference scroll nodes (Closed)
Patch Set: Add note about scroll tree differences Created 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "platform/graphics/paint/ScrollPaintPropertyNode.h" 5 #include "platform/graphics/paint/ScrollPaintPropertyNode.h"
6 6
7 #include "platform/graphics/paint/PropertyTreeState.h" 7 #include "platform/graphics/paint/PropertyTreeState.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 ScrollPaintPropertyNode* ScrollPaintPropertyNode::root() { 11 ScrollPaintPropertyNode* ScrollPaintPropertyNode::root() {
12 DEFINE_STATIC_REF(ScrollPaintPropertyNode, root, 12 DEFINE_STATIC_REF(ScrollPaintPropertyNode, root,
13 (ScrollPaintPropertyNode::create( 13 (ScrollPaintPropertyNode::create(
14 nullptr, TransformPaintPropertyNode::root(), IntSize(), 14 nullptr, IntSize(), IntSize(), false, false, 0)));
15 IntSize(), false, false, 0)));
16 return root; 15 return root;
17 } 16 }
18 17
19 String ScrollPaintPropertyNode::toString() const { 18 String ScrollPaintPropertyNode::toString() const {
20 FloatSize scrollOffset =
21 m_scrollOffsetTranslation->matrix().to2DTranslation();
22 std::string mainThreadScrollingReasonsAsText = 19 std::string mainThreadScrollingReasonsAsText =
23 MainThreadScrollingReason::mainThreadScrollingReasonsAsText( 20 MainThreadScrollingReason::mainThreadScrollingReasonsAsText(
24 m_mainThreadScrollingReasons); 21 m_mainThreadScrollingReasons);
25 return String::format( 22 return String::format(
26 "parent=%p scrollOffsetTranslation=%s clip=%s bounds=%s " 23 "parent=%p clip=%s bounds=%s "
27 "userScrollableHorizontal=%s" 24 "userScrollableHorizontal=%s"
28 " userScrollableVertical=%s mainThreadScrollingReasons=%s" 25 " userScrollableVertical=%s mainThreadScrollingReasons=%s",
29 "compositorElementId=(%d, %d)", 26 m_parent.get(), m_clip.toString().ascii().data(),
30 m_parent.get(), scrollOffset.toString().ascii().data(), 27 m_bounds.toString().ascii().data(),
31 m_clip.toString().ascii().data(), m_bounds.toString().ascii().data(),
32 m_userScrollableHorizontal ? "yes" : "no", 28 m_userScrollableHorizontal ? "yes" : "no",
33 m_userScrollableVertical ? "yes" : "no", 29 m_userScrollableVertical ? "yes" : "no",
34 mainThreadScrollingReasonsAsText.c_str(), m_compositorElementId.primaryId, 30 mainThreadScrollingReasonsAsText.c_str());
35 m_compositorElementId.secondaryId);
36 } 31 }
37 32
38 #if DCHECK_IS_ON() 33 #if DCHECK_IS_ON()
39 34
40 String ScrollPaintPropertyNode::toTreeString() const { 35 String ScrollPaintPropertyNode::toTreeString() const {
41 return blink::PropertyTreeStatePrinter<blink::ScrollPaintPropertyNode>() 36 return blink::PropertyTreeStatePrinter<blink::ScrollPaintPropertyNode>()
42 .pathAsString(this); 37 .pathAsString(this);
43 } 38 }
44 39
45 #endif 40 #endif
46 41
47 } // namespace blink 42 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698