blob: 72a94ba932782ead7f4bd956af9a92bf373a9152 [file] [log] [blame]
* Copyright 2018 Google Inc.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
#ifndef DrawableOp_DEFINED
#define DrawableOp_DEFINED
#include "include/core/SkDrawable.h"
#include "src/gpu/ganesh/ops/GrOp.h"
class GrRecordingContext;
namespace skgpu::v1 {
class DrawableOp final : public GrOp {
static GrOp::Owner Make(GrRecordingContext*,
std::unique_ptr<SkDrawable::GpuDrawHandler> drawable,
const SkRect& bounds);
const char* name() const override { return "Drawable"; }
friend class GrOp; // for ctor
DrawableOp(std::unique_ptr<SkDrawable::GpuDrawHandler>, const SkRect& bounds);
CombineResult onCombineIfPossible(GrOp* that, SkArenaAlloc*, const GrCaps& caps) override {
return CombineResult::kCannotCombine;
void onPrePrepare(GrRecordingContext*,
const GrSurfaceProxyView& writeView,
const GrDstProxyView&,
GrXferBarrierFlags renderPassXferBarriers,
GrLoadOp colorLoadOp) override {}
void onPrepare(GrOpFlushState*) override {}
void onExecute(GrOpFlushState*, const SkRect& chainBounds) override;
std::unique_ptr<SkDrawable::GpuDrawHandler> fDrawable;
} // namespace skgpu::v1
#endif // DrawableOp_DEFINED