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

Unified Diff: Source/core/paint/VideoPainter.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/TableSectionPainter.cpp ('k') | Source/core/paint/ViewPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/VideoPainter.cpp
diff --git a/Source/core/paint/VideoPainter.cpp b/Source/core/paint/VideoPainter.cpp
index bf00db6f7cde27016b8dfa5c8aa99a44b3b2cd46..ecb9949b8754a2887d8cd78fe8d51fed9e507d72 100644
--- a/Source/core/paint/VideoPainter.cpp
+++ b/Source/core/paint/VideoPainter.cpp
@@ -28,13 +28,13 @@ void VideoPainter::paintReplaced(const PaintInfo& paintInfo, const LayoutPoint&
return;
rect.moveBy(paintOffset);
- LayoutRect contentRect = m_layoutVideo.contentBoxRect();
- contentRect.moveBy(paintOffset);
GraphicsContext* context = paintInfo.context;
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, m_layoutVideo, paintInfo.phase))
+ return;
+ LayoutRect contentRect = m_layoutVideo.contentBoxRect();
+ contentRect.moveBy(paintOffset);
LayoutObjectDrawingRecorder drawingRecorder(*context, m_layoutVideo, paintInfo.phase, contentRect);
- if (drawingRecorder.canUseCachedDrawing())
- return;
bool clip = !contentRect.contains(rect);
if (clip) {
« no previous file with comments | « Source/core/paint/TableSectionPainter.cpp ('k') | Source/core/paint/ViewPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698