Flutter Engine
The Flutter Engine
Functions
sk_gpu_test::test_ops Namespace Reference

Functions

GrOp::Owner MakeRect (GrRecordingContext *context, GrPaint &&paint, const SkRect &drawRect, const SkRect &localRect, const SkMatrix &localM)
 
GrOp::Owner MakeRect (GrRecordingContext *context, std::unique_ptr< GrFragmentProcessor > fp, const SkRect &drawRect, const SkRect &localRect, const SkMatrix &localM)
 
GrOp::Owner MakeRect (GrRecordingContext *context, GrPaint &&paint, const SkRect &rect)
 

Function Documentation

◆ MakeRect() [1/3]

GrOp::Owner sk_gpu_test::test_ops::MakeRect ( GrRecordingContext ,
GrPaint &&  ,
const SkRect drawRect,
const SkRect localRect,
const SkMatrix localM = SkMatrix::I() 
)

Fully specified device space rect op. The test Op draws a rectangle with local coords and a local matrix. It is important to test effects in the presence of GP local matrices. Our standard rect drawing code doesn't exercise this because it applies any local matrix to pre-transformed local coord vertex attributes.

Definition at line 227 of file TestOps.cpp.

231 {
232 return TestRectOp::Make(context, std::move(paint), drawRect, localRect, localM);
233}
const Paint & paint
Definition: color_source.cc:38
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)

◆ MakeRect() [2/3]

GrOp::Owner sk_gpu_test::test_ops::MakeRect ( GrRecordingContext ,
GrPaint &&  ,
const SkRect rect 
)

A simpler version of MakeRect that uses the same rect as the device space rect to draw as well as the local rect. The local matrix is identity.

Definition at line 245 of file TestOps.cpp.

247 {
248 return TestRectOp::Make(context, std::move(paint), rect, rect, SkMatrix::I());
249}
static const SkMatrix & I()
Definition: SkMatrix.cpp:1544
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350

◆ MakeRect() [3/3]

GrOp::Owner sk_gpu_test::test_ops::MakeRect ( GrRecordingContext ,
std::unique_ptr< GrFragmentProcessor ,
const SkRect drawRect,
const SkRect localRect,
const SkMatrix localM = SkMatrix::I() 
)

A simpler version of MakeRect that takes a single color FP instead of a full paint. Uses SkBlendMode::kSrcOver.

Definition at line 235 of file TestOps.cpp.

239 {
241 paint.setColorFragmentProcessor(std::move(fp));
242 return TestRectOp::Make(context, std::move(paint), drawRect, localRect, localM);
243}
const uint32_t fp