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 SkJumper_DEFINED 9 #define SkJumper_DEFINED 10 11 // This file contains definitions shared by SkJumper.cpp (compiled normally as part of Skia) 12 // and SkJumper_stages.cpp (compiled into Skia _and_ offline into SkJumper_generated.h). 13 // Keep it simple! 14 15 #include <stdint.h> 16 17 // SkJumper_stages.cpp has some unusual constraints on what constants it can use. 18 // 19 // If the constant is baked into the instruction, that's ok. 20 // If the constant is synthesized through code, that's ok. 21 // If the constant is loaded from memory, that's no good. 22 // 23 // We offer a couple facilities to get at any other constants you need: 24 // - the C() function usually constrains constants to be directly baked into an instruction; or 25 // - the _i and _f user-defined literal operators call C() for you in a prettier way; or 26 // - you can load values from this struct. 27 28 struct SkJumper_constants { 29 float iota[8]; // 0,1,2,3,4,5,6,7 30 }; 31 32 #endif//SkJumper_DEFINED 33