1 /* 2 * Copyright 2017 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 SKSL_CPP 9 #define SKSL_CPP 10 11 // functions used by CPP programs created by skslc 12 13 #include "SkPoint.h" 14 15 // macros to make sk_Caps.<cap name> work from C++ code 16 #define sk_Caps (*args.fShaderCaps) 17 18 #define floatPrecisionVaries floatPrecisionVaries() 19 20 // functions to make GLSL constructors work from C++ code vec2(float xy)21inline SkPoint vec2(float xy) { return SkPoint::Make(xy, xy); } 22 vec2(float x,float y)23inline SkPoint vec2(float x, float y) { return SkPoint::Make(x, y); } 24 25 #endif 26