Flutter Engine
The Flutter Engine
DrawableOp.h
Go to the documentation of this file.
1/*
2 * Copyright 2018 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef DrawableOp_DEFINED
9#define DrawableOp_DEFINED
10
13
15
16namespace skgpu::ganesh {
17
18class DrawableOp final : public GrOp {
19public:
21
23 std::unique_ptr<SkDrawable::GpuDrawHandler> drawable,
24 const SkRect& bounds);
25
26 const char* name() const override { return "Drawable"; }
27
28private:
29 friend class GrOp; // for ctor
30
31 DrawableOp(std::unique_ptr<SkDrawable::GpuDrawHandler>, const SkRect& bounds);
32
33 CombineResult onCombineIfPossible(GrOp* that, SkArenaAlloc*, const GrCaps& caps) override {
35 }
36
38 const GrSurfaceProxyView& writeView,
40 const GrDstProxyView&,
41 GrXferBarrierFlags renderPassXferBarriers,
42 GrLoadOp colorLoadOp) override {}
43
44 void onPrepare(GrOpFlushState*) override {}
45
46 void onExecute(GrOpFlushState*, const SkRect& chainBounds) override;
47
48 std::unique_ptr<SkDrawable::GpuDrawHandler> fDrawable;
49};
50
51} // namespace skgpu::ganesh
52
53#endif // DrawableOp_DEFINED
#define DEFINE_OP_CLASS_ID
Definition: GrOp.h:64
GrLoadOp
Definition: GrTypesPriv.h:155
GrXferBarrierFlags
Definition: GrCaps.h:57
Definition: GrOp.h:70
CombineResult
Definition: GrOp.h:99
virtual void onExecute(GrOpFlushState *, const SkRect &chainBounds)=0
std::unique_ptr< GrOp > Owner
Definition: GrOp.h:72
virtual void onPrepare(GrOpFlushState *)=0
virtual void onPrePrepare(GrRecordingContext *, const GrSurfaceProxyView &writeView, GrAppliedClip *, const GrDstProxyView &, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp)=0
const SkRect & bounds() const
Definition: GrOp.h:122
virtual CombineResult onCombineIfPossible(GrOp *, SkArenaAlloc *, const GrCaps &)
Definition: GrOp.h:305
static DEFINE_OP_CLASS_ID GrOp::Owner Make(GrRecordingContext *, std::unique_ptr< SkDrawable::GpuDrawHandler > drawable, const SkRect &bounds)
Definition: DrawableOp.cpp:19
const char * name() const override
Definition: DrawableOp.h:26