// Copyright 2019 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_PLATFORM_GRAPHICS_PAINT_WORKLET_PAINT_DISPATCHER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_PAINT_WORKLET_PAINT_DISPATCHER_H_ #include <memory> #include "base/memory/scoped_refptr.h" #include "base/memory/weak_ptr.h" #include "base/sequence_checker.h" #include "base/task/single_thread_task_runner.h" #include "third_party/blink/renderer/platform/graphics/paint_worklet_painter.h" #include "third_party/blink/renderer/platform/graphics/platform_paint_worklet_layer_painter.h" #include "third_party/blink/renderer/platform/heap/cross_thread_persistent.h" #include "third_party/blink/renderer/platform/wtf/hash_map.h" namespace blink { // PaintWorkletPaintDispatcher is responsible for mediating between the raster // threads and the PaintWorklet thread(s). It receives requests from raster // threads to paint a paint class instance represented by a PaintWorkletInput, // dispatches the input to the appropriate PaintWorklet, synchronously receives // the result, and passes it back to the raster thread. // // Each PaintWorklet (there is one per frame, either same-origin or // same-process-cross-origin) has a backing thread, which may be shared between // worklets, and a scheduler, which is not shared. All PaintWorklets for a // single renderer process share one PaintWorkletPaintDispatcher on the // compositor side. class PLATFORM_EXPORT PaintWorkletPaintDispatcher { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_PAINT_WORKLET_PAINT_DISPATCHER_H_