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

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

Issue 741123002: Get rid of computeFloatRectForPaintInvalidation (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Apple Computer, Inc. 2 * Copyright (C) 2006 Apple Computer, Inc.
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 */ 20 */
21 21
22 #include "config.h" 22 #include "config.h"
23
24 #include "core/rendering/svg/RenderSVGBlock.h" 23 #include "core/rendering/svg/RenderSVGBlock.h"
25 24
26 #include "core/rendering/RenderView.h" 25 #include "core/rendering/RenderView.h"
27 #include "core/rendering/style/ShadowList.h" 26 #include "core/rendering/style/ShadowList.h"
27 #include "core/rendering/svg/RenderSVGRoot.h"
28 #include "core/rendering/svg/SVGRenderSupport.h" 28 #include "core/rendering/svg/SVGRenderSupport.h"
29 #include "core/rendering/svg/SVGResourcesCache.h" 29 #include "core/rendering/svg/SVGResourcesCache.h"
30 #include "core/svg/SVGElement.h" 30 #include "core/svg/SVGElement.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 RenderSVGBlock::RenderSVGBlock(SVGElement* element) 34 RenderSVGBlock::RenderSVGBlock(SVGElement* element)
35 : RenderBlockFlow(element) 35 : RenderBlockFlow(element)
36 { 36 {
37 } 37 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 LayoutRect RenderSVGBlock::clippedOverflowRectForPaintInvalidation(const RenderL ayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paint InvalidationState) const 99 LayoutRect RenderSVGBlock::clippedOverflowRectForPaintInvalidation(const RenderL ayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paint InvalidationState) const
100 { 100 {
101 return SVGRenderSupport::clippedOverflowRectForPaintInvalidation(this, paint InvalidationContainer, paintInvalidationState); 101 return SVGRenderSupport::clippedOverflowRectForPaintInvalidation(this, paint InvalidationContainer, paintInvalidationState);
102 } 102 }
103 103
104 void RenderSVGBlock::mapRectToPaintInvalidationBacking(const RenderLayerModelObj ect* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const 104 void RenderSVGBlock::mapRectToPaintInvalidationBacking(const RenderLayerModelObj ect* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const
105 { 105 {
106 FloatRect paintInvalidationRect = rect; 106 FloatRect paintInvalidationRect = rect;
107 paintInvalidationRect.inflate(style()->outlineWidth()); 107 paintInvalidationRect.inflate(style()->outlineWidth());
108 computeFloatRectForPaintInvalidation(paintInvalidationContainer, paintInvali dationRect, paintInvalidationState); 108 const RenderSVGRoot* svgRoot = SVGRenderSupport::mapRectToSVGRootForPaintInv alidation(this, paintInvalidationRect, rect);
109 rect = enclosingLayoutRect(paintInvalidationRect); 109 svgRoot->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, paintInvalidationState);
110 }
111
112 void RenderSVGBlock::computeFloatRectForPaintInvalidation(const RenderLayerModel Object* paintInvalidationContainer, FloatRect& paintInvalidationRect, const Pain tInvalidationState* paintInvalidationState) const
113 {
114 SVGRenderSupport::computeFloatRectForPaintInvalidation(this, paintInvalidati onContainer, paintInvalidationRect, paintInvalidationState);
115 } 110 }
116 111
117 bool RenderSVGBlock::nodeAtPoint(const HitTestRequest&, HitTestResult&, const Hi tTestLocation&, const LayoutPoint&, HitTestAction) 112 bool RenderSVGBlock::nodeAtPoint(const HitTestRequest&, HitTestResult&, const Hi tTestLocation&, const LayoutPoint&, HitTestAction)
118 { 113 {
119 ASSERT_NOT_REACHED(); 114 ASSERT_NOT_REACHED();
120 return false; 115 return false;
121 } 116 }
122 117
123 void RenderSVGBlock::invalidateTreeIfNeeded(const PaintInvalidationState& paintI nvalidationState) 118 void RenderSVGBlock::invalidateTreeIfNeeded(const PaintInvalidationState& paintI nvalidationState)
124 { 119 {
125 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) 120 if (!shouldCheckForPaintInvalidation(paintInvalidationState))
126 return; 121 return;
127 122
128 ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState); 123 ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState);
129 RenderBlockFlow::invalidateTreeIfNeeded(paintInvalidationState); 124 RenderBlockFlow::invalidateTreeIfNeeded(paintInvalidationState);
130 } 125 }
131 126
132 } 127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698