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

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

Issue 1327563003: Don't cache subsequence whose layer is not fully contained by repaint rect (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 void setIsPainting(bool val) { m_isPainting = val; } 219 void setIsPainting(bool val) { m_isPainting = val; }
220 bool isPainting() const; 220 bool isPainting() const;
221 void setLastPaintTime(double val) { m_lastPaintTime = val; } 221 void setLastPaintTime(double val) { m_lastPaintTime = val; }
222 bool hasEverPainted() const { return m_lastPaintTime; } 222 bool hasEverPainted() const { return m_lastPaintTime; }
223 void setNodeToDraw(Node*); 223 void setNodeToDraw(Node*);
224 Node* nodeToDraw() { return m_nodeToDraw.get(); } 224 Node* nodeToDraw() { return m_nodeToDraw.get(); }
225 225
226 Color documentBackgroundColor() const; 226 Color documentBackgroundColor() const;
227 227
228 // Run all needed lifecycle stages. After calling this method, all frames wi ll be in the lifecycle state PaintInvalidationClean. 228 // Run all needed lifecycle stages. After calling this method, all frames wi ll be in the lifecycle state PaintInvalidationClean.
229 void updateAllLifecyclePhases(); 229 // TODO(pdr): Update callers to pass in the interest rect.
230 void updateAllLifecyclePhases(const LayoutRect& interestRect = LayoutRect::i nfiniteRect());
230 231
231 // Computes the style, layout and compositing lifecycle stages if needed. Af ter calling this method, all frames wil lbe in a lifecycle 232 // Computes the style, layout and compositing lifecycle stages if needed. Af ter calling this method, all frames wil lbe in a lifecycle
232 // state >= CompositingClean, and scrolling has been updated. 233 // state >= CompositingClean, and scrolling has been updated.
233 void updateLifecycleToCompositingCleanPlusScrolling(); 234 void updateLifecycleToCompositingCleanPlusScrolling();
234 235
235 bool invalidateViewportConstrainedObjects(); 236 bool invalidateViewportConstrainedObjects();
236 237
237 void incrementVisuallyNonEmptyCharacterCount(unsigned); 238 void incrementVisuallyNonEmptyCharacterCount(unsigned);
238 void incrementVisuallyNonEmptyPixelCount(const IntSize&); 239 void incrementVisuallyNonEmptyPixelCount(const IntSize&);
239 bool isVisuallyNonEmpty() const { return m_isVisuallyNonEmpty; } 240 bool isVisuallyNonEmpty() const { return m_isVisuallyNonEmpty; }
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 explicit FrameView(LocalFrame*); 604 explicit FrameView(LocalFrame*);
604 605
605 void setScrollOffset(const IntPoint&, ScrollType) override; 606 void setScrollOffset(const IntPoint&, ScrollType) override;
606 void setScrollOffset(const DoublePoint&, ScrollType) override; 607 void setScrollOffset(const DoublePoint&, ScrollType) override;
607 608
608 enum LifeCycleUpdateOption { 609 enum LifeCycleUpdateOption {
609 AllPhases, 610 AllPhases,
610 OnlyUpToCompositingCleanPlusScrolling, 611 OnlyUpToCompositingCleanPlusScrolling,
611 }; 612 };
612 613
613 void updateLifecyclePhasesInternal(LifeCycleUpdateOption); 614 void updateLifecyclePhasesInternal(LifeCycleUpdateOption, const LayoutRect& interestRect = LayoutRect::infiniteRect());
614 void invalidateTreeIfNeededRecursive(); 615 void invalidateTreeIfNeededRecursive();
615 void scrollContentsIfNeededRecursive(); 616 void scrollContentsIfNeededRecursive();
616 void updateStyleAndLayoutIfNeededRecursive(); 617 void updateStyleAndLayoutIfNeededRecursive();
617 void paintForSlimmingPaintV2(); 618 void paintForSlimmingPaintV2(const LayoutRect& interestRect);
618 void compositeForSlimmingPaintV2(); 619 void compositeForSlimmingPaintV2();
619 620
620 void reset(); 621 void reset();
621 void init(); 622 void init();
622 623
623 void clearLayoutSubtreeRootsAndMarkContainingBlocks(); 624 void clearLayoutSubtreeRootsAndMarkContainingBlocks();
624 625
625 // Called when our frame rect changes (or the rect/scroll position of an anc estor changes). 626 // Called when our frame rect changes (or the rect/scroll position of an anc estor changes).
626 void frameRectsChanged() override; 627 void frameRectsChanged() override;
627 628
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 static const unsigned visualPixelThreshold = 32 * 32; 858 static const unsigned visualPixelThreshold = 32 * 32;
858 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 859 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
859 setIsVisuallyNonEmpty(); 860 setIsVisuallyNonEmpty();
860 } 861 }
861 862
862 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 863 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
863 864
864 } // namespace blink 865 } // namespace blink
865 866
866 #endif // FrameView_h 867 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698