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

Side by Side Diff: third_party/WebKit/Source/modules/csspaint/CSSPaintImageGeneratorImpl.h

Issue 1896893004: Hook up style invalidation for CSS Paint API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@css-paint-register
Patch Set: rebase. Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CSSPaintImageGeneratorImpl_h 5 #ifndef CSSPaintImageGeneratorImpl_h
6 #define CSSPaintImageGeneratorImpl_h 6 #define CSSPaintImageGeneratorImpl_h
7 7
8 #include "bindings/core/v8/ScopedPersistent.h" 8 #include "bindings/core/v8/ScopedPersistent.h"
9 #include "core/css/CSSPaintImageGenerator.h" 9 #include "core/css/CSSPaintImageGenerator.h"
10 #include "platform/geometry/IntSize.h" 10 #include "platform/geometry/IntSize.h"
11 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
12 #include <v8.h> 12 #include <v8.h>
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class CSSPaintDefinition; 16 class CSSPaintDefinition;
17 class Document; 17 class Document;
18 class Image; 18 class Image;
19 19
20 class CSSPaintImageGeneratorImpl final : public CSSPaintImageGenerator { 20 class CSSPaintImageGeneratorImpl final : public CSSPaintImageGenerator {
21 public: 21 public:
22 static CSSPaintImageGenerator* create(const String& name, Document&, Observe r*); 22 static CSSPaintImageGenerator* create(const String& name, Document&, Observe r*);
23 ~CSSPaintImageGeneratorImpl() override; 23 ~CSSPaintImageGeneratorImpl() override;
24 24
25 PassRefPtr<Image> paint(const IntSize&) final; 25 PassRefPtr<Image> paint(const IntSize&) final;
26 const Vector<CSSPropertyID>& nativeInvalidationProperties() const final;
27 const Vector<AtomicString>& customInvalidationProperties() const final;
26 28
27 // Should be called from the PaintWorkletGlobalScope when a javascript class 29 // Should be called from the PaintWorkletGlobalScope when a javascript class
28 // is registered with the same name. 30 // is registered with the same name.
29 void setDefinition(CSSPaintDefinition*); 31 void setDefinition(CSSPaintDefinition*);
30 32
31 DECLARE_VIRTUAL_TRACE(); 33 DECLARE_VIRTUAL_TRACE();
32 34
33 private: 35 private:
34 CSSPaintImageGeneratorImpl(Observer*); 36 CSSPaintImageGeneratorImpl(Observer*);
35 CSSPaintImageGeneratorImpl(CSSPaintDefinition*); 37 CSSPaintImageGeneratorImpl(CSSPaintDefinition*);
36 38
37 Member<CSSPaintDefinition> m_definition; 39 Member<CSSPaintDefinition> m_definition;
38 Member<Observer> m_observer; 40 Member<Observer> m_observer;
39 }; 41 };
40 42
41 } // namespace blink 43 } // namespace blink
42 44
43 #endif // CSSPaintImageGeneratorImpl_h 45 #endif // CSSPaintImageGeneratorImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698