| Index: Source/core/html/canvas/CanvasRenderingContext2D.h
|
| diff --git a/Source/core/html/canvas/CanvasRenderingContext2D.h b/Source/core/html/canvas/CanvasRenderingContext2D.h
|
| index 988591d85fecff0c68312ffdc0c733e362f4257f..35001e79c37bcdf9eafa224052a5cf332749a045 100644
|
| --- a/Source/core/html/canvas/CanvasRenderingContext2D.h
|
| +++ b/Source/core/html/canvas/CanvasRenderingContext2D.h
|
| @@ -30,6 +30,7 @@
|
| #include "bindings/core/v8/UnionTypesCore.h"
|
| #include "core/css/CSSFontSelectorClient.h"
|
| #include "core/html/canvas/Canvas2DContextAttributes.h"
|
| +#include "core/html/canvas/CanvasContextCreationAttributes.h"
|
| #include "core/html/canvas/CanvasPathMethods.h"
|
| #include "core/html/canvas/CanvasRenderingContext.h"
|
| #include "core/html/canvas/ClipList.h"
|
| @@ -70,10 +71,15 @@ typedef HTMLImageElementOrHTMLVideoElementOrHTMLCanvasElementOrImageBitmap Canva
|
|
|
| typedef WillBeHeapHashMap<String, RefPtrWillBeMember<MutableStylePropertySet>> MutableStylePropertyMap;
|
|
|
| +enum Canvas2DContextStorage {
|
| + PersistentStorage,
|
| + DiscardableStorage
|
| +};
|
| +
|
| class CanvasRenderingContext2D final: public CanvasRenderingContext, public ScriptWrappable, public CanvasPathMethods {
|
| DEFINE_WRAPPERTYPEINFO();
|
| public:
|
| - static PassOwnPtrWillBeRawPtr<CanvasRenderingContext2D> create(HTMLCanvasElement* canvas, const Canvas2DContextAttributes* attrs, Document& document)
|
| + static PassOwnPtrWillBeRawPtr<CanvasRenderingContext2D> create(HTMLCanvasElement* canvas, const CanvasContextCreationAttributes& attrs, Document& document)
|
| {
|
| return adoptPtrWillBeNoop(new CanvasRenderingContext2D(canvas, attrs, document));
|
| }
|
| @@ -200,7 +206,7 @@ public:
|
| bool imageSmoothingEnabled() const;
|
| void setImageSmoothingEnabled(bool);
|
|
|
| - PassRefPtrWillBeRawPtr<Canvas2DContextAttributes> getContextAttributes() const;
|
| + void getContextAttributes(Canvas2DContextAttributes&) const;
|
|
|
| void drawFocusIfNeeded(Element*);
|
| void drawFocusIfNeeded(Path2D*, Element*);
|
| @@ -279,7 +285,7 @@ private:
|
| ClipList m_clipList;
|
| };
|
|
|
| - CanvasRenderingContext2D(HTMLCanvasElement*, const Canvas2DContextAttributes* attrs, Document&);
|
| + CanvasRenderingContext2D(HTMLCanvasElement*, const CanvasContextCreationAttributes& attrs, Document&);
|
|
|
| State& modifiableState() { ASSERT(!state().m_unrealizedSaveCount); return *m_stateStack.last(); }
|
| const State& state() const { return *m_stateStack.last(); }
|
|
|