• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 GrFPArgs_DEFINED
9 #define GrFPArgs_DEFINED
10 
11 #include "include/core/SkMatrix.h"
12 #include "src/shaders/SkShaderBase.h"
13 
14 class GrColorInfo;
15 class GrRecordingContext;
16 class SkSurfaceProps;
17 
18 struct GrFPArgs {
19     enum class Scope {
20         kDefault,
21         kRuntimeEffect,
22     };
23 
GrFPArgsGrFPArgs24     GrFPArgs(GrRecordingContext* context,
25              const GrColorInfo* dstColorInfo,
26              const SkSurfaceProps& surfaceProps,
27              Scope scope)
28             : fContext(context)
29             , fDstColorInfo(dstColorInfo)
30             , fSurfaceProps(surfaceProps)
31             , fScope(scope) {
32         SkASSERT(fContext);
33     }
34 
35     GrRecordingContext* fContext;
36 
37     const GrColorInfo* fDstColorInfo;
38 
39     const SkSurfaceProps& fSurfaceProps;
40 
41     Scope fScope;
42 };
43 
44 #endif
45