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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSPaintImageGenerator.h

Issue 2661323002: Implement CSSPaintValue and add a layout test. (Closed)
Patch Set: rebase Created 3 years, 9 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 CSSPaintImageGenerator_h 5 #ifndef CSSPaintImageGenerator_h
6 #define CSSPaintImageGenerator_h 6 #define CSSPaintImageGenerator_h
7 7
8 #include "core/CSSPropertyNames.h" 8 #include "core/CSSPropertyNames.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "core/css/cssom/CSSStyleValue.h"
10 #include "platform/geometry/IntSize.h" 11 #include "platform/geometry/IntSize.h"
11 #include "platform/heap/Handle.h" 12 #include "platform/heap/Handle.h"
12 13
13 namespace blink { 14 namespace blink {
14 15
16 class CSSSyntaxDescriptor;
15 class Document; 17 class Document;
16 class Image; 18 class Image;
17 class LayoutObject; 19 class LayoutObject;
18 20
19 // Produces a PaintGeneratedImage from a CSS Paint API callback. 21 // Produces a PaintGeneratedImage from a CSS Paint API callback.
20 // https://drafts.css-houdini.org/css-paint-api/ 22 // https://drafts.css-houdini.org/css-paint-api/
21 class CORE_EXPORT CSSPaintImageGenerator 23 class CORE_EXPORT CSSPaintImageGenerator
22 : public GarbageCollectedFinalized<CSSPaintImageGenerator> { 24 : public GarbageCollectedFinalized<CSSPaintImageGenerator> {
23 public: 25 public:
24 // This observer is used if the paint worklet doesn't have a javascript 26 // This observer is used if the paint worklet doesn't have a javascript
(...skipping 15 matching lines...) Expand all
40 typedef CSSPaintImageGenerator* (*CSSPaintImageGeneratorCreateFunction)( 42 typedef CSSPaintImageGenerator* (*CSSPaintImageGeneratorCreateFunction)(
41 const String&, 43 const String&,
42 Document&, 44 Document&,
43 Observer*); 45 Observer*);
44 static void init(CSSPaintImageGeneratorCreateFunction); 46 static void init(CSSPaintImageGeneratorCreateFunction);
45 47
46 // Invokes the CSS Paint API 'paint' callback. May return a nullptr 48 // Invokes the CSS Paint API 'paint' callback. May return a nullptr
47 // representing an invalid image if an error occurred. 49 // representing an invalid image if an error occurred.
48 virtual PassRefPtr<Image> paint(const LayoutObject&, 50 virtual PassRefPtr<Image> paint(const LayoutObject&,
49 const IntSize&, 51 const IntSize&,
50 float zoom) = 0; 52 float zoom,
53 const CSSStyleValueVector*) = 0;
51 54
52 virtual const Vector<CSSPropertyID>& nativeInvalidationProperties() const = 0; 55 virtual const Vector<CSSPropertyID>& nativeInvalidationProperties() const = 0;
53 virtual const Vector<AtomicString>& customInvalidationProperties() const = 0; 56 virtual const Vector<AtomicString>& customInvalidationProperties() const = 0;
54 virtual bool hasAlpha() const = 0; 57 virtual bool hasAlpha() const = 0;
58 virtual const Vector<CSSSyntaxDescriptor>& inputArgumentTypes() const = 0;
59 virtual bool isImageGeneratorReady() const = 0;
55 60
56 DEFINE_INLINE_VIRTUAL_TRACE() {} 61 DEFINE_INLINE_VIRTUAL_TRACE() {}
57 }; 62 };
58 63
59 } // namespace blink 64 } // namespace blink
60 65
61 #endif // CSSPaintImageGenerator_h 66 #endif // CSSPaintImageGenerator_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698