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

Side by Side Diff: Source/core/rendering/RenderObject.h

Issue 535633002: Common invalidateTreeIfNeeded() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
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 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space 859 // Actually do the paint invalidate of rect r for this object which has been computed in the coordinate space
860 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same 860 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t his coordinaten space is not the same
861 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing. 861 // as the local coordinate space of |paintInvalidationContainer| in the pres ence of layer squashing.
862 // If |paintInvalidationContainer| is 0, invalidate paints via the view. 862 // If |paintInvalidationContainer| is 0, invalidate paints via the view.
863 // FIXME: |paintInvalidationContainer| should never be 0. See crbug.com/3636 99. 863 // FIXME: |paintInvalidationContainer| should never be 0. See crbug.com/3636 99.
864 void invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvali dationContainer, const LayoutRect&, InvalidationReason) const; 864 void invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvali dationContainer, const LayoutRect&, InvalidationReason) const;
865 865
866 // Invalidate the paint of a specific subrectangle within a given object. Th e rect |r| is in the object's coordinate space. 866 // Invalidate the paint of a specific subrectangle within a given object. Th e rect |r| is in the object's coordinate space.
867 void invalidatePaintRectangle(const LayoutRect&) const; 867 void invalidatePaintRectangle(const LayoutRect&) const;
868 868
869 InvalidationReason invalidatePaintIfNeeded(const RenderLayerModelObject& pai ntInvalidationContainer,
870 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva lidationContainer, const PaintInvalidationState&);
871
872 // Walk the tree after layout issuing paint invalidations for renderers that have changed or moved, updating bounds that have changed, and clearing paint in validation state. 869 // Walk the tree after layout issuing paint invalidations for renderers that have changed or moved, updating bounds that have changed, and clearing paint in validation state.
873 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&); 870 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&);
874 871
875 virtual void invalidatePaintForOverflow(); 872 virtual void invalidatePaintForOverflow();
876 void invalidatePaintForOverflowIfNeeded(); 873 void invalidatePaintForOverflowIfNeeded();
877 874
878 bool checkForPaintInvalidation() const; 875 bool checkForPaintInvalidation() const;
879 876
880 // Returns the rect that should have paint invalidated whenever this object changes. The rect is in the view's 877 // Returns the rect that should have paint invalidated whenever this object changes. The rect is in the view's
881 // coordinate space. This method deals with outlines and overflow. 878 // coordinate space. This method deals with outlines and overflow.
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 void fullyInvalidatePaint(const RenderLayerModelObject& paintInvalidationCon tainer, InvalidationReason, const LayoutRect& oldBounds, const LayoutRect& newBo unds); 1135 void fullyInvalidatePaint(const RenderLayerModelObject& paintInvalidationCon tainer, InvalidationReason, const LayoutRect& oldBounds, const LayoutRect& newBo unds);
1139 1136
1140 #if ENABLE(ASSERT) 1137 #if ENABLE(ASSERT)
1141 virtual bool paintInvalidationStateIsDirty() const 1138 virtual bool paintInvalidationStateIsDirty() const
1142 { 1139 {
1143 return layoutDidGetCalled() || shouldDoFullPaintInvalidation() || should DoFullPaintInvalidationIfSelfPaintingLayer() 1140 return layoutDidGetCalled() || shouldDoFullPaintInvalidation() || should DoFullPaintInvalidationIfSelfPaintingLayer()
1144 || onlyNeededPositionedMovementLayout() || neededLayoutBecauseOfChil dren() || mayNeedPaintInvalidation(); 1141 || onlyNeededPositionedMovementLayout() || neededLayoutBecauseOfChil dren() || mayNeedPaintInvalidation();
1145 } 1142 }
1146 #endif 1143 #endif
1147 1144
1145 void invalidateSubtreesIfNeeded(const PaintInvalidationState&);
dsinclair 2014/09/03 14:14:47 invalidatePaintOfSubtreesIfNeeded
Xianzhu 2014/09/03 17:11:15 Done.
1146 virtual InvalidationReason invalidatePaintIfNeeded(const PaintInvalidationSt ate&, const RenderLayerModelObject& paintInvalidationContainer);
1147
1148 private: 1148 private:
1149 // Invalidate the paint of the entire object. This is only used when a rende rer is to be removed. 1149 // Invalidate the paint of the entire object. This is only used when a rende rer is to be removed.
1150 // For other cases, the caller should call setShouldDoFullPaintInvalidation( ) instead. 1150 // For other cases, the caller should call setShouldDoFullPaintInvalidation( ) instead.
1151 void invalidatePaintForWholeRenderer() const; 1151 void invalidatePaintForWholeRenderer() const;
1152 1152
1153 const RenderLayerModelObject* enclosingCompositedContainer() const; 1153 const RenderLayerModelObject* enclosingCompositedContainer() const;
1154 1154
1155 RenderFlowThread* locateFlowThreadContainingBlock() const; 1155 RenderFlowThread* locateFlowThreadContainingBlock() const;
1156 void removeFromRenderFlowThread(); 1156 void removeFromRenderFlowThread();
1157 void removeFromRenderFlowThreadRecursive(RenderFlowThread*); 1157 void removeFromRenderFlowThreadRecursive(RenderFlowThread*);
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 void showTree(const blink::RenderObject*); 1559 void showTree(const blink::RenderObject*);
1560 void showLineTree(const blink::RenderObject*); 1560 void showLineTree(const blink::RenderObject*);
1561 void showRenderTree(const blink::RenderObject* object1); 1561 void showRenderTree(const blink::RenderObject* object1);
1562 // We don't make object2 an optional parameter so that showRenderTree 1562 // We don't make object2 an optional parameter so that showRenderTree
1563 // can be called from gdb easily. 1563 // can be called from gdb easily.
1564 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 1564 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1565 1565
1566 #endif 1566 #endif
1567 1567
1568 #endif // RenderObject_h 1568 #endif // RenderObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698