| 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/private/base/SkAssert.h" |
| 12 |
|
| 13 |
class GrColorInfo; |
| 14 |
class SkSurfaceProps; |
| 15 |
namespace skgpu::ganesh { class SurfaceDrawContext; } |
| 16 |
|
| 17 |
struct GrFPArgs { |
| 18 |
enum class Scope { |
| 19 |
kDefault, |
| 20 |
kRuntimeEffect, |
| 21 |
}; |
| 22 |
|
| 23 |
GrFPArgs(skgpu::ganesh::SurfaceDrawContext* sdc, |
| 24 |
const GrColorInfo* dstColorInfo, |
| 25 |
const SkSurfaceProps& surfaceProps, |
| 26 |
Scope scope) |
| 27 |
: fSurfaceDrawContext(sdc) |
| 28 |
, fDstColorInfo(dstColorInfo) |
| 29 |
, fSurfaceProps(surfaceProps) |
| 30 |
, fScope(scope) { |
| 31 |
SkASSERT(fSurfaceDrawContext); |
| 32 |
} |
| 33 |
|
| 34 |
skgpu::ganesh::SurfaceDrawContext* fSurfaceDrawContext; |
| 35 |
|
| 36 |
const GrColorInfo* fDstColorInfo; |
| 37 |
|
| 38 |
const SkSurfaceProps& fSurfaceProps; |
| 39 |
|
| 40 |
Scope fScope; |
| 41 |
}; |
| 42 |
|
| 43 |
#endif |