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

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

Issue 2661323002: Implement CSSPaintValue and add a layout test. (Closed)
Patch Set: rebase Created 3 years, 10 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 <v8.h>
8 #include "bindings/core/v8/ScopedPersistent.h" 9 #include "bindings/core/v8/ScopedPersistent.h"
9 #include "core/css/CSSPaintImageGenerator.h" 10 #include "core/css/CSSPaintImageGenerator.h"
11 #include "core/css/cssom/CSSStyleValue.h"
10 #include "platform/geometry/IntSize.h" 12 #include "platform/geometry/IntSize.h"
11 #include "platform/heap/Handle.h" 13 #include "platform/heap/Handle.h"
12 #include <v8.h>
13 14
14 namespace blink { 15 namespace blink {
15 16
16 class CSSPaintDefinition; 17 class CSSPaintDefinition;
18 class CSSSyntaxDescriptor;
17 class Document; 19 class Document;
18 class Image; 20 class Image;
19 21
20 class CSSPaintImageGeneratorImpl final : public CSSPaintImageGenerator { 22 class CSSPaintImageGeneratorImpl final : public CSSPaintImageGenerator {
21 public: 23 public:
22 static CSSPaintImageGenerator* create(const String& name, 24 static CSSPaintImageGenerator* create(const String& name,
23 Document&, 25 Document&,
24 Observer*); 26 Observer*);
25 ~CSSPaintImageGeneratorImpl() override; 27 ~CSSPaintImageGeneratorImpl() override;
26 28
27 PassRefPtr<Image> paint(const LayoutObject&, 29 PassRefPtr<Image> paint(const LayoutObject&,
28 const IntSize&, 30 const IntSize&,
29 float zoom) final; 31 float zoom,
32 const CSSStyleValueVector*) final;
30 const Vector<CSSPropertyID>& nativeInvalidationProperties() const final; 33 const Vector<CSSPropertyID>& nativeInvalidationProperties() const final;
31 const Vector<AtomicString>& customInvalidationProperties() const final; 34 const Vector<AtomicString>& customInvalidationProperties() const final;
32 bool hasAlpha() const final; 35 bool hasAlpha() const final;
36 const Vector<CSSSyntaxDescriptor>& inputArgumentTypes() const final;
33 37
34 // Should be called from the PaintWorkletGlobalScope when a javascript class 38 // Should be called from the PaintWorkletGlobalScope when a javascript class
35 // is registered with the same name. 39 // is registered with the same name.
36 void setDefinition(CSSPaintDefinition*); 40 void setDefinition(CSSPaintDefinition*);
37 41
38 DECLARE_VIRTUAL_TRACE(); 42 DECLARE_VIRTUAL_TRACE();
39 43
40 private: 44 private:
41 CSSPaintImageGeneratorImpl(Observer*); 45 CSSPaintImageGeneratorImpl(Observer*);
42 CSSPaintImageGeneratorImpl(CSSPaintDefinition*); 46 CSSPaintImageGeneratorImpl(CSSPaintDefinition*);
43 47
44 Member<CSSPaintDefinition> m_definition; 48 Member<CSSPaintDefinition> m_definition;
45 Member<Observer> m_observer; 49 Member<Observer> m_observer;
46 }; 50 };
47 51
48 } // namespace blink 52 } // namespace blink
49 53
50 #endif // CSSPaintImageGeneratorImpl_h 54 #endif // CSSPaintImageGeneratorImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698