Index: third_party/WebKit/Source/core/style/StylePath.cpp |
diff --git a/third_party/WebKit/Source/core/style/StylePath.cpp b/third_party/WebKit/Source/core/style/StylePath.cpp |
index 674ba453142edff904bd52a58cce32e3da49fbbf..5ed7a3c2a619ee38b5b2346ed75b39ae2c25940d 100644 |
--- a/third_party/WebKit/Source/core/style/StylePath.cpp |
+++ b/third_party/WebKit/Source/core/style/StylePath.cpp |
@@ -7,6 +7,7 @@ |
#include "core/css/CSSPathValue.h" |
#include "core/svg/SVGPathByteStream.h" |
#include "core/svg/SVGPathUtilities.h" |
+#include "platform/graphics/Path.h" |
namespace blink { |
@@ -14,7 +15,6 @@ StylePath::StylePath(PassRefPtr<SVGPathByteStream> pathByteStream) |
: m_byteStream(pathByteStream) |
{ |
ASSERT(m_byteStream); |
- buildPathFromByteStream(*m_byteStream, m_path); |
} |
StylePath::~StylePath() |
@@ -32,6 +32,15 @@ StylePath* StylePath::emptyPath() |
return emptyPath; |
} |
+const Path& StylePath::path() const |
+{ |
+ if (!m_path) { |
+ m_path = adoptPtr(new Path); |
+ buildPathFromByteStream(*m_byteStream, *m_path); |
+ } |
+ return *m_path; |
+} |
+ |
const SVGPathByteStream& StylePath::byteStream() const |
{ |
return *m_byteStream; |