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

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

Issue 19614004: Compositor hit test performance improvement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge with trunk Created 7 years, 4 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/rendering/svg/RenderSVGModelObject.h ('k') | Source/core/testing/Internals.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 /* 1 /*
2 * Copyright (c) 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2009, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 SVGResourcesCache::clientDestroyed(this); 93 SVGResourcesCache::clientDestroyed(this);
94 RenderObject::willBeDestroyed(); 94 RenderObject::willBeDestroyed();
95 } 95 }
96 96
97 void RenderSVGModelObject::computeLayerHitTestRects(LayerHitTestRects& rects) co nst 97 void RenderSVGModelObject::computeLayerHitTestRects(LayerHitTestRects& rects) co nst
98 { 98 {
99 // Using just the rect for the SVGRoot is good enough for now. 99 // Using just the rect for the SVGRoot is good enough for now.
100 SVGRenderSupport::findTreeRootObject(this)->computeLayerHitTestRects(rects); 100 SVGRenderSupport::findTreeRootObject(this)->computeLayerHitTestRects(rects);
101 } 101 }
102 102
103 void RenderSVGModelObject::addLayerHitTestRects(LayerHitTestRects&, const Render Layer* currentLayer, const LayoutPoint& layerOffset) const 103 void RenderSVGModelObject::addLayerHitTestRects(LayerHitTestRects&, const Render Layer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& container Rect) const
104 { 104 {
105 // We don't walk into SVG trees at all - just report their container. 105 // We don't walk into SVG trees at all - just report their container.
106 } 106 }
107 107
108 void RenderSVGModelObject::styleWillChange(StyleDifference diff, const RenderSty le* newStyle) 108 void RenderSVGModelObject::styleWillChange(StyleDifference diff, const RenderSty le* newStyle)
109 { 109 {
110 if (diff == StyleDifferenceLayout) { 110 if (diff == StyleDifferenceLayout) {
111 setNeedsBoundariesUpdate(); 111 setNeedsBoundariesUpdate();
112 if (newStyle->hasTransform()) 112 if (newStyle->hasTransform())
113 setNeedsTransformUpdate(); 113 setNeedsTransformUpdate();
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 if (!isGraphicsElement(renderer)) 199 if (!isGraphicsElement(renderer))
200 return false; 200 return false;
201 AffineTransform ctm; 201 AffineTransform ctm;
202 SVGElement* svgElement = toSVGElement(renderer->node()); 202 SVGElement* svgElement = toSVGElement(renderer->node());
203 getElementCTM(svgElement, ctm); 203 getElementCTM(svgElement, ctm);
204 ASSERT(svgElement->renderer()); 204 ASSERT(svgElement->renderer());
205 return rect.contains(ctm.mapRect(svgElement->renderer()->repaintRectInLocalC oordinates())); 205 return rect.contains(ctm.mapRect(svgElement->renderer()->repaintRectInLocalC oordinates()));
206 } 206 }
207 207
208 } // namespace WebCore 208 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.h ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698