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

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

Issue 2059433002: Use transform paint property nodes in SVG [spv2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@svgTransformProps2
Patch Set: Rebase to get viewBox fix Created 4 years, 6 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/SVGRootPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp b/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp
index 28894f16e3505803a1ab13fd3bc8a54f21c8d190..4aa5f909c170fc9763447d61f1d03777b4a11a9b 100644
--- a/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp
@@ -14,7 +14,6 @@
#include "core/paint/TransformRecorder.h"
#include "core/svg/SVGSVGElement.h"
#include "platform/graphics/paint/ClipRecorder.h"
-#include "platform/graphics/paint/ScopedPaintChunkProperties.h"
#include "wtf/Optional.h"
namespace blink {
@@ -45,19 +44,6 @@ void SVGRootPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintO
PaintInfo paintInfoBeforeFiltering(paintInfo);
- Optional<ScopedPaintChunkProperties> propertyScope;
- if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
- const auto* objectProperties = m_layoutSVGRoot.objectPaintProperties();
- // If a transform exists, we can rely on a layer existing to apply it.
- DCHECK(!objectProperties || !objectProperties->transform() || m_layoutSVGRoot.hasLayer());
- if (objectProperties && objectProperties->svgLocalToBorderBoxTransform()) {
- auto& paintController = paintInfoBeforeFiltering.context.getPaintController();
- PaintChunkProperties properties(paintController.currentPaintChunkProperties());
- properties.transform = objectProperties->svgLocalToBorderBoxTransform();
- propertyScope.emplace(paintController, properties);
- }
- }
-
// Apply initial viewport clip.
Optional<ClipRecorder> clipRecorder;
if (m_layoutSVGRoot.shouldApplyViewportClip()) {
@@ -76,7 +62,7 @@ void SVGRootPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintO
paintOffsetToBorderBox.multiply(m_layoutSVGRoot.localToBorderBoxTransform());
trchen 2016/06/13 23:26:52 PaintPropertyTreeBuilder::updateSvgLocalToBorderBo
paintInfoBeforeFiltering.updateCullRect(paintOffsetToBorderBox);
- TransformRecorder transformRecorder(paintInfoBeforeFiltering.context, m_layoutSVGRoot, paintOffsetToBorderBox);
+ SVGTransformContext transformContext(paintInfoBeforeFiltering.context, m_layoutSVGRoot, paintOffsetToBorderBox);
SVGPaintContext paintContext(m_layoutSVGRoot, paintInfoBeforeFiltering);
if (paintContext.paintInfo().phase == PaintPhaseForeground && !paintContext.applyClipMaskAndFilterIfNecessary())

Powered by Google App Engine
This is Rietveld 408576698