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 GrRecordingContext; 15 class SkSurfaceProps; 16 17 struct GrFPArgs { 18 enum class Scope { 19 kDefault, 20 kRuntimeEffect, 21 }; 22 GrFPArgsGrFPArgs23 GrFPArgs(GrRecordingContext* context, 24 const GrColorInfo* dstColorInfo, 25 const SkSurfaceProps& surfaceProps, 26 Scope scope) 27 : fContext(context) 28 , fDstColorInfo(dstColorInfo) 29 , fSurfaceProps(surfaceProps) 30 , fScope(scope) { 31 SkASSERT(fContext); 32 } 33 34 GrRecordingContext* fContext; 35 36 const GrColorInfo* fDstColorInfo; 37 38 const SkSurfaceProps& fSurfaceProps; 39 40 Scope fScope; 41 }; 42 43 #endif 44