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

Unified Diff: third_party/WebKit/Source/core/paint/PartPainter.cpp

Issue 1422493003: Change Widget subclasses to use a CullRect instead of an IntRect for painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: third_party/WebKit/Source/core/paint/PartPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/PartPainter.cpp b/third_party/WebKit/Source/core/paint/PartPainter.cpp
index e48410496b54a61029ae3f33302a6f73a70b8713..6dca6dfc8a08141556896185d3b8b1801656e0cd 100644
--- a/third_party/WebKit/Source/core/paint/PartPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PartPainter.cpp
@@ -107,15 +107,15 @@ void PartPainter::paintContents(const PaintInfo& paintInfo, const LayoutPoint& p
IntPoint widgetLocation = widget->frameRect().location();
IntPoint paintLocation(roundToInt(adjustedPaintOffset.x() + m_layoutPart.borderLeft() + m_layoutPart.paddingLeft()),
roundToInt(adjustedPaintOffset.y() + m_layoutPart.borderTop() + m_layoutPart.paddingTop()));
- IntRect paintRect = paintInfo.cullRect().m_rect;
IntSize widgetPaintOffset = paintLocation - widgetLocation;
// When painting widgets into compositing layers, tx and ty are relative to the enclosing compositing layer,
- // not the root. In this case, shift the CTM and adjust the paintRect to be root-relative to fix plugin drawing.
+ // not the root. In this case, shift the CTM and adjust the CullRect to be root-relative to fix plugin drawing.
TransformRecorder transform(*paintInfo.context, m_layoutPart,
AffineTransform::translation(widgetPaintOffset.width(), widgetPaintOffset.height()));
- paintRect.move(-widgetPaintOffset);
- widget->paint(paintInfo.context, paintRect);
+
+ CullRect adjustedCullRect(paintInfo.cullRect(), -widgetPaintOffset);
+ widget->paint(paintInfo.context, adjustedCullRect);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintInfo.cpp ('k') | third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698