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

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

Issue 351673007: Move paint invalidation after compositing update (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Epic patch ready for review. Created 6 years, 6 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 virtual void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect) OVERRIDE; 212 virtual void paintScrollCorner(GraphicsContext*, const IntRect& cornerRect) OVERRIDE;
213 virtual void paintScrollbar(GraphicsContext*, Scrollbar*, const IntRect&) OV ERRIDE; 213 virtual void paintScrollbar(GraphicsContext*, Scrollbar*, const IntRect&) OV ERRIDE;
214 214
215 Color documentBackgroundColor() const; 215 Color documentBackgroundColor() const;
216 216
217 static double currentFrameTimeStamp() { return s_currentFrameTimeStamp; } 217 static double currentFrameTimeStamp() { return s_currentFrameTimeStamp; }
218 218
219 void updateLayoutAndStyleForPainting(); 219 void updateLayoutAndStyleForPainting();
220 void updateLayoutAndStyleIfNeededRecursive(); 220 void updateLayoutAndStyleIfNeededRecursive();
221 221
222 void invalidateTreeIfNeededRecursive();
223
222 void incrementVisuallyNonEmptyCharacterCount(unsigned); 224 void incrementVisuallyNonEmptyCharacterCount(unsigned);
223 void incrementVisuallyNonEmptyPixelCount(const IntSize&); 225 void incrementVisuallyNonEmptyPixelCount(const IntSize&);
224 void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; } 226 void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; }
225 void enableAutoSizeMode(bool enable, const IntSize& minSize, const IntSize& maxSize); 227 void enableAutoSizeMode(bool enable, const IntSize& minSize, const IntSize& maxSize);
226 228
227 void forceLayout(bool allowSubtree = false); 229 void forceLayout(bool allowSubtree = false);
228 void forceLayoutForPagination(const FloatSize& pageSize, const FloatSize& or iginalPageSize, float maximumShrinkFactor); 230 void forceLayoutForPagination(const FloatSize& pageSize, const FloatSize& or iginalPageSize, float maximumShrinkFactor);
229 231
230 bool scrollToFragment(const KURL&); 232 bool scrollToFragment(const KURL&);
231 bool scrollToAnchor(const String&); 233 bool scrollToAnchor(const String&);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow); 356 void updateOverflowStatus(bool horizontalOverflow, bool verticalOverflow);
355 357
356 void updateCounters(); 358 void updateCounters();
357 void autoSizeIfEnabled(); 359 void autoSizeIfEnabled();
358 void forceLayoutParentViewIfNeeded(); 360 void forceLayoutParentViewIfNeeded();
359 void performPreLayoutTasks(); 361 void performPreLayoutTasks();
360 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout); 362 void performLayout(RenderObject* rootForThisLayout, bool inSubtreeLayout);
361 void scheduleOrPerformPostLayoutTasks(); 363 void scheduleOrPerformPostLayoutTasks();
362 void performPostLayoutTasks(); 364 void performPostLayoutTasks();
363 365
364 void invalidateTree(RenderObject* root); 366 void invalidateTreeIfNeeded();
365 367
366 void gatherDebugLayoutRects(RenderObject* layoutRoot); 368 void gatherDebugLayoutRects(RenderObject* layoutRoot);
367 369
368 DocumentLifecycle& lifecycle() const; 370 DocumentLifecycle& lifecycle() const;
369 371
370 virtual void contentRectangleForPaintInvalidation(const IntRect&) OVERRIDE; 372 virtual void contentRectangleForPaintInvalidation(const IntRect&) OVERRIDE;
371 virtual void contentsResized() OVERRIDE; 373 virtual void contentsResized() OVERRIDE;
372 virtual void scrollbarExistenceDidChange() OVERRIDE; 374 virtual void scrollbarExistenceDidChange() OVERRIDE;
373 375
374 // Override ScrollView methods to do point conversion via renderers, in orde r to 376 // Override ScrollView methods to do point conversion via renderers, in orde r to
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 431
430 bool m_canHaveScrollbars; 432 bool m_canHaveScrollbars;
431 bool m_cannotBlitToWindow; 433 bool m_cannotBlitToWindow;
432 bool m_isOverlapped; 434 bool m_isOverlapped;
433 bool m_contentIsOpaque; 435 bool m_contentIsOpaque;
434 unsigned m_slowRepaintObjectCount; 436 unsigned m_slowRepaintObjectCount;
435 437
436 bool m_hasPendingLayout; 438 bool m_hasPendingLayout;
437 RenderObject* m_layoutSubtreeRoot; 439 RenderObject* m_layoutSubtreeRoot;
438 440
441 // This is a copy of the layout root so that we can
442 // generate invalidations in their own phase later.
443 RenderObject* m_paintInvalidationSubtreeRoot;
esprehn 2014/06/25 00:20:31 I think this is a use-after-free, what updates thi
Julien - ping for review 2014/06/25 22:34:30 Yeah, I thought I had included the part about clea
444
439 bool m_layoutSchedulingEnabled; 445 bool m_layoutSchedulingEnabled;
440 bool m_inPerformLayout; 446 bool m_inPerformLayout;
441 bool m_canInvalidatePaintDuringPerformLayout; 447 bool m_canInvalidatePaintDuringPerformLayout;
442 bool m_inSynchronousPostLayout; 448 bool m_inSynchronousPostLayout;
443 int m_layoutCount; 449 int m_layoutCount;
444 unsigned m_nestedLayoutCount; 450 unsigned m_nestedLayoutCount;
445 Timer<FrameView> m_postLayoutTasksTimer; 451 Timer<FrameView> m_postLayoutTasksTimer;
446 Timer<FrameView> m_updateWidgetsTimer; 452 Timer<FrameView> m_updateWidgetsTimer;
447 bool m_firstLayoutCallbackPending; 453 bool m_firstLayoutCallbackPending;
448 454
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue); 562 m_view->setCanInvalidatePaintDuringPerformLayout(m_originalValue);
557 } 563 }
558 private: 564 private:
559 FrameView* m_view; 565 FrameView* m_view;
560 bool m_originalValue; 566 bool m_originalValue;
561 }; 567 };
562 568
563 } // namespace WebCore 569 } // namespace WebCore
564 570
565 #endif // FrameView_h 571 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698