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

Side by Side Diff: sky/engine/core/dom/Node.cpp

Issue 691663002: Unfork Sky's trace events (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/dom/Document.cpp ('k') | sky/engine/core/dom/ScriptedAnimationController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 } 610 }
611 611
612 void Node::traceStyleChange(StyleChangeType changeType) 612 void Node::traceStyleChange(StyleChangeType changeType)
613 { 613 {
614 static const unsigned kMinLoggedSize = 100; 614 static const unsigned kMinLoggedSize = 100;
615 unsigned nodeCount = styledSubtreeSize(); 615 unsigned nodeCount = styledSubtreeSize();
616 if (nodeCount < kMinLoggedSize) 616 if (nodeCount < kMinLoggedSize)
617 return; 617 return;
618 618
619 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("style.debug"), 619 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("style.debug"),
620 "Node::setNeedsStyleRecalc", 620 "Node::setNeedsStyleRecalc", TRACE_EVENT_SCOPE_PROCESS,
621 "data", jsonObjectForStyleInvalidation(nodeCount, this) 621 "data", jsonObjectForStyleInvalidation(nodeCount, this)
622 ); 622 );
623 } 623 }
624 624
625 void Node::traceStyleChangeIfNeeded(StyleChangeType changeType) 625 void Node::traceStyleChangeIfNeeded(StyleChangeType changeType)
626 { 626 {
627 // TRACE_EVENT_CATEGORY_GROUP_ENABLED macro loads a global static bool into our local bool. 627 // TRACE_EVENT_CATEGORY_GROUP_ENABLED macro loads a global static bool into our local bool.
628 bool styleTracingEnabled; 628 bool styleTracingEnabled;
629 TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("style.debug"), &styleTracingEnabled); 629 TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("style.debug"), &styleTracingEnabled);
630 if (UNLIKELY(styleTracingEnabled)) 630 if (UNLIKELY(styleTracingEnabled))
(...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 node->showTreeForThis(); 2058 node->showTreeForThis();
2059 } 2059 }
2060 2060
2061 void showNodePath(const blink::Node* node) 2061 void showNodePath(const blink::Node* node)
2062 { 2062 {
2063 if (node) 2063 if (node)
2064 node->showNodePathForThis(); 2064 node->showNodePathForThis();
2065 } 2065 }
2066 2066
2067 #endif 2067 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.cpp ('k') | sky/engine/core/dom/ScriptedAnimationController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698