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

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

Issue 19782002: Make Blink stop scheduling its own Layout, and use the compositor's timer instead (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: With test changes Created 7 years, 4 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 | « Source/core/dom/Document.cpp ('k') | Source/core/page/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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation); 92 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
93 93
94 virtual void setContentsSize(const IntSize&); 94 virtual void setContentsSize(const IntSize&);
95 95
96 void layout(bool allowSubtree = true); 96 void layout(bool allowSubtree = true);
97 bool didFirstLayout() const; 97 bool didFirstLayout() const;
98 void layoutTimerFired(Timer<FrameView>*); 98 void layoutTimerFired(Timer<FrameView>*);
99 void scheduleRelayout(); 99 void scheduleRelayout();
100 void scheduleRelayoutOfSubtree(RenderObject*); 100 void scheduleRelayoutOfSubtree(RenderObject*);
101 void unscheduleRelayout(); 101 void unscheduleRelayout();
102 bool layoutPending() const; 102 bool layoutIsScheduledWithEmbedder() const;
103 bool isInLayout() const { return m_inLayout; } 103 bool isInLayout() const { return m_inLayout; }
104 104
105 void layoutLazyBlocks(); 105 void layoutLazyBlocks();
106 106
107 RenderObject* layoutRoot(bool onlyDuringLayout = false) const; 107 RenderObject* layoutRoot(bool onlyDuringLayout = false) const;
108 void clearLayoutRoot() { m_layoutRoot = 0; } 108 void clearLayoutRoot() { m_layoutRoot = 0; }
109 int layoutCount() const { return m_layoutCount; } 109 int layoutCount() const { return m_layoutCount; }
110 110
111 bool needsLayout() const; 111 bool needsLayout() const;
112 void setNeedsLayout(); 112 void setNeedsLayout();
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 protected: 346 protected:
347 virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRec t& rectToScroll, const IntRect& clipRect); 347 virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRec t& rectToScroll, const IntRect& clipRect);
348 virtual void scrollContentsSlowPath(const IntRect& updateRect); 348 virtual void scrollContentsSlowPath(const IntRect& updateRect);
349 349
350 virtual bool isVerticalDocument() const; 350 virtual bool isVerticalDocument() const;
351 virtual bool isFlippedDocument() const; 351 virtual bool isFlippedDocument() const;
352 352
353 private: 353 private:
354 explicit FrameView(Frame*); 354 explicit FrameView(Frame*);
355 355
356 void scheduleLayoutWithEmbedder();
357
356 void reset(); 358 void reset();
357 void init(); 359 void init();
358 360
359 virtual bool isFrameView() const OVERRIDE { return true; } 361 virtual bool isFrameView() const OVERRIDE { return true; }
360 362
361 friend class RenderWidget; 363 friend class RenderWidget;
362 bool useSlowRepaints(bool considerOverlap = true) const; 364 bool useSlowRepaints(bool considerOverlap = true) const;
363 bool useSlowRepaintsIfNotOverlapped() const; 365 bool useSlowRepaintsIfNotOverlapped() const;
364 void updateCanBlitOnScrollRecursively(); 366 void updateCanBlitOnScrollRecursively();
365 bool contentsInCompositedLayer() const; 367 bool contentsInCompositedLayer() const;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 bool m_doFullRepaint; 440 bool m_doFullRepaint;
439 441
440 bool m_canHaveScrollbars; 442 bool m_canHaveScrollbars;
441 bool m_cannotBlitToWindow; 443 bool m_cannotBlitToWindow;
442 bool m_isOverlapped; 444 bool m_isOverlapped;
443 bool m_contentIsOpaque; 445 bool m_contentIsOpaque;
444 unsigned m_slowRepaintObjectCount; 446 unsigned m_slowRepaintObjectCount;
445 int m_borderX; 447 int m_borderX;
446 int m_borderY; 448 int m_borderY;
447 449
448 Timer<FrameView> m_layoutTimer; 450 bool m_layoutIsScheduledWithEmbedder;
449 bool m_delayedLayout; 451 bool m_delayedLayout;
450 RenderObject* m_layoutRoot; 452 RenderObject* m_layoutRoot;
451 453
452 bool m_layoutSchedulingEnabled; 454 bool m_layoutSchedulingEnabled;
453 bool m_inLayout; 455 bool m_inLayout;
454 bool m_doingPreLayoutStyleUpdate; 456 bool m_doingPreLayoutStyleUpdate;
455 bool m_inSynchronousPostLayout; 457 bool m_inSynchronousPostLayout;
456 int m_layoutCount; 458 int m_layoutCount;
457 unsigned m_nestedLayoutCount; 459 unsigned m_nestedLayoutCount;
458 Timer<FrameView> m_postLayoutTasksTimer; 460 Timer<FrameView> m_postLayoutTasksTimer;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 ASSERT(!widget || widget->isFrameView()); 581 ASSERT(!widget || widget->isFrameView());
580 return static_cast<const FrameView*>(widget); 582 return static_cast<const FrameView*>(widget);
581 } 583 }
582 584
583 // This will catch anyone doing an unnecessary cast. 585 // This will catch anyone doing an unnecessary cast.
584 void toFrameView(const FrameView*); 586 void toFrameView(const FrameView*);
585 587
586 } // namespace WebCore 588 } // namespace WebCore
587 589
588 #endif // FrameView_h 590 #endif // FrameView_h
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/page/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698