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

Unified Diff: third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h

Issue 1866623002: Hook up CSSPaintValue::image to CSS Paint API callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h
diff --git a/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h b/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h
index cb0d416d59a40a502c618fec38d61420c1f7301c..ba9d2db1c89cba449038d1cb294a679104568aab 100644
--- a/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h
+++ b/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h
@@ -9,10 +9,12 @@
#include "core/dom/ExecutionContext.h"
#include "modules/ModulesExport.h"
#include "modules/worklet/WorkletGlobalScope.h"
+#include "platform/graphics/ImageBuffer.h"
namespace blink {
class CSSPaintDefinition;
+class CSSPaintImageGeneratorImpl;
class ExceptionState;
class MODULES_EXPORT PaintWorkletGlobalScope : public WorkletGlobalScope {
@@ -26,6 +28,7 @@ public:
void registerPaint(const String& name, const ScriptValue& ctor, ExceptionState&);
CSSPaintDefinition* findDefinition(const String& name);
+ void addPendingGenerator(const String& name, CSSPaintImageGeneratorImpl*);
DECLARE_VIRTUAL_TRACE();
@@ -34,6 +37,10 @@ private:
typedef HeapHashMap<String, Member<CSSPaintDefinition>> DefinitionMap;
DefinitionMap m_paintDefinitions;
+
+ typedef HeapHashSet<WeakMember<CSSPaintImageGeneratorImpl>> GeneratorHashSet;
haraken 2016/04/08 04:31:19 Just to confirm: PaintWorkletGlobalScope is expect
ikilpatrick 2016/04/08 18:43:21 Yup that's correct. Added note.
+ typedef HeapHashMap<String, Member<GeneratorHashSet>> PendingGeneratorMap;
+ PendingGeneratorMap m_pendingGenerators;
};
DEFINE_TYPE_CASTS(PaintWorkletGlobalScope, ExecutionContext, context, context->isPaintWorkletGlobalScope(), context.isPaintWorkletGlobalScope());

Powered by Google App Engine
This is Rietveld 408576698