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

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

Issue 2077413005: Add "alpha" option to PaintWorklet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set alpha to be true by default Created 4 years, 5 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 LayoutObject&, const IntSize&) final; 25 PassRefPtr<Image> paint(const LayoutObject&, const IntSize&) final;
26 const Vector<CSSPropertyID>& nativeInvalidationProperties() const final; 26 const Vector<CSSPropertyID>& nativeInvalidationProperties() const final;
27 const Vector<AtomicString>& customInvalidationProperties() const final; 27 const Vector<AtomicString>& customInvalidationProperties() const final;
28 bool hasAlpha() const final;
28 29
29 // Should be called from the PaintWorkletGlobalScope when a javascript class 30 // Should be called from the PaintWorkletGlobalScope when a javascript class
30 // is registered with the same name. 31 // is registered with the same name.
31 void setDefinition(CSSPaintDefinition*); 32 void setDefinition(CSSPaintDefinition*);
32 33
33 DECLARE_VIRTUAL_TRACE(); 34 DECLARE_VIRTUAL_TRACE();
34 35
35 private: 36 private:
36 CSSPaintImageGeneratorImpl(Observer*); 37 CSSPaintImageGeneratorImpl(Observer*);
37 CSSPaintImageGeneratorImpl(CSSPaintDefinition*); 38 CSSPaintImageGeneratorImpl(CSSPaintDefinition*);
38 39
39 Member<CSSPaintDefinition> m_definition; 40 Member<CSSPaintDefinition> m_definition;
40 Member<Observer> m_observer; 41 Member<Observer> m_observer;
41 }; 42 };
42 43
43 } // namespace blink 44 } // namespace blink
44 45
45 #endif // CSSPaintImageGeneratorImpl_h 46 #endif // CSSPaintImageGeneratorImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698