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

Side by Side Diff: Source/core/rendering/svg/RenderSVGResourceClipper.h

Issue 32713002: Move more data from .data to the .rodata section (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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) Research In Motion Limited 2009-2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 bool applyStatefulResource(RenderObject*, GraphicsContext*&, ClipperContext& ); 57 bool applyStatefulResource(RenderObject*, GraphicsContext*&, ClipperContext& );
58 void postApplyStatefulResource(RenderObject*, GraphicsContext*&, ClipperCont ext&); 58 void postApplyStatefulResource(RenderObject*, GraphicsContext*&, ClipperCont ext&);
59 59
60 // clipPath can be clipped too, but don't have a boundingBox or repaintRect. So we can't call 60 // clipPath can be clipped too, but don't have a boundingBox or repaintRect. So we can't call
61 // applyResource directly and use the rects from the object, since they are empty for RenderSVGResources 61 // applyResource directly and use the rects from the object, since they are empty for RenderSVGResources
62 // FIXME: We made applyClippingToContext public because we cannot call apply Resource on HTML elements (it asserts on RenderObject::objectBoundingBox) 62 // FIXME: We made applyClippingToContext public because we cannot call apply Resource on HTML elements (it asserts on RenderObject::objectBoundingBox)
63 bool applyClippingToContext(RenderObject*, const FloatRect&, const FloatRect &, GraphicsContext*, ClipperContext&); 63 bool applyClippingToContext(RenderObject*, const FloatRect&, const FloatRect &, GraphicsContext*, ClipperContext&);
64 64
65 virtual FloatRect resourceBoundingBox(RenderObject*); 65 virtual FloatRect resourceBoundingBox(RenderObject*);
66 66
67 virtual RenderSVGResourceType resourceType() const { return ClipperResourceT ype; } 67 virtual RenderSVGResourceType resourceType() const { return s_resourceType; }
68 68
69 bool hitTestClipContent(const FloatRect&, const FloatPoint&); 69 bool hitTestClipContent(const FloatRect&, const FloatPoint&);
70 70
71 SVGUnitTypes::SVGUnitType clipPathUnits() const { return toSVGClipPathElemen t(element())->clipPathUnitsCurrentValue(); } 71 SVGUnitTypes::SVGUnitType clipPathUnits() const { return toSVGClipPathElemen t(element())->clipPathUnitsCurrentValue(); }
72 72
73 static RenderSVGResourceType s_resourceType; 73 static const RenderSVGResourceType s_resourceType;
74 private: 74 private:
75 bool tryPathOnlyClipping(GraphicsContext*, const AffineTransform&, const Flo atRect&); 75 bool tryPathOnlyClipping(GraphicsContext*, const AffineTransform&, const Flo atRect&);
76 void drawMaskContent(GraphicsContext*, const FloatRect& targetBoundingBox); 76 void drawMaskContent(GraphicsContext*, const FloatRect& targetBoundingBox);
77 void calculateClipContentRepaintRect(); 77 void calculateClipContentRepaintRect();
78 78
79 FloatRect m_clipBoundaries; 79 FloatRect m_clipBoundaries;
80 80
81 // Reference cycle detection. 81 // Reference cycle detection.
82 bool m_inClipExpansion; 82 bool m_inClipExpansion;
83 }; 83 };
84 84
85 inline RenderSVGResourceClipper* toRenderSVGResourceClipper(RenderSVGResource* r esource) 85 inline RenderSVGResourceClipper* toRenderSVGResourceClipper(RenderSVGResource* r esource)
86 { 86 {
87 ASSERT_WITH_SECURITY_IMPLICATION(!resource || resource->resourceType() == Cl ipperResourceType); 87 ASSERT_WITH_SECURITY_IMPLICATION(!resource || resource->resourceType() == Cl ipperResourceType);
88 return static_cast<RenderSVGResourceClipper*>(resource); 88 return static_cast<RenderSVGResourceClipper*>(resource);
89 } 89 }
90 90
91 } 91 }
92 92
93 #endif 93 #endif
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDebuggerAgent.cpp ('k') | Source/core/rendering/svg/RenderSVGResourceClipper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698