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

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

Issue 301843002: Store repaint rects in the coordinate space of their backing GraphicsLayer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Changed name. 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
« no previous file with comments | « Source/core/rendering/RenderListMarker.cpp ('k') | Source/core/rendering/RenderObject.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) 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 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu irksMode = false, bool firstlineStyle = false); 799 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu irksMode = false, bool firstlineStyle = false);
800 800
801 // Return the RenderLayerModelObject in the container chain which is respons ible for painting this object, or 0 801 // Return the RenderLayerModelObject in the container chain which is respons ible for painting this object, or 0
802 // if painting is root-relative. This is the container that should be passed to the 'forRepaint' 802 // if painting is root-relative. This is the container that should be passed to the 'forRepaint'
803 // methods. 803 // methods.
804 const RenderLayerModelObject* containerForRepaint() const; 804 const RenderLayerModelObject* containerForRepaint() const;
805 const RenderLayerModelObject* enclosingCompositedContainer() const; 805 const RenderLayerModelObject* enclosingCompositedContainer() const;
806 const RenderLayerModelObject* adjustCompositedContainerForSpecialAncestors(c onst RenderLayerModelObject* repaintContainer) const; 806 const RenderLayerModelObject* adjustCompositedContainerForSpecialAncestors(c onst RenderLayerModelObject* repaintContainer) const;
807 bool isRepaintContainer() const; 807 bool isRepaintContainer() const;
808 808
809 // Returns the repaint rect for this RenderObject in the coordinate space of the composited layer that this RenderObject paints into, or the RenderView if n ot 809 LayoutRect computeRepaintRect()
810 // composited. 810 {
811 LayoutRect computeRepaintRect() const; 811 return computeRepaintRect(containerForRepaint());
812 }
813
814 // Returns the repaint rect for this RenderObject in the coordinate space of the paint backing (typically a GraphicsLayer) for |repaintContainer|.
815 LayoutRect computeRepaintRect(const RenderLayerModelObject* repaintContainer ) const;
816
817 // Returns the rect bounds needed to repaint this object, in the coordinate space of the rendering backing of |repaintContainer|
818 LayoutRect boundsRectForRepaint(const RenderLayerModelObject* repaintContain er) const;
812 819
813 // Actually do the repaint of rect r for this object which has been computed in the coordinate space 820 // Actually do the repaint of rect r for this object which has been computed in the coordinate space
814 // of repaintContainer. If repaintContainer is 0, repaint via the view. 821 // of repaintContainer. If repaintContainer is 0, repaint via the view.
815 void repaintUsingContainer(const RenderLayerModelObject* repaintContainer, c onst IntRect&, InvalidationReason) const; 822 void repaintUsingContainer(const RenderLayerModelObject* repaintContainer, c onst IntRect&, InvalidationReason) const;
816 823
817 // Repaint the entire object. Called when, e.g., the color of a border chan ges, or when a border 824 // Repaint the entire object. Called when, e.g., the color of a border chan ges, or when a border
818 // style changes. 825 // style changes.
819 void repaint() const; 826 void repaint() const;
820 827
821 // Repaint a specific subrectangle within a given object. The rect |r| is i n the object's coordinate space. 828 // Repaint a specific subrectangle within a given object. The rect |r| is i n the object's coordinate space.
(...skipping 17 matching lines...) Expand all
839 LayoutRect absoluteClippedOverflowRect() const 846 LayoutRect absoluteClippedOverflowRect() const
840 { 847 {
841 return clippedOverflowRectForRepaint(0); 848 return clippedOverflowRectForRepaint(0);
842 } 849 }
843 IntRect pixelSnappedAbsoluteClippedOverflowRect() const; 850 IntRect pixelSnappedAbsoluteClippedOverflowRect() const;
844 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec t* repaintContainer) const; 851 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec t* repaintContainer) const;
845 virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* r epaintContainer, LayoutUnit outlineWidth) const; 852 virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* r epaintContainer, LayoutUnit outlineWidth) const;
846 853
847 // Given a rect in the object's coordinate space, compute a rect suitable fo r repainting 854 // Given a rect in the object's coordinate space, compute a rect suitable fo r repainting
848 // that rect in the coordinate space of repaintContainer. 855 // that rect in the coordinate space of repaintContainer.
849 virtual void computeRectForRepaint(const RenderLayerModelObject* repaintCont ainer, LayoutRect&, bool fixed = false) const; 856 virtual void mapRectToRepaintBacking(const RenderLayerModelObject* repaintCo ntainer, LayoutRect&, bool fixed = false) const;
850 virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repain tContainer, FloatRect& repaintRect, bool fixed = false) const; 857 virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repain tContainer, FloatRect& repaintRect, bool fixed = false) const;
851 858
852 // Return the offset to the column in which the specified point (in flow-thr ead coordinates) 859 // Return the offset to the column in which the specified point (in flow-thr ead coordinates)
853 // lives. This is used to convert a flow-thread point to a visual point. 860 // lives. This is used to convert a flow-thread point to a visual point.
854 virtual LayoutSize columnOffset(const LayoutPoint&) const { return LayoutSiz e(); } 861 virtual LayoutSize columnOffset(const LayoutPoint&) const { return LayoutSiz e(); }
855 862
856 virtual unsigned length() const { return 1; } 863 virtual unsigned length() const { return 1; }
857 864
858 bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOut OfFlowPositioned()); } 865 bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOut OfFlowPositioned()); }
859 866
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 // containerRect is a rect that has already been added for the currentLayer which is likely to 1077 // containerRect is a rect that has already been added for the currentLayer which is likely to
1071 // be a container for child elements. Any rect wholly contained by container Rect can be 1078 // be a container for child elements. Any rect wholly contained by container Rect can be
1072 // skipped. 1079 // skipped.
1073 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur rentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) cons t; 1080 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur rentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) cons t;
1074 1081
1075 // Add hit-test rects for this renderer only to the provided list. layerOffs et is the offset 1082 // Add hit-test rects for this renderer only to the provided list. layerOffs et is the offset
1076 // of this renderer within the current layer that should be used for each re sult. 1083 // of this renderer within the current layer that should be used for each re sult.
1077 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const { }; 1084 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOffset) const { };
1078 1085
1079 private: 1086 private:
1080 LayoutRect computeRepaintRectInternal(const RenderLayerModelObject* repaintC ontainer) const;
1081
1082 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* repaint Container = 0, bool* repaintContainerSkipped = 0) const; 1087 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* repaint Container = 0, bool* repaintContainerSkipped = 0) const;
1083 1088
1084 RenderFlowThread* locateFlowThreadContainingBlock() const; 1089 RenderFlowThread* locateFlowThreadContainingBlock() const;
1085 void removeFromRenderFlowThread(); 1090 void removeFromRenderFlowThread();
1086 void removeFromRenderFlowThreadRecursive(RenderFlowThread*); 1091 void removeFromRenderFlowThreadRecursive(RenderFlowThread*);
1087 1092
1088 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const; 1093 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const;
1089 1094
1090 RenderStyle* cachedFirstLineStyle() const; 1095 RenderStyle* cachedFirstLineStyle() const;
1091 StyleDifference adjustStyleDifference(StyleDifference, unsigned contextSensi tiveProperties) const; 1096 StyleDifference adjustStyleDifference(StyleDifference, unsigned contextSensi tiveProperties) const;
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 void showTree(const WebCore::RenderObject*); 1489 void showTree(const WebCore::RenderObject*);
1485 void showLineTree(const WebCore::RenderObject*); 1490 void showLineTree(const WebCore::RenderObject*);
1486 void showRenderTree(const WebCore::RenderObject* object1); 1491 void showRenderTree(const WebCore::RenderObject* object1);
1487 // We don't make object2 an optional parameter so that showRenderTree 1492 // We don't make object2 an optional parameter so that showRenderTree
1488 // can be called from gdb easily. 1493 // can be called from gdb easily.
1489 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); 1494 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2);
1490 1495
1491 #endif 1496 #endif
1492 1497
1493 #endif // RenderObject_h 1498 #endif // RenderObject_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderListMarker.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698