chromium/third_party/blink/renderer/core/css/cssom/paint_worklet_style_property_map.h

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSSOM_PAINT_WORKLET_STYLE_PROPERTY_MAP_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSSOM_PAINT_WORKLET_STYLE_PROPERTY_MAP_H_

#include <memory>

#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/css/cssom/cross_thread_style_value.h"
#include "third_party/blink/renderer/core/css/cssom/style_property_map_read_only.h"
#include "third_party/blink/renderer/platform/graphics/compositor_element_id.h"
#include "third_party/blink/renderer/platform/graphics/platform_paint_worklet_layer_painter.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"

namespace blink {

class ComputedStyle;

// This class is designed for CSS Paint such that it can be safely passed cross
// threads.
//
// Here is a typical usage.
// At CSSPaintValue::GetImage which is on the main thread, call the
// BuildCrossThreadData and give the data to the Blink::PaintWorkletInput.
// The PaintWorkletInput is passed to the worklet thread, and we build an
// instance of PaintWorkletStylePropertyMap from the data, and the instance is
// eventually pass to the JS paint callback.
class CORE_EXPORT PaintWorkletStylePropertyMap
    : public StylePropertyMapReadOnly {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSSOM_PAINT_WORKLET_STYLE_PROPERTY_MAP_H_