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

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

Issue 693313003: Factor SVGMarkerPainter into SVGShapePainter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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/SVGMarkerPainter.h ('k') | Source/core/paint/SVGShapePainter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/SVGMarkerPainter.cpp
diff --git a/Source/core/paint/SVGMarkerPainter.cpp b/Source/core/paint/SVGMarkerPainter.cpp
deleted file mode 100644
index b8599a738b0e4941bf9beb0c401f68f53eddaab8..0000000000000000000000000000000000000000
--- a/Source/core/paint/SVGMarkerPainter.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-#include "core/paint/SVGMarkerPainter.h"
-
-#include "core/paint/SVGContainerPainter.h"
-#include "core/rendering/PaintInfo.h"
-#include "core/rendering/svg/RenderSVGResourceMarker.h"
-#include "core/rendering/svg/SVGMarkerData.h"
-#include "core/rendering/svg/SVGRenderSupport.h"
-#include "platform/graphics/GraphicsContextStateSaver.h"
-
-namespace blink {
-
-void SVGMarkerPainter::paint(PaintInfo& paintInfo, const MarkerPosition& position, float strokeWidth)
-{
- // An empty viewBox disables rendering.
- SVGMarkerElement* marker = toSVGMarkerElement(m_renderSVGMarker.element());
- ASSERT(marker);
- if (marker->hasAttribute(SVGNames::viewBoxAttr) && marker->viewBox()->currentValue()->isValid() && marker->viewBox()->currentValue()->value().isEmpty())
- return;
-
- PaintInfo info(paintInfo);
- GraphicsContextStateSaver stateSaver(*info.context, false);
- info.applyTransform(m_renderSVGMarker.markerTransformation(position.origin, position.angle, strokeWidth), &stateSaver);
-
- if (SVGRenderSupport::isOverflowHidden(&m_renderSVGMarker)) {
- stateSaver.saveIfNeeded();
- info.context->clip(m_renderSVGMarker.viewport());
- }
-
- SVGContainerPainter(m_renderSVGMarker).paint(info);
-}
-
-} // namespace blink
« no previous file with comments | « Source/core/paint/SVGMarkerPainter.h ('k') | Source/core/paint/SVGShapePainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698