Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
ganesh
GrDrawOpTest.h
Go to the documentation of this file.
1
/*
2
* Copyright 2015 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 GrDrawOpTest_DEFINED
9
#define GrDrawOpTest_DEFINED
10
11
#include "
include/core/SkRefCnt.h
"
12
#include "
src/gpu/ganesh/GrTestUtils.h
"
13
14
#if defined(GR_TEST_UTILS)
15
16
class
GrContext_Base
;
17
class
GrDrawOp
;
18
class
GrPaint
;
19
class
GrRecordingContext
;
20
namespace
skgpu
{
21
namespace
ganesh {
22
class
SurfaceDrawContext
;
23
}
24
}
// namespace skgpu
25
struct
GrUserStencilSettings
;
26
class
SkRandom
;
27
28
/** This function draws a randomly configured GrDrawOp for testing purposes. */
29
void
GrDrawRandomOp
(
SkRandom
*,
skgpu::ganesh::SurfaceDrawContext
*,
GrPaint
&&);
30
31
/** GrDrawOp subclasses should define test factory functions using this macro. */
32
#define GR_DRAW_OP_TEST_DEFINE(Op) \
33
GrOp::Owner Op##__Test(GrPaint&& paint, \
34
SkRandom* random, \
35
GrRecordingContext* context, \
36
skgpu::ganesh::SurfaceDrawContext* sdc, \
37
int numSamples)
38
#define GR_DRAW_OP_TEST_FRIEND(Op) \
39
friend GrOp::OpOwner Op##__Test( \
40
GrPaint&&, SkRandom*, GrRecordingContext*, skgpu::ganesh::SurfaceDrawContext*, int)
41
42
/** Helper for op test factories to pick a random stencil state. */
43
const
GrUserStencilSettings
* GrGetRandomStencil(
SkRandom
* random,
GrContext_Base
*);
44
45
#endif
46
#endif
GrTestUtils.h
GrDrawRandomOp
void GrDrawRandomOp(SkRandom *random, skgpu::ganesh::SurfaceDrawContext *sdc, GrPaint &&paint)
Definition:
GrTest.cpp:74
SkRefCnt.h
GrContext_Base
Definition:
GrContext_Base.h:28
GrDrawOp
Definition:
GrDrawOp.h:29
GrPaint
Definition:
GrPaint.h:40
GrRecordingContext
Definition:
GrRecordingContext.h:42
SkRandom
Definition:
SkRandom.h:27
skgpu::ganesh::SurfaceDrawContext
Definition:
SurfaceDrawContext.h:65
skgpu
Definition:
GpuTools.h:21
GrUserStencilSettings
Definition:
GrUserStencilSettings.h:112
Generated on Sun Jun 23 2024 21:56:20 for Flutter Engine by
1.9.4