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

Side by Side Diff: Source/core/paint/SVGRootPainter.cpp

Issue 802833003: Remove the SVG paint culling optimization (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix test for the moon lander. Created 6 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/SVGImagePainter.cpp ('k') | Source/core/paint/SVGShapePainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/SVGRootPainter.h" 6 #include "core/paint/SVGRootPainter.h"
7 7
8 #include "core/paint/BoxPainter.h" 8 #include "core/paint/BoxPainter.h"
9 #include "core/rendering/PaintInfo.h" 9 #include "core/rendering/PaintInfo.h"
10 #include "core/rendering/svg/RenderSVGRoot.h" 10 #include "core/rendering/svg/RenderSVGRoot.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // Apply initial viewport clip. 46 // Apply initial viewport clip.
47 if (m_renderSVGRoot.shouldApplyViewportClip()) 47 if (m_renderSVGRoot.shouldApplyViewportClip())
48 childPaintInfo.context->clip(pixelSnappedIntRect(m_renderSVGRoot.overflo wClipRect(paintOffset))); 48 childPaintInfo.context->clip(pixelSnappedIntRect(m_renderSVGRoot.overflo wClipRect(paintOffset)));
49 49
50 // Convert from container offsets (html renderers) to a relative transform ( svg renderers). 50 // Convert from container offsets (html renderers) to a relative transform ( svg renderers).
51 // Transform from our paint container's coordinate system to our local coord s. 51 // Transform from our paint container's coordinate system to our local coord s.
52 IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset); 52 IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset);
53 childPaintInfo.applyTransform(AffineTransform::translation(adjustedPaintOffs et.x(), adjustedPaintOffset.y()) * m_renderSVGRoot.localToBorderBoxTransform()); 53 childPaintInfo.applyTransform(AffineTransform::translation(adjustedPaintOffs et.x(), adjustedPaintOffset.y()) * m_renderSVGRoot.localToBorderBoxTransform());
54 54
55 // SVG doesn't use paintOffset internally but we need to bake it into the pa int rect.
56 childPaintInfo.rect.move(-adjustedPaintOffset.x(), -adjustedPaintOffset.y()) ;
57
55 SVGRenderingContext renderingContext; 58 SVGRenderingContext renderingContext;
56 if (childPaintInfo.phase == PaintPhaseForeground) { 59 if (childPaintInfo.phase == PaintPhaseForeground) {
57 renderingContext.prepareToRenderSVGContent(&m_renderSVGRoot, childPaintI nfo); 60 renderingContext.prepareToRenderSVGContent(&m_renderSVGRoot, childPaintI nfo);
58 if (!renderingContext.isRenderingPrepared()) 61 if (!renderingContext.isRenderingPrepared())
59 return; 62 return;
60 } 63 }
61 64
62 BoxPainter(m_renderSVGRoot).paint(childPaintInfo, LayoutPoint()); 65 BoxPainter(m_renderSVGRoot).paint(childPaintInfo, LayoutPoint());
63 } 66 }
64 67
65 } // namespace blink 68 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/SVGImagePainter.cpp ('k') | Source/core/paint/SVGShapePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698