chromium/cc/paint/paint_worklet_job.h

// 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 CC_PAINT_PAINT_WORKLET_JOB_H_
#define CC_PAINT_PAINT_WORKLET_JOB_H_

#include <vector>

#include "base/containers/flat_map.h"
#include "base/memory/scoped_refptr.h"
#include "cc/paint/paint_export.h"
#include "cc/paint/paint_record.h"
#include "cc/paint/paint_worklet_input.h"

namespace cc {

// A PaintWorkletJob instance encapsulates the data that needs to be passed
// around in order to dispatch PaintWorklets to the worklet thread, paint them,
// and return the results to cc-impl.
class CC_PAINT_EXPORT PaintWorkletJob {};

// The PaintWorklet dispatcher logic passes the PaintWorkletJobVector to the
// worklet thread during painting. To keep the structure alive on both the
// compositor and worklet side (as technically the compositor could be town down
// whilst the worklet is still painting), we use base::RefCountedJob for it.
PaintWorkletJobVector;
PaintWorkletId;
PaintWorkletJobMap;

}  // namespace cc

#endif  // CC_PAINT_PAINT_WORKLET_JOB_H_