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

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

Issue 1144903002: [SP] Delete GraphicsContextAnnotator. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/ReplicaPainter.cpp ('k') | Source/core/paint/SVGImagePainter.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/SVGContainerPainter.h" 6 #include "core/paint/SVGContainerPainter.h"
7 7
8 #include "core/layout/svg/LayoutSVGContainer.h" 8 #include "core/layout/svg/LayoutSVGContainer.h"
9 #include "core/layout/svg/LayoutSVGViewportContainer.h" 9 #include "core/layout/svg/LayoutSVGViewportContainer.h"
10 #include "core/layout/svg/SVGLayoutSupport.h" 10 #include "core/layout/svg/SVGLayoutSupport.h"
11 #include "core/paint/FloatClipRecorder.h" 11 #include "core/paint/FloatClipRecorder.h"
12 #include "core/paint/GraphicsContextAnnotator.h"
13 #include "core/paint/ObjectPainter.h" 12 #include "core/paint/ObjectPainter.h"
14 #include "core/paint/PaintInfo.h" 13 #include "core/paint/PaintInfo.h"
15 #include "core/paint/SVGPaintContext.h" 14 #include "core/paint/SVGPaintContext.h"
16 #include "core/paint/TransformRecorder.h" 15 #include "core/paint/TransformRecorder.h"
17 #include "core/svg/SVGSVGElement.h" 16 #include "core/svg/SVGSVGElement.h"
18 17
19 namespace blink { 18 namespace blink {
20 19
21 void SVGContainerPainter::paint(const PaintInfo& paintInfo) 20 void SVGContainerPainter::paint(const PaintInfo& paintInfo)
22 { 21 {
23 ANNOTATE_GRAPHICS_CONTEXT(paintInfo, &m_layoutSVGContainer);
24
25 // Spec: groups w/o children still may render filter content. 22 // Spec: groups w/o children still may render filter content.
26 if (!m_layoutSVGContainer.firstChild() && !m_layoutSVGContainer.selfWillPain t()) 23 if (!m_layoutSVGContainer.firstChild() && !m_layoutSVGContainer.selfWillPain t())
27 return; 24 return;
28 25
29 // Spec: An empty viewBox on the <svg> element disables rendering. 26 // Spec: An empty viewBox on the <svg> element disables rendering.
30 ASSERT(m_layoutSVGContainer.element()); 27 ASSERT(m_layoutSVGContainer.element());
31 if (isSVGSVGElement(*m_layoutSVGContainer.element()) && toSVGSVGElement(*m_l ayoutSVGContainer.element()).hasEmptyViewBox()) 28 if (isSVGSVGElement(*m_layoutSVGContainer.element()) && toSVGSVGElement(*m_l ayoutSVGContainer.element()).hasEmptyViewBox())
32 return; 29 return;
33 30
34 PaintInfo paintInfoBeforeFiltering(paintInfo); 31 PaintInfo paintInfoBeforeFiltering(paintInfo);
(...skipping 17 matching lines...) Expand all
52 } 49 }
53 } 50 }
54 51
55 if (paintInfoBeforeFiltering.phase == PaintPhaseForeground && m_layoutSVGCon tainer.style()->outlineWidth() && m_layoutSVGContainer.style()->visibility() == VISIBLE) { 52 if (paintInfoBeforeFiltering.phase == PaintPhaseForeground && m_layoutSVGCon tainer.style()->outlineWidth() && m_layoutSVGContainer.style()->visibility() == VISIBLE) {
56 LayoutRect layoutBoundingBox(m_layoutSVGContainer.paintInvalidationRectI nLocalCoordinates()); 53 LayoutRect layoutBoundingBox(m_layoutSVGContainer.paintInvalidationRectI nLocalCoordinates());
57 ObjectPainter(m_layoutSVGContainer).paintOutline(paintInfoBeforeFilterin g, layoutBoundingBox, layoutBoundingBox); 54 ObjectPainter(m_layoutSVGContainer).paintOutline(paintInfoBeforeFilterin g, layoutBoundingBox, layoutBoundingBox);
58 } 55 }
59 } 56 }
60 57
61 } // namespace blink 58 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/ReplicaPainter.cpp ('k') | Source/core/paint/SVGImagePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698