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

Unified Diff: Source/core/paint/InlinePainter.cpp

Issue 1315993004: Implement a paint offset cache for slimming paint v2 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
Index: Source/core/paint/InlinePainter.cpp
diff --git a/Source/core/paint/InlinePainter.cpp b/Source/core/paint/InlinePainter.cpp
index af7e48d24f65ee619872a0b115b7801d3933d3c5..39abb7e85251883dafccbe5177300536a96e6634 100644
--- a/Source/core/paint/InlinePainter.cpp
+++ b/Source/core/paint/InlinePainter.cpp
@@ -53,13 +53,13 @@ void InlinePainter::paintOutline(const PaintInfo& paintInfo, const LayoutPoint&
if (styleToUse.outlineStyleIsAuto()) {
if (!LayoutTheme::theme().shouldDrawDefaultFocusRing(&m_layoutInline))
return;
- if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutInline, paintInfo.phase))
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*paintInfo.context, m_layoutInline, paintInfo.phase, paintOffset))
return;
Vector<LayoutRect> focusRingRects;
m_layoutInline.addOutlineRects(focusRingRects, paintOffset);
- LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutInline, paintInfo.phase, outlinePaintRect(focusRingRects, LayoutPoint()));
+ LayoutObjectDrawingRecorder recorder(*paintInfo.context, m_layoutInline, paintInfo.phase, outlinePaintRect(focusRingRects, LayoutPoint()), paintOffset);
// Only paint the focus ring by hand if the theme isn't able to draw the focus ring.
ObjectPainter(m_layoutInline).paintFocusRing(paintInfo, styleToUse, focusRingRects);
return;
@@ -69,7 +69,7 @@ void InlinePainter::paintOutline(const PaintInfo& paintInfo, const LayoutPoint&
return;
GraphicsContext* graphicsContext = paintInfo.context;
- if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*graphicsContext, m_layoutInline, paintInfo.phase))
+ if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*graphicsContext, m_layoutInline, paintInfo.phase, paintOffset))
return;
Vector<LayoutRect> rects;
@@ -86,7 +86,7 @@ void InlinePainter::paintOutline(const PaintInfo& paintInfo, const LayoutPoint&
Color outlineColor = m_layoutInline.resolveColor(styleToUse, CSSPropertyOutlineColor);
bool useTransparencyLayer = outlineColor.hasAlpha();
- LayoutObjectDrawingRecorder recorder(*graphicsContext, m_layoutInline, paintInfo.phase, outlinePaintRect(rects, paintOffset));
+ LayoutObjectDrawingRecorder recorder(*graphicsContext, m_layoutInline, paintInfo.phase, outlinePaintRect(rects, paintOffset), paintOffset);
if (useTransparencyLayer) {
graphicsContext->beginLayer(static_cast<float>(outlineColor.alpha()) / 255);
outlineColor = Color(outlineColor.red(), outlineColor.green(), outlineColor.blue());

Powered by Google App Engine
This is Rietveld 408576698