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

Unified Diff: Source/core/paint/TableSectionPainter.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/TablePainter.cpp ('k') | Source/core/paint/ViewDisplayListTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/TableSectionPainter.cpp
diff --git a/Source/core/paint/TableSectionPainter.cpp b/Source/core/paint/TableSectionPainter.cpp
index d4ee7dd1383276692e33e9c3b2a8ce33de1813f2..9315ed8e0fd2636b307e3bbcf0dbb133cdcbaa05 100644
--- a/Source/core/paint/TableSectionPainter.cpp
+++ b/Source/core/paint/TableSectionPainter.cpp
@@ -171,23 +171,24 @@ void TableSectionPainter::paintCell(RenderTableCell* cell, const PaintInfo& pain
TableCellPainter tableCellPainter(*cell);
- RenderDrawingRecorder recorder(paintInfo.context, &m_renderTableSection, paintPhase, tableCellPainter.paintBounds(paintOffset, TableCellPainter::AddOffsetFromParent));
-
- // Column groups and columns first.
- // FIXME: Columns and column groups do not currently support opacity, and they are being painted "too late" in
- // the stack, since we have already opened a transparency layer (potentially) for the table row group.
- // Note that we deliberately ignore whether or not the cell has a layer, since these backgrounds paint "behind" the
- // cell.
- tableCellPainter.paintBackgroundsBehindCell(paintInfo, cellPoint, columnGroup);
- tableCellPainter.paintBackgroundsBehindCell(paintInfo, cellPoint, column);
-
- // Paint the row group next.
- tableCellPainter.paintBackgroundsBehindCell(paintInfo, cellPoint, &m_renderTableSection);
-
- // Paint the row next, but only if it doesn't have a layer. If a row has a layer, it will be responsible for
- // painting the row background for the cell.
- if (!row->hasSelfPaintingLayer())
- tableCellPainter.paintBackgroundsBehindCell(paintInfo, cellPoint, row);
+ RenderDrawingRecorder recorder(paintInfo.context, m_renderTableSection, paintPhase, tableCellPainter.paintBounds(paintOffset, TableCellPainter::AddOffsetFromParent));
+ if (!recorder.canUseCachedDrawing()) {
+ // Column groups and columns first.
+ // FIXME: Columns and column groups do not currently support opacity, and they are being painted "too late" in
+ // the stack, since we have already opened a transparency layer (potentially) for the table row group.
+ // Note that we deliberately ignore whether or not the cell has a layer, since these backgrounds paint "behind" the
+ // cell.
+ tableCellPainter.paintBackgroundsBehindCell(paintInfo, cellPoint, columnGroup);
+ tableCellPainter.paintBackgroundsBehindCell(paintInfo, cellPoint, column);
+
+ // Paint the row group next.
+ tableCellPainter.paintBackgroundsBehindCell(paintInfo, cellPoint, &m_renderTableSection);
+
+ // Paint the row next, but only if it doesn't have a layer. If a row has a layer, it will be responsible for
+ // painting the row background for the cell.
+ if (!row->hasSelfPaintingLayer())
+ tableCellPainter.paintBackgroundsBehindCell(paintInfo, cellPoint, row);
+ }
}
if ((!cell->hasSelfPaintingLayer() && !row->hasSelfPaintingLayer()))
cell->paint(paintInfo, cellPoint);
« no previous file with comments | « Source/core/paint/TablePainter.cpp ('k') | Source/core/paint/ViewDisplayListTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698