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

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

Issue 799563002: Use DrawingRecorder::canUseCachedDrawing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years 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/RenderDrawingRecorder.cpp ('k') | Source/core/paint/TablePainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/TableCellPainter.cpp
diff --git a/Source/core/paint/TableCellPainter.cpp b/Source/core/paint/TableCellPainter.cpp
index 8e33cc0cbb6556889a0f6cfa2ad7dbe13c86d484..3b92ed874bcbf9ddfb8900ca776bb09831dda145 100644
--- a/Source/core/paint/TableCellPainter.cpp
+++ b/Source/core/paint/TableCellPainter.cpp
@@ -131,7 +131,9 @@ void TableCellPainter::paintCollapsedBorders(const PaintInfo& paintInfo, const L
if (!m_renderTableCell.table()->currentBorderValue())
return;
- RenderDrawingRecorder recorder(paintInfo.context, &m_renderTableCell, paintInfo.phase, paintRect);
+ RenderDrawingRecorder recorder(paintInfo.context, m_renderTableCell, paintInfo.phase, paintRect);
+ if (recorder.canUseCachedDrawing())
+ return;
const RenderStyle* styleForCellFlow = m_renderTableCell.styleForCellFlow();
CollapsedBorderValue leftVal = cachedCollapsedLeftBorder(styleForCellFlow);
@@ -223,7 +225,10 @@ void TableCellPainter::paintBoxDecorationBackground(const PaintInfo& paintInfo,
return;
LayoutRect paintRect = paintBounds(paintOffset, DoNotAddOffsetFromParent);
- RenderDrawingRecorder recorder(paintInfo.context, &m_renderTableCell, paintInfo.phase, pixelSnappedIntRect(paintRect));
+ RenderDrawingRecorder recorder(paintInfo.context, m_renderTableCell, paintInfo.phase, pixelSnappedIntRect(paintRect));
+ if (recorder.canUseCachedDrawing())
+ return;
+
BoxPainter::paintBoxShadow(paintInfo, paintRect, m_renderTableCell.style(), Normal);
// Paint our cell background.
« no previous file with comments | « Source/core/paint/RenderDrawingRecorder.cpp ('k') | Source/core/paint/TablePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698