Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
TestOps.h
Go to the documentation of this file.
1/*
2 * Copyright 2019 Google LLC
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 TestRectOp_DEFINED
9#define TestRectOp_DEFINED
10
15
16class GrPaint;
17
18namespace sk_gpu_test::test_ops {
19
20/**
21 * Fully specified device space rect op. The test Op draws a rectangle with local coords and a
22 * local matrix. It is important to test effects in the presence of GP local matrices. Our standard
23 * rect drawing code doesn't exercise this because it applies any local matrix to pre-transformed
24 * local coord vertex attributes.
25 */
27 GrPaint&&,
28 const SkRect& drawRect,
29 const SkRect& localRect,
30 const SkMatrix& localM = SkMatrix::I());
31
32/**
33 * A simpler version of MakeRect that takes a single color FP instead of a full paint. Uses
34 * SkBlendMode::kSrcOver.
35 */
37 std::unique_ptr<GrFragmentProcessor>,
38 const SkRect& drawRect,
39 const SkRect& localRect,
40 const SkMatrix& localM = SkMatrix::I());
41
42/**
43 * A simpler version of MakeRect that uses the same rect as the device space rect to draw as well as
44 * the local rect. The local matrix is identity.
45 */
46GrOp::Owner MakeRect(GrRecordingContext*, GrPaint&&, const SkRect& rect);
47
48} // namespace sk_gpu_test::test_ops
49
50#endif
std::unique_ptr< GrOp > Owner
Definition GrOp.h:72
static const SkMatrix & I()