Chromium Code Reviews

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

Issue 1774943003: blink: Rename platform/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-platform: rebase-yayyyyyyyy Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 "core/paint/SVGRootPainter.h" 5 #include "core/paint/SVGRootPainter.h"
6 6
7 #include "core/layout/svg/LayoutSVGRoot.h" 7 #include "core/layout/svg/LayoutSVGRoot.h"
8 #include "core/layout/svg/SVGResources.h" 8 #include "core/layout/svg/SVGResources.h"
9 #include "core/layout/svg/SVGResourcesCache.h" 9 #include "core/layout/svg/SVGResourcesCache.h"
10 #include "core/paint/BoxPainter.h" 10 #include "core/paint/BoxPainter.h"
(...skipping 36 matching lines...)
47 PaintInfo paintInfoBeforeFiltering(paintInfo); 47 PaintInfo paintInfoBeforeFiltering(paintInfo);
48 48
49 // At the HTML->SVG boundary, SVGRoot will have a paint offset transform 49 // At the HTML->SVG boundary, SVGRoot will have a paint offset transform
50 // paint property but may not have a PaintLayer, so we need to update the 50 // paint property but may not have a PaintLayer, so we need to update the
51 // paint properties here since they will not be updated by PaintLayer 51 // paint properties here since they will not be updated by PaintLayer
52 // (See: PaintPropertyTreeBuilder::createPaintOffsetTranslationIfNeeded). 52 // (See: PaintPropertyTreeBuilder::createPaintOffsetTranslationIfNeeded).
53 Optional<ScopedPaintChunkProperties> paintOffsetTranslationPropertyScope; 53 Optional<ScopedPaintChunkProperties> paintOffsetTranslationPropertyScope;
54 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && !m_layoutSVGRoot.has Layer()) { 54 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && !m_layoutSVGRoot.has Layer()) {
55 const auto* objectProperties = m_layoutSVGRoot.objectPaintProperties(); 55 const auto* objectProperties = m_layoutSVGRoot.objectPaintProperties();
56 if (objectProperties && objectProperties->paintOffsetTranslation()) { 56 if (objectProperties && objectProperties->paintOffsetTranslation()) {
57 auto& paintController = paintInfoBeforeFiltering.context.paintContro ller(); 57 auto& paintController = paintInfoBeforeFiltering.context.getPaintCon troller();
58 PaintChunkProperties properties(paintController.currentPaintChunkPro perties()); 58 PaintChunkProperties properties(paintController.currentPaintChunkPro perties());
59 properties.transform = objectProperties->paintOffsetTranslation(); 59 properties.transform = objectProperties->paintOffsetTranslation();
60 paintOffsetTranslationPropertyScope.emplace(paintController, propert ies); 60 paintOffsetTranslationPropertyScope.emplace(paintController, propert ies);
61 } 61 }
62 } 62 }
63 63
64 // Apply initial viewport clip. 64 // Apply initial viewport clip.
65 Optional<ClipRecorder> clipRecorder; 65 Optional<ClipRecorder> clipRecorder;
66 if (m_layoutSVGRoot.shouldApplyViewportClip()) { 66 if (m_layoutSVGRoot.shouldApplyViewportClip()) {
67 // TODO(pdr): Clip the paint info cull rect here. 67 // TODO(pdr): Clip the paint info cull rect here.
(...skipping 11 matching lines...)
79 if (paintContext.paintInfo().phase == PaintPhaseForeground && !paintContext. applyClipMaskAndFilterIfNecessary()) 79 if (paintContext.paintInfo().phase == PaintPhaseForeground && !paintContext. applyClipMaskAndFilterIfNecessary())
80 return; 80 return;
81 81
82 BoxPainter(m_layoutSVGRoot).paint(paintContext.paintInfo(), LayoutPoint()); 82 BoxPainter(m_layoutSVGRoot).paint(paintContext.paintInfo(), LayoutPoint());
83 83
84 PaintTiming& timing = PaintTiming::from(m_layoutSVGRoot.node()->document().t opDocument()); 84 PaintTiming& timing = PaintTiming::from(m_layoutSVGRoot.node()->document().t opDocument());
85 timing.markFirstContentfulPaint(); 85 timing.markFirstContentfulPaint();
86 } 86 }
87 87
88 } // namespace blink 88 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp ('k') | third_party/WebKit/Source/core/paint/SVGShapePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine