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

Unified Diff: Source/core/paint/FieldsetPainter.cpp

Issue 1220583004: Refactor DrawingRecorders to check for cached drawings earlier (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 5 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
« no previous file with comments | « Source/core/paint/EmbeddedObjectPainter.cpp ('k') | Source/core/paint/FileUploadControlPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/FieldsetPainter.cpp
diff --git a/Source/core/paint/FieldsetPainter.cpp b/Source/core/paint/FieldsetPainter.cpp
index c5e0efd55de2879faa852c80d9a3f1ab9656c814..fb7d453add123bb636c4f10735fa4ffb54c17d11 100644
--- a/Source/core/paint/FieldsetPainter.cpp
+++ b/Source/core/paint/FieldsetPainter.cpp
@@ -23,6 +23,9 @@ void FieldsetPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, c
if (!legend)
return BoxPainter(m_layoutFieldset).paintBoxDecorationBackground(paintInfo, paintOffset);
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutFieldset, paintInfo.phase))
+ return;
+
// FIXME: We need to work with "rl" and "bt" block flow directions. In those
// cases the legend is embedded in the right and bottom borders respectively.
// https://bugs.webkit.org/show_bug.cgi?id=47236
@@ -37,9 +40,6 @@ void FieldsetPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo, c
}
LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutFieldset, paintInfo.phase, pixelSnappedIntRect(paintRect));
- if (recorder.canUseCachedDrawing())
- return;
-
BoxDecorationData boxDecorationData(m_layoutFieldset);
if (boxDecorationData.bleedAvoidance == BackgroundBleedNone)
@@ -80,6 +80,9 @@ void FieldsetPainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& p
if (!legend)
return BoxPainter(m_layoutFieldset).paintMask(paintInfo, paintOffset);
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutFieldset, paintInfo.phase))
+ return;
+
// FIXME: We need to work with "rl" and "bt" block flow directions. In those
// cases the legend is embedded in the right and bottom borders respectively.
// https://bugs.webkit.org/show_bug.cgi?id=47236
@@ -94,9 +97,6 @@ void FieldsetPainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& p
}
LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutFieldset, paintInfo.phase, paintRect);
- if (recorder.canUseCachedDrawing())
- return;
-
BoxPainter(m_layoutFieldset).paintMaskImages(paintInfo, paintRect);
}
« no previous file with comments | « Source/core/paint/EmbeddedObjectPainter.cpp ('k') | Source/core/paint/FileUploadControlPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698