/third_party/skia/src/sksl/codegen/ |
D | SkSLVMCodeGenerator.cpp | 56 struct FastF32 { skvm::F32 val; }; 57 static FastF32 operator*(skvm::F32 y) { return {y}; } in operator *() 58 static skvm::F32 operator*(skvm::F32 x, FastF32 y) { return fast_mul(x, y.val); } in operator *() 59 static skvm::F32 operator*(float x, FastF32 y) { return fast_mul(x, y.val); } in operator *() 72 Value(skvm::F32 x) : fVals({ x.id }) {} in Value() 73 Value(skvm::I32 x) : fVals({ x.id }) {} in Value() 80 ValRef(skvm::Val& val) : fVal(val) {} in ValRef() 85 ValRef& operator=(skvm::Val v) { fVal = v; return *this; } in operator =() 86 ValRef& operator=(skvm::F32 v) { fVal = v.id; return *this; } in operator =() 87 ValRef& operator=(skvm::I32 v) { fVal = v.id; return *this; } in operator =() [all …]
|
D | SkSLVMCodeGenerator.h | 25 using SampleShaderFn = std::function<skvm::Color(int, skvm::Coord)>; 26 using SampleColorFilterFn = std::function<skvm::Color(int, skvm::Color)>; 27 using SampleBlenderFn = std::function<skvm::Color(int, skvm::Color, skvm::Color)>; 49 skvm::Color ProgramToSkVM(const Program& program, 51 skvm::Builder* builder, 53 SkSpan<skvm::Val> uniforms, 54 skvm::Coord device, 55 skvm::Coord local, 56 skvm::Color inputColor, 57 skvm::Color destColor, [all …]
|
/third_party/flutter/skia/tools/ |
D | SkVMBuilders.cpp | 16 auto byte_to_f32 = [&](skvm::I32 byte) { in SrcoverBuilder_F32() 17 skvm::F32 _1_255 = splat(1/255.0f); in SrcoverBuilder_F32() 21 auto load = [&](Fmt fmt, skvm::F32* r, skvm::F32* g, skvm::F32* b, skvm::F32* a) { in SrcoverBuilder_F32() 22 skvm::Arg ptr; in SrcoverBuilder_F32() 38 skvm::I32 rgba = load32(ptr); in SrcoverBuilder_F32() 48 skvm::F32 r,g,b,a; in SrcoverBuilder_F32() 51 skvm::F32 dr,dg,db,da; in SrcoverBuilder_F32() 52 skvm::Arg dst = load(dstFmt, &dr,&dg,&db,&da); in SrcoverBuilder_F32() 54 skvm::F32 invA = sub(splat(1.0f), a); in SrcoverBuilder_F32() 60 auto f32_to_byte = [&](skvm::F32 f32) { in SrcoverBuilder_F32() [all …]
|
D | SkVMTool.cpp | 26 static skvm::Program plus_one() { in plus_one() 27 skvm::Builder b; in plus_one() 29 skvm::Arg ptr = b.varying<int>(); in plus_one() 30 skvm::I32 v = b.load32(ptr); in plus_one() 36 static skvm::Program square() { in square() 37 skvm::Builder b; in square() 39 skvm::Arg ptr = b.varying<int>(); in square() 40 skvm::I32 v = b.load32(ptr); in square() 75 static void time(const char* name, const skvm::Program& program, Args... args) { in time()
|
/third_party/skia/src/core/ |
D | SkVMBlitter.cpp | 38 static skvm::Coord device_coord(skvm::Builder* p, skvm::Uniforms* uniforms) { in device_coord() 39 skvm::I32 dx = p->uniform32(uniforms->base, offsetof(BlitterUniforms, right)) in device_coord() 49 skvm::Color onProgram(skvm::Builder*, skvm::Color c, in onProgram() 50 const SkColorInfo&, skvm::Uniforms*, SkArenaAlloc*) const override { in onProgram() 72 skvm::Color onProgram(skvm::Builder* p, in onProgram() 73 skvm::Coord /*device*/, skvm::Coord /*local*/, skvm::Color /*paint*/, in onProgram() 76 skvm::Uniforms* uniforms, SkArenaAlloc*) const override { in onProgram() 79 skvm::PixelFormat fmt = skvm::SkColorType_to_PixelFormat(ct); in onProgram() 81 skvm::Color c = p->load(fmt, p->varying(SkColorTypeBytesPerPixel(ct))); in onProgram() 98 skvm::Color onProgram(skvm::Builder* p, in onProgram() [all …]
|
D | SkColorSpacePriv.h | 104 skvm::F32 sk_program_transfer_fn( 105 skvm::F32 v, TFKind, 106 skvm::F32 G, skvm::F32 A, skvm::F32 B, skvm::F32 C, skvm::F32 D, skvm::F32 E, skvm::F32 F); 108 skvm::Color sk_program_transfer_fn(skvm::Builder*, skvm::Uniforms*, 109 const skcms_TransferFunction&, skvm::Color);
|
D | SkColorSpaceXformSteps.cpp | 140 skvm::F32 sk_program_transfer_fn( in sk_program_transfer_fn() 141 skvm::F32 v, TFKind tf_kind, in sk_program_transfer_fn() 142 skvm::F32 G, skvm::F32 A, skvm::F32 B, skvm::F32 C, skvm::F32 D, skvm::F32 E, skvm::F32 F) in sk_program_transfer_fn() 145 skvm::I32 bits = pun_to_I32(v), in sk_program_transfer_fn() 158 skvm::F32 vC = approx_powf(v, C); in sk_program_transfer_fn() 163 skvm::F32 vA = v*A, in sk_program_transfer_fn() 170 skvm::F32 K = F + 1.0f; in sk_program_transfer_fn() 181 skvm::Color sk_program_transfer_fn(skvm::Builder* p, skvm::Uniforms* uniforms, in sk_program_transfer_fn() 182 const skcms_TransferFunction& tf, skvm::Color c) { in sk_program_transfer_fn() 183 skvm::F32 G = p->uniformF(uniforms->pushF(tf.g)), in sk_program_transfer_fn() [all …]
|
D | SkBlenderBase.h | 36 skvm::Color program(skvm::Builder* p, skvm::Color src, skvm::Color dst, in program() 37 const SkColorInfo& colorInfo, skvm::Uniforms* uniforms, in program() 59 virtual skvm::Color onProgram(skvm::Builder* p, skvm::Color src, skvm::Color dst, 60 const SkColorInfo& colorInfo, skvm::Uniforms* uniforms,
|
D | SkVMBlitter.h | 78 static skvm::Color DstColor(skvm::Builder* p, const Params& params); 79 static void BuildProgram(skvm::Builder* p, const Params& params, 80 skvm::Uniforms* uniforms, SkArenaAlloc* alloc); 82 skvm::Uniforms* uniforms, SkArenaAlloc* alloc, bool* ok); 83 static SkLRUCache<Key, skvm::Program>* TryAcquireProgramCache(); 87 skvm::Program buildProgram(Coverage coverage); 98 skvm::Uniforms fUniforms; // Most data is copied directly into fUniforms, 102 skvm::Program fBlitH,
|
D | SkColorFilterBase.h | 30 skvm::Color program(skvm::Builder*, skvm::Color, 31 const SkColorInfo& dst, skvm::Uniforms*, SkArenaAlloc*) const; 84 virtual skvm::Color onProgram(skvm::Builder*, skvm::Color, 85 const SkColorInfo& dst, skvm::Uniforms*, SkArenaAlloc*) const = 0;
|
/third_party/skia/tests/ |
D | SkVMTest.cpp | 16 static void test_jit_and_interpreter(const skvm::Builder& b, Fn&& test) { in test_jit_and_interpreter() 17 skvm::Program p = b.done(); in test_jit_and_interpreter() 25 skvm::Builder b; in DEF_TEST() 27 skvm::Ptr arg = b.varying<int>(); in DEF_TEST() 28 skvm::I32 l = b.load32(arg); in DEF_TEST() 29 skvm::I32 a = b.add(l, l); in DEF_TEST() 33 std::vector<skvm::Instruction> program = b.program(); in DEF_TEST() 36 program = skvm::eliminate_dead_code(program); in DEF_TEST() 43 skvm::Builder b; in DEF_TEST() 49 test_jit_and_interpreter(b, [&](const skvm::Program& program) { in DEF_TEST() [all …]
|
D | SkSLInterpreterTest.cpp | 89 skvm::Builder b; in test() 92 skvm::Program p = b.done(); in test() 120 skvm::Builder b; in test() 122 skvm::Program p = b.done(); in test() 529 skvm::Builder b; in DEF_TEST() 530 skvm::UPtr uniformPtr = b.uniform(); in DEF_TEST() 531 skvm::Val uniforms[16]; in DEF_TEST() 552 skvm::Program p = build(rect_height); in DEF_TEST() 563 skvm::Program p = build(make_blue_rect); in DEF_TEST() 577 skvm::Program p = build(median); in DEF_TEST() [all …]
|
/third_party/flutter/skia/src/core/ |
D | SkVMBlitter.cpp | 46 static SkLRUCache<Key, skvm::Program>* try_acquire_program_cache() { in try_acquire_program_cache() 53 thread_local static auto* cache = new SkLRUCache<Key, skvm::Program>{8}; in try_acquire_program_cache() 66 struct Builder : public skvm::Builder { 69 struct Color { skvm::I32 r,g,b,a; }; 72 skvm::I32 inv(skvm::I32 x) { in inv() 77 skvm::I32 div255(skvm::I32 v) { in div255() 80 skvm::I32 v128 = add(v, splat(128)); in div255() 84 skvm::I32 mix(skvm::I32 x, skvm::I32 y, skvm::I32 t) { in mix() 89 Color unpack_8888(skvm::I32 rgba) { in unpack_8888() 98 skvm::I32 pack_8888(Color c) { in pack_8888() [all …]
|
/third_party/skia/src/shaders/ |
D | SkTransformShader.h | 23 skvm::Color onProgram(skvm::Builder* b, 24 skvm::Coord device, skvm::Coord local, skvm::Color color, 27 skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override; 30 skvm::Coord applyMatrix( 31 skvm::Builder* b, const SkMatrix& matrix, skvm::Coord local, 32 skvm::Uniforms* uniforms) const; 42 mutable skvm::Uniform fMatrix;
|
D | SkColorShader.h | 47 skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, 49 skvm::Uniforms* uniforms, SkArenaAlloc*) const override; 71 skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, 73 skvm::Uniforms* uniforms, SkArenaAlloc*) const override;
|
D | SkImageShader.h | 53 skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, 55 skvm::Uniforms* uniforms, SkArenaAlloc*) const override; 58 skvm::Color makeProgram( 59 skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, 61 skvm::Uniforms* uniforms, const TransformShader* coordShader, SkArenaAlloc*) const;
|
D | SkTransformShader.cpp | 14 skvm::Color SkTransformShader::onProgram(skvm::Builder* b, in onProgram() 15 skvm::Coord device, skvm::Coord local, skvm::Color color, in onProgram() 18 skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const { in onProgram() 19 skvm::Coord newLocal = this->applyMatrix(b, matrices.localToDevice(), local, uniforms); in onProgram() 25 skvm::Coord SkTransformShader::applyMatrix( in applyMatrix() 26 skvm::Builder* b, const SkMatrix& matrix, skvm::Coord local, in applyMatrix() 27 skvm::Uniforms* uniforms) const { in applyMatrix() 30 skvm::F32 x = local.x, in applyMatrix()
|
D | SkShaderBase.h | 208 skvm::Color program(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, 210 skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const; 237 static skvm::Coord ApplyMatrix(skvm::Builder*, const SkMatrix&, skvm::Coord, skvm::Uniforms*); 243 virtual skvm::Color onProgram(skvm::Builder*, 244 skvm::Coord device, skvm::Coord local, skvm::Color paint, 246 const SkColorInfo& dst, skvm::Uniforms*, SkArenaAlloc*) const = 0;
|
D | SkImageShader.cpp | 337 skvm::Color onProgram(skvm::Builder* b, in onProgram() 338 skvm::Coord device, skvm::Coord local, skvm::Color color, in onProgram() 341 skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override { in onProgram() 665 skvm::Color SkImageShader::onProgram(skvm::Builder* b, in onProgram() 666 skvm::Coord device, skvm::Coord origLocal, skvm::Color paint, in onProgram() 669 skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const { in onProgram() 674 skvm::Color SkImageShader::makeProgram( in makeProgram() 675 skvm::Builder* p, skvm::Coord device, skvm::Coord origLocal, skvm::Color paint, in makeProgram() 677 skvm::Uniforms* uniforms, const TransformShader* coordShader, SkArenaAlloc* alloc) const { in makeProgram() 709 skvm::Coord upperLocal; in makeProgram() [all …]
|
D | SkShader.cpp | 211 skvm::Color SkShaderBase::program(skvm::Builder* p, in program() 212 skvm::Coord device, skvm::Coord local, skvm::Color paint, in program() 215 skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const { in program() 250 skvm::Coord SkShaderBase::ApplyMatrix(skvm::Builder* p, const SkMatrix& m, in ApplyMatrix() 251 skvm::Coord coord, skvm::Uniforms* uniforms) { in ApplyMatrix() 252 skvm::F32 x = coord.x, in ApplyMatrix() 280 skvm::Color SkEmptyShader::onProgram(skvm::Builder*, skvm::Coord, skvm::Coord, skvm::Color, in onProgram() 282 skvm::Uniforms*, SkArenaAlloc*) const { in onProgram()
|
D | SkColorShader.cpp | 94 skvm::Color SkColorShader::onProgram(skvm::Builder* p, in onProgram() 95 skvm::Coord /*device*/, skvm::Coord /*local*/, in onProgram() 96 skvm::Color /*paint*/, const SkMatrixProvider&, in onProgram() 98 skvm::Uniforms* uniforms, SkArenaAlloc*) const { in onProgram() 104 skvm::Color SkColor4Shader::onProgram(skvm::Builder* p, in onProgram() 105 skvm::Coord /*device*/, skvm::Coord /*local*/, in onProgram() 106 skvm::Color /*paint*/, const SkMatrixProvider&, in onProgram() 108 skvm::Uniforms* uniforms, SkArenaAlloc*) const { in onProgram()
|
D | SkEmptyShader.h | 40 skvm::Color onProgram(skvm::Builder*, skvm::Coord, skvm::Coord, skvm::Color, 42 skvm::Uniforms*, SkArenaAlloc*) const override;
|
D | SkLocalMatrixShader.cpp | 80 skvm::Color SkLocalMatrixShader::onProgram(skvm::Builder* p, in onProgram() 81 skvm::Coord device, skvm::Coord local, skvm::Color paint, in onProgram() 84 skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const { in onProgram() 158 skvm::Color onProgram(skvm::Builder* p, in onProgram() 159 skvm::Coord device, skvm::Coord local, skvm::Color paint, in onProgram() 162 skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override { in onProgram()
|
/third_party/skia/modules/particles/src/ |
D | SkParticleBinding.cpp | 52 skvm::Uniforms* uniforms, in SkPathExternalFunction() 63 void call(skvm::Builder* builder, in call() 64 skvm::F32* arguments, in call() 65 skvm::F32* outResult, in call() 66 skvm::I32 mask) const override { in call() 71 skvm::Uniform ptr = fUniforms->pushPtr(fPath.data()); in call() 72 skvm::I32 index = trunc(clamp(arguments[0] * fPath.size(), 0, fPath.size() - 1)); in call() 100 skvm::Uniforms* uniforms, in toFunction() 139 skvm::Uniforms* uniforms, in toFunction() 170 skvm::Uniforms* uniforms, in SkShaderExternalFunction() [all …]
|
/third_party/skia/src/shaders/gradients/ |
D | SkGradientShaderPriv.h | 82 skvm::Color onProgram(skvm::Builder*, skvm::Coord device, skvm::Coord local, skvm::Color paint, 84 skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override; 90 virtual skvm::F32 transformT(skvm::Builder*, skvm::Uniforms*, 91 skvm::Coord coord, skvm::I32* mask) const = 0;
|