Chromium Code Reviews| Index: third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h |
| diff --git a/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h b/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h |
| index 9c768b7377e226930b370f2b949be40d199d3c6b..1e8a09d69dc89585cb8e825978666f64d7542939 100644 |
| --- a/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h |
| +++ b/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h |
| @@ -12,6 +12,7 @@ |
| namespace blink { |
| +class Image; |
| class ScriptState; |
| class CSSPaintDefinition final : public GarbageCollectedFinalized<CSSPaintDefinition> { |
| @@ -19,6 +20,10 @@ public: |
| static RawPtr<CSSPaintDefinition> create(ScriptState*, v8::Local<v8::Function> constructor, v8::Local<v8::Function> paint); |
| virtual ~CSSPaintDefinition(); |
| + PassRefPtr<Image> paint(const IntSize&); |
|
chrishtr
2016/04/06 18:55:20
This class is under-documented.
Please also add M
ikilpatrick
2016/04/07 23:03:00
PTAL.
|
| + v8::Local<v8::Object> paintInstance(); |
| + ScriptState* getScriptState() const { return m_scriptState.get(); } |
| + |
| v8::Local<v8::Function> paintFunctionForTesting(v8::Isolate* isolate) { return m_paint.newLocal(isolate); } |
| DEFINE_INLINE_TRACE() { }; |
| @@ -33,6 +38,11 @@ private: |
| // PaintWorkletGlobalScope. |
| ScopedPersistent<v8::Function> m_constructor; |
| ScopedPersistent<v8::Function> m_paint; |
| + |
| + // At the moment there is only ever one instance of a paint class per type. |
| + // This is a weak reference, CSSPaintImageGeneratorImpl holds a persistent |
| + // reference which keeps it alive. |
| + ScopedPersistent<v8::Object> m_instance; |
| }; |
| } // namespace blink |