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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreePrinter.cpp

Issue 2334113002: Let slimmingPaintInvalidation plumbing work for spv1 (Closed)
Patch Set: - Created 4 years, 3 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 | « third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "core/paint/PaintPropertyTreePrinter.h" 5 #include "core/paint/PaintPropertyTreePrinter.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/layout/LayoutPart.h" 9 #include "core/layout/LayoutPart.h"
10 #include "core/layout/LayoutView.h" 10 #include "core/layout/LayoutView.h"
11 #include "core/paint/ObjectPaintProperties.h" 11 #include "core/paint/ObjectPaintProperties.h"
12 12
13 #include <iomanip> 13 #include <iomanip>
14 #include <sstream> 14 #include <sstream>
15 15
16 #ifndef NDEBUG 16 #ifndef NDEBUG
17 17
18 namespace blink { 18 namespace blink {
19 namespace { 19 namespace {
20 20
21 template <typename PropertyTreeNode> 21 template <typename PropertyTreeNode>
22 class PropertyTreePrinterTraits; 22 class PropertyTreePrinterTraits;
23 23
24 template <typename PropertyTreeNode> 24 template <typename PropertyTreeNode>
25 class PropertyTreePrinter { 25 class PropertyTreePrinter {
26 public: 26 public:
27 void showTree(const FrameView& frameView) 27 void showTree(const FrameView& frameView)
28 { 28 {
29 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 29 DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
30 LOG(ERROR) << "This is for slimmingPaintV2 only";
31 return;
32 }
33 collectPropertyNodes(frameView); 30 collectPropertyNodes(frameView);
34 showAllPropertyNodes(nullptr); 31 showAllPropertyNodes(nullptr);
35 } 32 }
36 33
37 void showPath(const PropertyTreeNode* node) 34 void showPath(const PropertyTreeNode* node)
38 { 35 {
39 for (const PropertyTreeNode* n = node; n; n = n->parent()) 36 for (const PropertyTreeNode* n = node; n; n = n->parent())
40 addPropertyNode(n, ""); 37 addPropertyNode(n, "");
41 showAllPropertyNodes(nullptr); 38 showAllPropertyNodes(nullptr);
42 } 39 }
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 525
529 String paintPropertyTreeGraph(const blink::FrameView& frameView) 526 String paintPropertyTreeGraph(const blink::FrameView& frameView)
530 { 527 {
531 blink::PaintPropertyTreeGraphBuilder builder; 528 blink::PaintPropertyTreeGraphBuilder builder;
532 StringBuilder stringBuilder; 529 StringBuilder stringBuilder;
533 builder.generateTreeGraph(frameView, stringBuilder); 530 builder.generateTreeGraph(frameView, stringBuilder);
534 return stringBuilder.toString(); 531 return stringBuilder.toString();
535 } 532 }
536 533
537 #endif 534 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698