Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
DrawableOp.cpp
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
9
16
17namespace skgpu::ganesh {
18
20 std::unique_ptr<SkDrawable::GpuDrawHandler> drawable,
21 const SkRect& bounds) {
22 return GrOp::Make<DrawableOp>(context, std::move(drawable), bounds);
23}
24
25DrawableOp::DrawableOp(std::unique_ptr<SkDrawable::GpuDrawHandler> drawable,
26 const SkRect& bounds)
27 : GrOp(ClassID())
28 , fDrawable(std::move(drawable)) {
30}
31
33 SkASSERT(state->opsRenderPass());
34 state->opsRenderPass()->executeDrawable(std::move(fDrawable));
35}
36
37} // namespace skgpu::ganesh
#define SkASSERT(cond)
Definition SkAssert.h:116
Definition GrOp.h:70
std::unique_ptr< GrOp > Owner
Definition GrOp.h:72
const SkRect & bounds() const
Definition GrOp.h:122
void setBounds(const SkRect &newBounds, HasAABloat aabloat, IsHairline zeroArea)
Definition GrOp.h:279
void onExecute(GrOpFlushState *, const SkRect &chainBounds) override
static DEFINE_OP_CLASS_ID GrOp::Owner Make(GrRecordingContext *, std::unique_ptr< SkDrawable::GpuDrawHandler > drawable, const SkRect &bounds)
AtkStateType state
Definition ref_ptr.h:256