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

Unified Diff: Source/core/paint/FramePainter.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/FileUploadControlPainter.cpp ('k') | Source/core/paint/FrameSetPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/FramePainter.cpp
diff --git a/Source/core/paint/FramePainter.cpp b/Source/core/paint/FramePainter.cpp
index 0f5df26d99cee37954b325f4d95a1a76ab598102..74b3b93dd13ba02b4c50ac5c5bbb751ad5044cd8 100644
--- a/Source/core/paint/FramePainter.cpp
+++ b/Source/core/paint/FramePainter.cpp
@@ -80,11 +80,9 @@ void FramePainter::paintContents(GraphicsContext* context, const IntRect& rect)
else
fillWithRed = true;
- if (fillWithRed) {
+ if (fillWithRed && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, *m_frameView.layoutView(), DisplayItem::DebugRedFill)) {
IntRect contentRect(IntPoint(), m_frameView.contentsSize());
LayoutObjectDrawingRecorder drawingRecorder(*context, *m_frameView.layoutView(), DisplayItem::DebugRedFill, contentRect);
- if (!drawingRecorder.canUseCachedDrawing())
- context->fillRect(contentRect, Color(0xFF, 0, 0));
}
#endif
@@ -172,10 +170,10 @@ void FramePainter::paintScrollCorner(GraphicsContext* context, const IntRect& co
{
if (m_frameView.scrollCorner()) {
bool needsBackground = m_frameView.frame().isMainFrame();
- if (needsBackground) {
+ if (needsBackground && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, *m_frameView.layoutView(), DisplayItem::ScrollbarCorner)) {
LayoutObjectDrawingRecorder drawingRecorder(*context, *m_frameView.layoutView(), DisplayItem::ScrollbarCorner, cornerRect);
- if (!drawingRecorder.canUseCachedDrawing())
- context->fillRect(cornerRect, m_frameView.baseBackgroundColor());
+ context->fillRect(cornerRect, m_frameView.baseBackgroundColor());
+
}
ScrollbarPainter::paintIntoRect(m_frameView.scrollCorner(), context, cornerRect.location(), LayoutRect(cornerRect));
return;
« no previous file with comments | « Source/core/paint/FileUploadControlPainter.cpp ('k') | Source/core/paint/FrameSetPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698