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

Side by Side Diff: Source/core/rendering/svg/RenderSVGShape.cpp

Issue 658333003: Make RenderSVGResource::requestPaintingResource an implementation detail (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: requestPaintForDRT -> requestPaintDescription. Created 6 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2008 Rob Buis <buis@kde.org>
4 * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2005, 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. 5 * Copyright (C) 2009 Google, Inc.
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> 8 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com>
9 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> 9 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org>
10 * Copyright (C) 2011 University of Szeged 10 * Copyright (C) 2011 University of Szeged
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 bool RenderSVGShape::shapeDependentFillContains(const FloatPoint& point, const W indRule fillRule) const 104 bool RenderSVGShape::shapeDependentFillContains(const FloatPoint& point, const W indRule fillRule) const
105 { 105 {
106 return path().contains(point, fillRule); 106 return path().contains(point, fillRule);
107 } 107 }
108 108
109 bool RenderSVGShape::fillContains(const FloatPoint& point, bool requiresFill, co nst WindRule fillRule) 109 bool RenderSVGShape::fillContains(const FloatPoint& point, bool requiresFill, co nst WindRule fillRule)
110 { 110 {
111 if (!m_fillBoundingBox.contains(point)) 111 if (!m_fillBoundingBox.contains(point))
112 return false; 112 return false;
113 113
114 bool hasFallback; 114 if (requiresFill && !SVGPaintServer::existsForRenderer(*this, style(), Apply ToFillMode))
115 if (requiresFill && !RenderSVGResource::requestPaintingResource(ApplyToFillM ode, *this, style(), hasFallback))
116 return false; 115 return false;
117 116
118 return shapeDependentFillContains(point, fillRule); 117 return shapeDependentFillContains(point, fillRule);
119 } 118 }
120 119
121 bool RenderSVGShape::strokeContains(const FloatPoint& point, bool requiresStroke ) 120 bool RenderSVGShape::strokeContains(const FloatPoint& point, bool requiresStroke )
122 { 121 {
123 if (!strokeBoundingBox().contains(point)) 122 if (!strokeBoundingBox().contains(point))
124 return false; 123 return false;
125 124
126 bool hasFallback; 125 if (requiresStroke && !SVGPaintServer::existsForRenderer(*this, style(), App lyToStrokeMode))
127 if (requiresStroke && !RenderSVGResource::requestPaintingResource(ApplyToStr okeMode, *this, style(), hasFallback))
128 return false; 126 return false;
129 127
130 return shapeDependentStrokeContains(point); 128 return shapeDependentStrokeContains(point);
131 } 129 }
132 130
133 void RenderSVGShape::layout() 131 void RenderSVGShape::layout()
134 { 132 {
135 bool updateCachedBoundariesInParents = false; 133 bool updateCachedBoundariesInParents = false;
136 134
137 if (m_needsShapeUpdate || m_needsBoundariesUpdate) { 135 if (m_needsShapeUpdate || m_needsBoundariesUpdate) {
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 ASSERT(resources); 435 ASSERT(resources);
438 436
439 RenderSVGResourceMarker* markerStart = resources->markerStart(); 437 RenderSVGResourceMarker* markerStart = resources->markerStart();
440 438
441 SVGMarkerData markerData(m_markerPositions, markerStart ? markerStart->orien tType() == SVGMarkerOrientAutoStartReverse : false); 439 SVGMarkerData markerData(m_markerPositions, markerStart ? markerStart->orien tType() == SVGMarkerOrientAutoStartReverse : false);
442 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement); 440 m_path->apply(&markerData, SVGMarkerData::updateFromPathElement);
443 markerData.pathIsDone(); 441 markerData.pathIsDone();
444 } 442 }
445 443
446 } 444 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp ('k') | Source/core/rendering/svg/SVGRenderTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698