| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012, 2013 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012, 2013 Adobe Systems Incorporated. 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "core/html/canvas/CanvasPathMethods.h" | 32 #include "core/html/canvas/CanvasPathMethods.h" |
| 33 #include "platform/heap/Handle.h" | 33 #include "platform/heap/Handle.h" |
| 34 #include "platform/transforms/AffineTransform.h" | 34 #include "platform/transforms/AffineTransform.h" |
| 35 #include "wtf/PassRefPtr.h" | 35 #include "wtf/PassRefPtr.h" |
| 36 #include "wtf/RefCounted.h" | 36 #include "wtf/RefCounted.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class Path2D final : public RefCounted<Path2D>, public CanvasPathMethods, public
ScriptWrappable { | 40 class Path2D final : public RefCounted<Path2D>, public CanvasPathMethods, public
ScriptWrappable { |
| 41 DEFINE_WRAPPERTYPEINFO(); | 41 DEFINE_WRAPPERTYPEINFO(); |
| 42 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 42 WTF_MAKE_FAST_ALLOCATED; |
| 43 WTF_MAKE_NONCOPYABLE(Path2D); | 43 WTF_MAKE_NONCOPYABLE(Path2D); |
| 44 public: | 44 public: |
| 45 static PassRefPtr<Path2D> create() { return adoptRef(new Path2D); } | 45 static PassRefPtr<Path2D> create() { return adoptRef(new Path2D); } |
| 46 static PassRefPtr<Path2D> create(Path2D* path) { return adoptRef(new Path2D(
path)); } | 46 static PassRefPtr<Path2D> create(Path2D* path) { return adoptRef(new Path2D(
path)); } |
| 47 | 47 |
| 48 static PassRefPtr<Path2D> create(const Path& path) { return adoptRef(new Pat
h2D(path)); } | 48 static PassRefPtr<Path2D> create(const Path& path) { return adoptRef(new Pat
h2D(path)); } |
| 49 | 49 |
| 50 const Path& path() const { return m_path; } | 50 const Path& path() const { return m_path; } |
| 51 | 51 |
| 52 void addPath(Path2D* path) | 52 void addPath(Path2D* path) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 72 Path2D(Path2D* path) | 72 Path2D(Path2D* path) |
| 73 : CanvasPathMethods(path->path()) | 73 : CanvasPathMethods(path->path()) |
| 74 { | 74 { |
| 75 ScriptWrappable::init(this); | 75 ScriptWrappable::init(this); |
| 76 } | 76 } |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace blink | 79 } // namespace blink |
| 80 | 80 |
| 81 #endif // Path2D_h | 81 #endif // Path2D_h |
| OLD | NEW |