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

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

Issue 2661323002: Implement CSSPaintValue and add a layout test. (Closed)
Patch Set: fix indent 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 "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 CSSVariableData;
17 class Document; 18 class Document;
18 class Image; 19 class Image;
19 20
20 class CSSPaintImageGeneratorImpl final : public CSSPaintImageGenerator { 21 class CSSPaintImageGeneratorImpl final : public CSSPaintImageGenerator {
21 public: 22 public:
22 static CSSPaintImageGenerator* create(const String& name, 23 static CSSPaintImageGenerator* create(const String& name,
23 Document&, 24 Document&,
24 Observer*); 25 Observer*);
25 ~CSSPaintImageGeneratorImpl() override; 26 ~CSSPaintImageGeneratorImpl() override;
26 27
27 PassRefPtr<Image> paint(const LayoutObject&, 28 PassRefPtr<Image> paint(const LayoutObject&,
28 const IntSize&, 29 const IntSize&,
29 float zoom) final; 30 float zoom,
31 const Vector<RefPtr<CSSVariableData>>&) final;
30 const Vector<CSSPropertyID>& nativeInvalidationProperties() const final; 32 const Vector<CSSPropertyID>& nativeInvalidationProperties() const final;
31 const Vector<AtomicString>& customInvalidationProperties() const final; 33 const Vector<AtomicString>& customInvalidationProperties() const final;
32 bool hasAlpha() const final; 34 bool hasAlpha() const final;
33 35
34 // Should be called from the PaintWorkletGlobalScope when a javascript class 36 // Should be called from the PaintWorkletGlobalScope when a javascript class
35 // is registered with the same name. 37 // is registered with the same name.
36 void setDefinition(CSSPaintDefinition*); 38 void setDefinition(CSSPaintDefinition*);
37 39
38 DECLARE_VIRTUAL_TRACE(); 40 DECLARE_VIRTUAL_TRACE();
39 41
40 private: 42 private:
41 CSSPaintImageGeneratorImpl(Observer*); 43 CSSPaintImageGeneratorImpl(Observer*);
42 CSSPaintImageGeneratorImpl(CSSPaintDefinition*); 44 CSSPaintImageGeneratorImpl(CSSPaintDefinition*);
43 45
44 Member<CSSPaintDefinition> m_definition; 46 Member<CSSPaintDefinition> m_definition;
45 Member<Observer> m_observer; 47 Member<Observer> m_observer;
46 }; 48 };
47 49
48 } // namespace blink 50 } // namespace blink
49 51
50 #endif // CSSPaintImageGeneratorImpl_h 52 #endif // CSSPaintImageGeneratorImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698