// Copyright 2020 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_CSS_PAINT_WORKLET_INPUT_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSSOM_CSS_PAINT_WORKLET_INPUT_H_ #include <memory> #include <utility> #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/css/cssom/paint_worklet_input.h" #include "third_party/blink/renderer/core/css/cssom/paint_worklet_style_property_map.h" #include "third_party/blink/renderer/platform/graphics/compositor_element_id.h" namespace blink { // CSSPaintWorkletInput encapsulates the necessary information to run a CSS // Paint instance (a 'PaintWorklet') for a given target (e.g. the // 'background-image' property of a particular element). It is used to enable // Off-Thread PaintWorklet, allowing us to defer the actual JavaScript calls // until the cc-Raster phase (and even then run the JavaScript on a separate // worklet thread). // // TODO: WTF::Strings are now thread-safe. Consider refactoring this code. class CORE_EXPORT CSSPaintWorkletInput : public PaintWorkletInput { … }; template <> struct DowncastTraits<CSSPaintWorkletInput> { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSSOM_CSS_PAINT_WORKLET_INPUT_H_