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

Unified Diff: Source/core/paint/DeprecatedPaintLayerPainter.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 side-by-side diff with in-line comments
Download patch
Index: Source/core/paint/DeprecatedPaintLayerPainter.h
diff --git a/Source/core/paint/DeprecatedPaintLayerPainter.h b/Source/core/paint/DeprecatedPaintLayerPainter.h
index 9c0fe9f0707ca751ef67b59cee1c2618e09050b1..7e2b27edb04a7754a58fcb5fa8b86871b8a4bf47 100644
--- a/Source/core/paint/DeprecatedPaintLayerPainter.h
+++ b/Source/core/paint/DeprecatedPaintLayerPainter.h
@@ -22,26 +22,36 @@ class CORE_EXPORT DeprecatedPaintLayerPainter {
public:
enum FragmentPolicy { AllowMultipleFragments, ForceSingleFragment };
+ enum PaintResult {
+ // The layer is fully painted. This includes cases that nothing needs painting
+ // regardless of the paint rect.
+ FullyPainted,
+ // Some part of the layer is out of the paint rect and may be not fully painted.
+ // The results cannot be cached because they may change when paint rect changes.
+ MaybeNotFullyPainted
+ };
+
DeprecatedPaintLayerPainter(DeprecatedPaintLayer& paintLayer) : m_paintLayer(paintLayer) { }
// The paint() method paints the layers that intersect the damage rect from back to front.
// paint() assumes that the caller will clip to the bounds of damageRect if necessary.
void paint(GraphicsContext*, const LayoutRect& damageRect, const GlobalPaintFlags = GlobalPaintNormalPhase, LayoutObject* paintingRoot = 0, PaintLayerFlags = 0);
// paintLayer() assumes that the caller will clip to the bounds of the painting dirty if necessary.
- void paintLayer(GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, PaintLayerFlags);
+ PaintResult paintLayer(GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, PaintLayerFlags);
// paintLayerContents() assumes that the caller will clip to the bounds of the painting dirty rect if necessary.
- void paintLayerContents(GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, PaintLayerFlags, FragmentPolicy = AllowMultipleFragments);
+ PaintResult paintLayerContents(GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, PaintLayerFlags, FragmentPolicy = AllowMultipleFragments);
void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect, const GlobalPaintFlags, LayoutObject* paintingRoot = 0);
private:
enum ClipState { HasNotClipped, HasClipped };
- void paintLayerContentsAndReflection(GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, PaintLayerFlags, FragmentPolicy = AllowMultipleFragments);
- void paintLayerWithTransform(GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, PaintLayerFlags);
- void paintFragmentByApplyingTransform(GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, PaintLayerFlags, const LayoutPoint& fragmentTranslation);
+ PaintResult paintLayerInternal(GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, PaintLayerFlags);
+ PaintResult paintLayerContentsAndReflection(GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, PaintLayerFlags, FragmentPolicy = AllowMultipleFragments);
+ PaintResult paintLayerWithTransform(GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, PaintLayerFlags);
+ PaintResult paintFragmentByApplyingTransform(GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, PaintLayerFlags, const LayoutPoint& fragmentTranslation);
- void paintChildren(unsigned childrenToVisit, GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, PaintLayerFlags);
+ PaintResult paintChildren(unsigned childrenToVisit, GraphicsContext*, const DeprecatedPaintLayerPaintingInfo&, PaintLayerFlags);
bool atLeastOneFragmentIntersectsDamageRect(DeprecatedPaintLayerFragments&, const DeprecatedPaintLayerPaintingInfo&, PaintLayerFlags, const LayoutPoint& offsetFromRoot);
void paintFragmentWithPhase(PaintPhase, const DeprecatedPaintLayerFragment&, GraphicsContext*, const ClipRect&, const DeprecatedPaintLayerPaintingInfo&, LayoutObject* paintingRootForLayoutObject, PaintLayerFlags, ClipState);
void paintBackgroundForFragments(const DeprecatedPaintLayerFragments&, GraphicsContext*,

Powered by Google App Engine
This is Rietveld 408576698