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

Side by Side Diff: Source/core/paint/TablePainter.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 unified diff | Download patch
« no previous file with comments | « Source/core/paint/TableCellPainter.cpp ('k') | Source/core/paint/TableRowPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/TablePainter.h" 6 #include "core/paint/TablePainter.h"
7 7
8 #include "core/layout/LayoutTable.h" 8 #include "core/layout/LayoutTable.h"
9 #include "core/layout/LayoutTableSection.h" 9 #include "core/layout/LayoutTableSection.h"
10 #include "core/style/CollapsedBorderValue.h" 10 #include "core/style/CollapsedBorderValue.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 LayoutRect rect(paintOffset, m_layoutTable.size()); 81 LayoutRect rect(paintOffset, m_layoutTable.size());
82 m_layoutTable.subtractCaptionRect(rect); 82 m_layoutTable.subtractCaptionRect(rect);
83 BoxPainter(m_layoutTable).paintBoxDecorationBackgroundWithRect(paintInfo, pa intOffset, rect); 83 BoxPainter(m_layoutTable).paintBoxDecorationBackgroundWithRect(paintInfo, pa intOffset, rect);
84 } 84 }
85 85
86 void TablePainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& pain tOffset) 86 void TablePainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& pain tOffset)
87 { 87 {
88 if (m_layoutTable.style()->visibility() != VISIBLE || paintInfo.phase != Pai ntPhaseMask) 88 if (m_layoutTable.style()->visibility() != VISIBLE || paintInfo.phase != Pai ntPhaseMask)
89 return; 89 return;
90 90
91 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.conte xt, m_layoutTable, paintInfo.phase))
92 return;
93
91 LayoutRect rect(paintOffset, m_layoutTable.size()); 94 LayoutRect rect(paintOffset, m_layoutTable.size());
92 m_layoutTable.subtractCaptionRect(rect); 95 m_layoutTable.subtractCaptionRect(rect);
93 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutTable, pain tInfo.phase, pixelSnappedIntRect(rect)); 96 LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutTable, pain tInfo.phase, pixelSnappedIntRect(rect));
94 if (!recorder.canUseCachedDrawing()) 97 BoxPainter(m_layoutTable).paintMaskImages(paintInfo, rect);
95 BoxPainter(m_layoutTable).paintMaskImages(paintInfo, rect);
96 } 98 }
97 99
98 } // namespace blink 100 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/TableCellPainter.cpp ('k') | Source/core/paint/TableRowPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698