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

Unified Diff: third_party/WebKit/Source/core/style/StylePath.h

Issue 1640313002: Lazily create the Path in StylePath (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/StylePath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/StylePath.h
diff --git a/third_party/WebKit/Source/core/style/StylePath.h b/third_party/WebKit/Source/core/style/StylePath.h
index f8d5781ef9a6a008739d664c3f72e72e730a8995..b98ff9148aeb51c31a5d49708cebd1b312ddba2d 100644
--- a/third_party/WebKit/Source/core/style/StylePath.h
+++ b/third_party/WebKit/Source/core/style/StylePath.h
@@ -5,8 +5,8 @@
#ifndef StylePath_h
#define StylePath_h
-#include "platform/graphics/Path.h"
#include "platform/heap/Handle.h"
+#include "wtf/OwnPtr.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/RefPtr.h"
@@ -14,6 +14,7 @@
namespace blink {
class CSSValue;
+class Path;
class SVGPathByteStream;
class StylePath : public RefCounted<StylePath> {
@@ -23,7 +24,7 @@ public:
static StylePath* emptyPath();
- const Path& path() const { return m_path; }
+ const Path& path() const;
const SVGPathByteStream& byteStream() const;
PassRefPtrWillBeRawPtr<CSSValue> computedCSSValue() const;
@@ -34,7 +35,7 @@ private:
explicit StylePath(PassRefPtr<SVGPathByteStream>);
RefPtr<SVGPathByteStream> m_byteStream;
- Path m_path;
+ mutable OwnPtr<Path> m_path;
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/StylePath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698