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

Unified Diff: Source/core/rendering/svg/RenderSVGImage.cpp

Issue 21430003: Implement interfaces in PaintInfo and make it a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@getterPaintInfo01
Patch Set: Second try Created 7 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
Index: Source/core/rendering/svg/RenderSVGImage.cpp
diff --git a/Source/core/rendering/svg/RenderSVGImage.cpp b/Source/core/rendering/svg/RenderSVGImage.cpp
index 3717f9d442c9efd782894ac0315a234acd41c60b..a8e572d4953b97eb2aefa7daa77f4c504d2923d7 100644
--- a/Source/core/rendering/svg/RenderSVGImage.cpp
+++ b/Source/core/rendering/svg/RenderSVGImage.cpp
@@ -124,7 +124,7 @@ void RenderSVGImage::paint(PaintInfo& paintInfo, const LayoutPoint&)
{
ANNOTATE_GRAPHICS_CONTEXT(paintInfo, this);
- if (paintInfo.context->paintingDisabled() || style()->visibility() == HIDDEN || !m_imageResource->hasImage())
+ if (paintInfo.getContext()->paintingDisabled() || style()->visibility() == HIDDEN || !m_imageResource->hasImage())
return;
FloatRect boundingBox = repaintRectInLocalCoordinates();
@@ -132,12 +132,12 @@ void RenderSVGImage::paint(PaintInfo& paintInfo, const LayoutPoint&)
return;
PaintInfo childPaintInfo(paintInfo);
- bool drawsOutline = style()->outlineWidth() && (childPaintInfo.phase == PaintPhaseOutline || childPaintInfo.phase == PaintPhaseSelfOutline);
- if (drawsOutline || childPaintInfo.phase == PaintPhaseForeground) {
- GraphicsContextStateSaver stateSaver(*childPaintInfo.context);
+ bool drawsOutline = style()->outlineWidth() && (childPaintInfo.getPhase() == PaintPhaseOutline || childPaintInfo.getPhase() == PaintPhaseSelfOutline);
+ if (drawsOutline || childPaintInfo.getPhase() == PaintPhaseForeground) {
+ GraphicsContextStateSaver stateSaver(*(childPaintInfo.getContext()));
childPaintInfo.applyTransform(m_localTransform);
- if (childPaintInfo.phase == PaintPhaseForeground) {
+ if (childPaintInfo.getPhase() == PaintPhaseForeground) {
SVGRenderingContext renderingContext(this, childPaintInfo);
if (renderingContext.isRenderingPrepared()) {
@@ -164,9 +164,9 @@ void RenderSVGImage::paintForeground(PaintInfo& paintInfo)
bool useLowQualityScaling = false;
if (style()->svgStyle()->bufferedRendering() != BR_STATIC)
- useLowQualityScaling = ImageQualityController::imageQualityController()->shouldPaintAtLowQuality(paintInfo.context, this, image.get(), image.get(), LayoutSize(destRect.size()));
+ useLowQualityScaling = ImageQualityController::imageQualityController()->shouldPaintAtLowQuality(paintInfo.getContext(), this, image.get(), image.get(), LayoutSize(destRect.size()));
- paintInfo.context->drawImage(image.get(), destRect, srcRect, CompositeSourceOver, DoNotRespectImageOrientation, useLowQualityScaling);
+ paintInfo.getContext()->drawImage(image.get(), destRect, srcRect, CompositeSourceOver, DoNotRespectImageOrientation, useLowQualityScaling);
}
void RenderSVGImage::invalidateBufferedForeground()

Powered by Google App Engine
This is Rietveld 408576698