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

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

Issue 140913002: Remove deferred repaint code from FrameView (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove more dead code Created 6 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 | « no previous file | Source/core/frame/FrameView.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) 1997 Martin Jones (mjones@kde.org) 2 Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 (C) 1998 Waldo Bastian (bastian@kde.org) 3 (C) 1998 Waldo Bastian (bastian@kde.org)
4 (C) 1998, 1999 Torben Weis (weis@kde.org) 4 (C) 1998, 1999 Torben Weis (weis@kde.org)
5 (C) 1999 Lars Knoll (knoll@kde.org) 5 (C) 1999 Lars Knoll (knoll@kde.org)
6 (C) 1999 Antti Koivisto (koivisto@kde.org) 6 (C) 1999 Antti Koivisto (koivisto@kde.org)
7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 bool hasSlowRepaintObjects() const { return m_slowRepaintObjectCount; } 179 bool hasSlowRepaintObjects() const { return m_slowRepaintObjectCount; }
180 180
181 // Includes fixed- and sticky-position objects. 181 // Includes fixed- and sticky-position objects.
182 typedef HashSet<RenderObject*> ViewportConstrainedObjectSet; 182 typedef HashSet<RenderObject*> ViewportConstrainedObjectSet;
183 void addViewportConstrainedObject(RenderObject*); 183 void addViewportConstrainedObject(RenderObject*);
184 void removeViewportConstrainedObject(RenderObject*); 184 void removeViewportConstrainedObject(RenderObject*);
185 const ViewportConstrainedObjectSet* viewportConstrainedObjects() const { ret urn m_viewportConstrainedObjects.get(); } 185 const ViewportConstrainedObjectSet* viewportConstrainedObjects() const { ret urn m_viewportConstrainedObjects.get(); }
186 bool hasViewportConstrainedObjects() const { return m_viewportConstrainedObj ects && m_viewportConstrainedObjects->size() > 0; } 186 bool hasViewportConstrainedObjects() const { return m_viewportConstrainedObj ects && m_viewportConstrainedObjects->size() > 0; }
187 187
188 void handleLoadCompleted(); 188 void handleLoadCompleted();
189 void resetDeferredRepaintDelay();
190 189
191 void updateAnnotatedRegions(); 190 void updateAnnotatedRegions();
192 void updateControlTints(); 191 void updateControlTints();
193 192
194 void restoreScrollbar(); 193 void restoreScrollbar();
195 194
196 void postLayoutTimerFired(Timer<FrameView>*); 195 void postLayoutTimerFired(Timer<FrameView>*);
197 196
198 bool wasScrolledByUser() const; 197 bool wasScrolledByUser() const;
199 void setWasScrolledByUser(bool); 198 void setWasScrolledByUser(bool);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 protected: 321 protected:
323 virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRec t& rectToScroll, const IntRect& clipRect) OVERRIDE; 322 virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRec t& rectToScroll, const IntRect& clipRect) OVERRIDE;
324 virtual void scrollContentsSlowPath(const IntRect& updateRect) OVERRIDE; 323 virtual void scrollContentsSlowPath(const IntRect& updateRect) OVERRIDE;
325 324
326 virtual bool isVerticalDocument() const OVERRIDE; 325 virtual bool isVerticalDocument() const OVERRIDE;
327 virtual bool isFlippedDocument() const OVERRIDE; 326 virtual bool isFlippedDocument() const OVERRIDE;
328 327
329 private: 328 private:
330 explicit FrameView(Frame*); 329 explicit FrameView(Frame*);
331 330
332 void flushDeferredRepaints();
333 void startDeferredRepaintTimer(double delay);
334
335 void reset(); 331 void reset();
336 void init(); 332 void init();
337 333
338 virtual void frameRectsChanged() OVERRIDE; 334 virtual void frameRectsChanged() OVERRIDE;
339 virtual bool isFrameView() const OVERRIDE { return true; } 335 virtual bool isFrameView() const OVERRIDE { return true; }
340 336
341 friend class RenderWidget; 337 friend class RenderWidget;
342 bool useSlowRepaints(bool considerOverlap = true) const; 338 bool useSlowRepaints(bool considerOverlap = true) const;
343 bool useSlowRepaintsIfNotOverlapped() const; 339 bool useSlowRepaintsIfNotOverlapped() const;
344 void updateCanBlitOnScrollRecursively(); 340 void updateCanBlitOnScrollRecursively();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 virtual GraphicsLayer* layerForHorizontalScrollbar() const OVERRIDE; 382 virtual GraphicsLayer* layerForHorizontalScrollbar() const OVERRIDE;
387 virtual GraphicsLayer* layerForVerticalScrollbar() const OVERRIDE; 383 virtual GraphicsLayer* layerForVerticalScrollbar() const OVERRIDE;
388 virtual GraphicsLayer* layerForScrollCorner() const OVERRIDE; 384 virtual GraphicsLayer* layerForScrollCorner() const OVERRIDE;
389 385
390 void sendResizeEventIfNeeded(); 386 void sendResizeEventIfNeeded();
391 387
392 void updateScrollableAreaSet(); 388 void updateScrollableAreaSet();
393 389
394 virtual void notifyPageThatContentAreaWillPaint() const OVERRIDE; 390 virtual void notifyPageThatContentAreaWillPaint() const OVERRIDE;
395 391
396 bool shouldUseLoadTimeDeferredRepaintDelay() const;
397 void deferredRepaintTimerFired(Timer<FrameView>*);
398 void doDeferredRepaints();
399 void updateDeferredRepaintDelayAfterRepaint();
400 double adjustedDeferredRepaintDelay() const;
401
402 void updateWidgetsTimerFired(Timer<FrameView>*); 392 void updateWidgetsTimerFired(Timer<FrameView>*);
403 bool updateWidgets(); 393 bool updateWidgets();
404 394
405 void scrollToAnchor(); 395 void scrollToAnchor();
406 void scrollPositionChanged(); 396 void scrollPositionChanged();
407 397
408 bool hasCustomScrollbars() const; 398 bool hasCustomScrollbars() const;
409 bool shouldUseCustomScrollbars(Element*& customScrollbarElement, Frame*& cus tomScrollbarFrame); 399 bool shouldUseCustomScrollbars(Element*& customScrollbarElement, Frame*& cus tomScrollbarFrame);
410 400
411 virtual void updateScrollCorner() OVERRIDE; 401 virtual void updateScrollCorner() OVERRIDE;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 bool m_horizontalOverflow; 457 bool m_horizontalOverflow;
468 bool m_verticalOverflow; 458 bool m_verticalOverflow;
469 RenderObject* m_viewportRenderer; 459 RenderObject* m_viewportRenderer;
470 460
471 Pagination m_pagination; 461 Pagination m_pagination;
472 462
473 bool m_wasScrolledByUser; 463 bool m_wasScrolledByUser;
474 bool m_inProgrammaticScroll; 464 bool m_inProgrammaticScroll;
475 bool m_safeToPropagateScrollToParent; 465 bool m_safeToPropagateScrollToParent;
476 466
477 unsigned m_repaintCount;
478 Vector<LayoutRect> m_repaintRects;
479 Timer<FrameView> m_deferredRepaintTimer;
480 double m_deferredRepaintDelay;
481 double m_lastPaintTime; 467 double m_lastPaintTime;
482 468
483 bool m_isTrackingRepaints; // Used for testing. 469 bool m_isTrackingRepaints; // Used for testing.
484 Vector<IntRect> m_trackedRepaintRects; 470 Vector<IntRect> m_trackedRepaintRects;
485 471
486 RefPtr<Node> m_nodeToDraw; 472 RefPtr<Node> m_nodeToDraw;
487 PaintBehavior m_paintBehavior; 473 PaintBehavior m_paintBehavior;
488 bool m_isPainting; 474 bool m_isPainting;
489 475
490 unsigned m_visuallyNonEmptyCharacterCount; 476 unsigned m_visuallyNonEmptyCharacterCount;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 static const unsigned visualPixelThreshold = 32 * 32; 529 static const unsigned visualPixelThreshold = 32 * 32;
544 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 530 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
545 setIsVisuallyNonEmpty(); 531 setIsVisuallyNonEmpty();
546 } 532 }
547 533
548 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 534 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
549 535
550 } // namespace WebCore 536 } // namespace WebCore
551 537
552 #endif // FrameView_h 538 #endif // FrameView_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698