Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
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
GrXferBarrierFlags
Definition GrOp.h:70
CombineResult
Definition GrOp.h:99
std::unique_ptr< GrOp > Owner
Definition GrOp.h:72
const SkRect & bounds() const
Definition GrOp.h:122
void onExecute(GrOpFlushState *, const SkRect &chainBounds) override
void onPrePrepare(GrRecordingContext *, const GrSurfaceProxyView &writeView, GrAppliedClip *, const GrDstProxyView &, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp) override
Definition DrawableOp.h:37
void onPrepare(GrOpFlushState *) override
Definition DrawableOp.h:44
static DEFINE_OP_CLASS_ID GrOp::Owner Make(GrRecordingContext *, std::unique_ptr< SkDrawable::GpuDrawHandler > drawable, const SkRect &bounds)
const char * name() const override
Definition DrawableOp.h:26
CombineResult onCombineIfPossible(GrOp *that, SkArenaAlloc *, const GrCaps &caps) override
Definition DrawableOp.h:33