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

Unified Diff: Source/core/paint/TableRowPainter.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/TablePainter.cpp ('k') | Source/core/paint/TableSectionPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/TableRowPainter.cpp
diff --git a/Source/core/paint/TableRowPainter.cpp b/Source/core/paint/TableRowPainter.cpp
index e361e4aeca3149775ce430e7dd3f476014afe9bc..62508cc1b50297ed94623f5b331d460a8a52b99d 100644
--- a/Source/core/paint/TableRowPainter.cpp
+++ b/Source/core/paint/TableRowPainter.cpp
@@ -24,9 +24,10 @@ void TableRowPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paint
if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == PaintPhaseChildBlockBackground) {
if (m_layoutTableRow.hasBackground()) {
TableCellPainter tableCellPainter(*cell);
- LayoutObjectDrawingRecorder recorder(*paintInfo.context, *cell, DisplayItem::TableCellBackgroundFromSelfPaintingRow, tableCellPainter.paintBounds(paintOffset, TableCellPainter::AddOffsetFromParent));
- if (!recorder.canUseCachedDrawing())
+ if (!LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, *cell, DisplayItem::TableCellBackgroundFromSelfPaintingRow)) {
+ LayoutObjectDrawingRecorder recorder(*paintInfo.context, *cell, DisplayItem::TableCellBackgroundFromSelfPaintingRow, tableCellPainter.paintBounds(paintOffset, TableCellPainter::AddOffsetFromParent));
tableCellPainter.paintBackgroundsBehindCell(paintInfo, paintOffset, &m_layoutTableRow);
+ }
}
}
« no previous file with comments | « Source/core/paint/TablePainter.cpp ('k') | Source/core/paint/TableSectionPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698