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

Side by Side Diff: sky/engine/core/frame/FrameView.cpp

Issue 803863003: Delete paint invalidation rect tracking. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « sky/engine/core/frame/FrameView.h ('k') | sky/engine/public/web/WebWidget.h » ('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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 : m_frame(frame) 68 : m_frame(frame)
69 , m_hasPendingLayout(false) 69 , m_hasPendingLayout(false)
70 , m_layoutSubtreeRoot(0) 70 , m_layoutSubtreeRoot(0)
71 , m_inSynchronousPostLayout(false) 71 , m_inSynchronousPostLayout(false)
72 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired) 72 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired)
73 , m_isTransparent(false) 73 , m_isTransparent(false)
74 , m_baseBackgroundColor(Color::white) 74 , m_baseBackgroundColor(Color::white)
75 , m_mediaType("screen") 75 , m_mediaType("screen")
76 , m_overflowStatusDirty(true) 76 , m_overflowStatusDirty(true)
77 , m_viewportRenderer(0) 77 , m_viewportRenderer(0)
78 , m_isTrackingPaintInvalidations(false)
79 , m_hasSoftwareFilters(false) 78 , m_hasSoftwareFilters(false)
80 , m_visibleContentScaleFactor(1) 79 , m_visibleContentScaleFactor(1)
81 , m_inputEventsScaleFactorForEmulation(1) 80 , m_inputEventsScaleFactorForEmulation(1)
82 , m_layoutSizeFixedToFrameSize(true) 81 , m_layoutSizeFixedToFrameSize(true)
83 { 82 {
84 ASSERT(m_frame); 83 ASSERT(m_frame);
85 init(); 84 init();
86 } 85 }
87 86
88 PassRefPtr<FrameView> FrameView::create(LocalFrame* frame) 87 PassRefPtr<FrameView> FrameView::create(LocalFrame* frame)
(...skipping 27 matching lines...) Expand all
116 m_layoutSchedulingEnabled = true; 115 m_layoutSchedulingEnabled = true;
117 m_inPerformLayout = false; 116 m_inPerformLayout = false;
118 m_canInvalidatePaintDuringPerformLayout = false; 117 m_canInvalidatePaintDuringPerformLayout = false;
119 m_inSynchronousPostLayout = false; 118 m_inSynchronousPostLayout = false;
120 m_layoutCount = 0; 119 m_layoutCount = 0;
121 m_nestedLayoutCount = 0; 120 m_nestedLayoutCount = 0;
122 m_postLayoutTasksTimer.stop(); 121 m_postLayoutTasksTimer.stop();
123 m_firstLayout = true; 122 m_firstLayout = true;
124 m_firstLayoutCallbackPending = false; 123 m_firstLayoutCallbackPending = false;
125 m_lastViewportSize = IntSize(); 124 m_lastViewportSize = IntSize();
126 m_isTrackingPaintInvalidations = false;
127 m_trackedPaintInvalidationRects.clear();
128 m_lastPaintTime = 0; 125 m_lastPaintTime = 0;
129 m_isPainting = false; 126 m_isPainting = false;
130 } 127 }
131 128
132 void FrameView::init() 129 void FrameView::init()
133 { 130 {
134 reset(); 131 reset();
135 132
136 m_size = LayoutSize(); 133 m_size = LayoutSize();
137 } 134 }
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 Page* page = frame().page(); 469 Page* page = frame().page();
473 if (!page) 470 if (!page)
474 return 0; 471 return 0;
475 return &page->chrome(); 472 return &page->chrome();
476 } 473 }
477 474
478 void FrameView::contentRectangleForPaintInvalidation(const IntRect& r) 475 void FrameView::contentRectangleForPaintInvalidation(const IntRect& r)
479 { 476 {
480 ASSERT(paintInvalidationIsAllowed()); 477 ASSERT(paintInvalidationIsAllowed());
481 478
482 if (m_isTrackingPaintInvalidations) {
483 m_trackedPaintInvalidationRects.append(r);
484 // FIXME: http://crbug.com/368518. Eventually, invalidateContentRectangl eForPaint
485 // is going away entirely once all layout tests are FCM. In the short
486 // term, no code should be tracking non-composited FrameView paint inval idations.
487 RELEASE_ASSERT_NOT_REACHED();
488 }
489
490 IntRect paintRect = r; 479 IntRect paintRect = r;
491 if (clipsPaintInvalidations() && !paintsEntireContents()) 480 if (clipsPaintInvalidations() && !paintsEntireContents())
492 paintRect.intersect(visibleContentRect()); 481 paintRect.intersect(visibleContentRect());
493 if (paintRect.isEmpty()) 482 if (paintRect.isEmpty())
494 return; 483 return;
495 484
496 if (HostWindow* window = hostWindow()) 485 if (HostWindow* window = hostWindow())
497 window->invalidateContentsAndRootView(contentsToWindow(paintRect)); 486 window->invalidateContentsAndRootView(contentsToWindow(paintRect));
498 } 487 }
499 488
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 IntPoint FrameView::convertFromRenderer(const RenderObject& renderer, const IntP oint& rendererPoint) const 895 IntPoint FrameView::convertFromRenderer(const RenderObject& renderer, const IntP oint& rendererPoint) const
907 { 896 {
908 return roundedIntPoint(renderer.localToAbsolute(rendererPoint, UseTransforms )); 897 return roundedIntPoint(renderer.localToAbsolute(rendererPoint, UseTransforms ));
909 } 898 }
910 899
911 IntPoint FrameView::convertToRenderer(const RenderObject& renderer, const IntPoi nt& viewPoint) const 900 IntPoint FrameView::convertToRenderer(const RenderObject& renderer, const IntPoi nt& viewPoint) const
912 { 901 {
913 return roundedIntPoint(renderer.absoluteToLocal(viewPoint, UseTransforms)); 902 return roundedIntPoint(renderer.absoluteToLocal(viewPoint, UseTransforms));
914 } 903 }
915 904
916 void FrameView::setTracksPaintInvalidations(bool trackPaintInvalidations)
917 {
918 // FIXME(sky): Does this code work anymore now that we don't have the compos itor?
919 if (trackPaintInvalidations == m_isTrackingPaintInvalidations)
920 return;
921
922 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"),
923 "FrameView::setTracksPaintInvalidations", TRACE_EVENT_SCOPE_PROCESS, "en abled", trackPaintInvalidations);
924
925 resetTrackedPaintInvalidations();
926 m_isTrackingPaintInvalidations = trackPaintInvalidations;
927 }
928
929 void FrameView::resetTrackedPaintInvalidations()
930 {
931 m_trackedPaintInvalidationRects.clear();
932 }
933
934 String FrameView::trackedPaintInvalidationRectsAsText() const
935 {
936 TextStream ts;
937 if (!m_trackedPaintInvalidationRects.isEmpty()) {
938 ts << "(repaint rects\n";
939 for (size_t i = 0; i < m_trackedPaintInvalidationRects.size(); ++i)
940 ts << " (rect " << m_trackedPaintInvalidationRects[i].x() << " " << m_trackedPaintInvalidationRects[i].y() << " " << m_trackedPaintInvalidationRect s[i].width() << " " << m_trackedPaintInvalidationRects[i].height() << ")\n";
941 ts << ")\n";
942 }
943 return ts.release();
944 }
945
946 void FrameView::addScrollableArea(ScrollableArea* scrollableArea) 905 void FrameView::addScrollableArea(ScrollableArea* scrollableArea)
947 { 906 {
948 ASSERT(scrollableArea); 907 ASSERT(scrollableArea);
949 if (!m_scrollableAreas) 908 if (!m_scrollableAreas)
950 m_scrollableAreas = adoptPtr(new ScrollableAreaSet); 909 m_scrollableAreas = adoptPtr(new ScrollableAreaSet);
951 m_scrollableAreas->add(scrollableArea); 910 m_scrollableAreas->add(scrollableArea);
952 } 911 }
953 912
954 void FrameView::removeScrollableArea(ScrollableArea* scrollableArea) 913 void FrameView::removeScrollableArea(ScrollableArea* scrollableArea)
955 { 914 {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 totalObjects = 0; 965 totalObjects = 0;
1007 966
1008 for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) { 967 for (RenderObject* o = root; o; o = o->nextInPreOrder(root)) {
1009 ++totalObjects; 968 ++totalObjects;
1010 if (o->needsLayout()) 969 if (o->needsLayout())
1011 ++needsLayoutObjects; 970 ++needsLayoutObjects;
1012 } 971 }
1013 } 972 }
1014 973
1015 } // namespace blink 974 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/frame/FrameView.h ('k') | sky/engine/public/web/WebWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698