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

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 208143003: Issue trace events to gather repaint information. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/rendering/RenderFrameSet.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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 // let the compositor pick which to actually draw. 1033 // let the compositor pick which to actually draw.
1034 // See http://crbug.com/306706 1034 // See http://crbug.com/306706
1035 void FrameView::repaintTree(RenderObject* root) 1035 void FrameView::repaintTree(RenderObject* root)
1036 { 1036 {
1037 ASSERT(RuntimeEnabledFeatures::repaintAfterLayoutEnabled()); 1037 ASSERT(RuntimeEnabledFeatures::repaintAfterLayoutEnabled());
1038 ASSERT(!root->needsLayout()); 1038 ASSERT(!root->needsLayout());
1039 // We should only repaint for the outer most layout. This works as 1039 // We should only repaint for the outer most layout. This works as
1040 // we continue to track repaint rects until this function is called. 1040 // we continue to track repaint rects until this function is called.
1041 ASSERT(!m_nestedLayoutCount); 1041 ASSERT(!m_nestedLayoutCount);
1042 1042
1043 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), "FrameView::re paintTree");
1044
1043 // FIXME: really, we're in the repaint phase here, and the compositing queri es are legal. 1045 // FIXME: really, we're in the repaint phase here, and the compositing queri es are legal.
1044 // Until those states are fully fledged, I'll just disable the ASSERTS. 1046 // Until those states are fully fledged, I'll just disable the ASSERTS.
1045 DisableCompositingQueryAsserts disabler; 1047 DisableCompositingQueryAsserts disabler;
1046 1048
1047 for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPre Order()) { 1049 for (RenderObject* renderer = root; renderer; renderer = renderer->nextInPre Order()) {
1048 const LayoutRect& oldRepaintRect = renderer->oldRepaintRect(); 1050 const LayoutRect& oldRepaintRect = renderer->oldRepaintRect();
1049 const LayoutRect& newRepaintRect = renderer->newRepaintRect(); 1051 const LayoutRect& newRepaintRect = renderer->newRepaintRect();
1050 1052
1051 if ((renderer->onlyNeededPositionedMovementLayout() && renderer->composi tingState() != PaintsIntoOwnBacking) 1053 if ((renderer->onlyNeededPositionedMovementLayout() && renderer->composi tingState() != PaintsIntoOwnBacking)
1052 || (renderer->shouldDoFullRepaintIfSelfPaintingLayer() 1054 || (renderer->shouldDoFullRepaintIfSelfPaintingLayer()
(...skipping 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after
3088 void FrameView::setTracksRepaints(bool trackRepaints) 3090 void FrameView::setTracksRepaints(bool trackRepaints)
3089 { 3091 {
3090 if (trackRepaints == m_isTrackingRepaints) 3092 if (trackRepaints == m_isTrackingRepaints)
3091 return; 3093 return;
3092 3094
3093 for (LocalFrame* frame = m_frame->tree().top(); frame; frame = frame->tree() .traverseNext()) { 3095 for (LocalFrame* frame = m_frame->tree().top(); frame; frame = frame->tree() .traverseNext()) {
3094 if (RenderView* renderView = frame->contentRenderer()) 3096 if (RenderView* renderView = frame->contentRenderer())
3095 renderView->compositor()->setTracksRepaints(trackRepaints); 3097 renderView->compositor()->setTracksRepaints(trackRepaints);
3096 } 3098 }
3097 3099
3100 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"),
3101 "FrameView::setTracksRepaints", "enabled", trackRepaints);
3102
3098 resetTrackedRepaints(); 3103 resetTrackedRepaints();
3099 m_isTrackingRepaints = trackRepaints; 3104 m_isTrackingRepaints = trackRepaints;
3100 } 3105 }
3101 3106
3102 void FrameView::resetTrackedRepaints() 3107 void FrameView::resetTrackedRepaints()
3103 { 3108 {
3104 m_trackedRepaintRects.clear(); 3109 m_trackedRepaintRects.clear();
3105 if (RenderView* renderView = this->renderView()) 3110 if (RenderView* renderView = this->renderView())
3106 renderView->compositor()->resetTrackedRepaintRects(); 3111 renderView->compositor()->resetTrackedRepaintRects();
3107 } 3112 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
3253 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3258 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3254 { 3259 {
3255 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3260 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3256 if (AXObjectCache* cache = axObjectCache()) { 3261 if (AXObjectCache* cache = axObjectCache()) {
3257 cache->remove(scrollbar); 3262 cache->remove(scrollbar);
3258 cache->handleScrollbarUpdate(this); 3263 cache->handleScrollbarUpdate(this);
3259 } 3264 }
3260 } 3265 }
3261 3266
3262 } // namespace WebCore 3267 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderFrameSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698