• Home
  • Raw
  • Download

Lines Matching refs:skvm

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()
99 skvm::Coord device, skvm::Coord local, skvm::Color paint, in onProgram()
102 skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const override { in onProgram()
104 skvm::Color c = as_SB(fShader)->program(p, device,local, paint, in onProgram()
141 skvm::I32 X = trunc(device.x - 0.5f), in onProgram()
146 skvm::I32 M = shl(Y & 1, 5) in onProgram()
161 skvm::F32 dither = to_F32(M) * scale + bias; in onProgram()
186 skvm::Color onProgram(skvm::Builder*, in onProgram()
187 skvm::Coord, skvm::Coord, skvm::Color paint, in onProgram()
189 skvm::Uniforms*, SkArenaAlloc*) const override { in onProgram()
291 skvm::Color SkVMBlitter::DstColor(skvm::Builder* p, const Params& params) { in DstColor()
292 skvm::PixelFormat dstFormat = skvm::SkColorType_to_PixelFormat(params.dst.colorType()); in DstColor()
293 skvm::Ptr dst_ptr = p->varying(SkColorTypeBytesPerPixel(params.dst.colorType())); in DstColor()
297 void SkVMBlitter::BuildProgram(skvm::Builder* p, const Params& params, in BuildProgram()
298 skvm::Uniforms* uniforms, SkArenaAlloc* alloc) { in BuildProgram()
301 skvm::Ptr dst_ptr = p->varying(SkColorTypeBytesPerPixel(params.dst.colorType())); in BuildProgram()
310 skvm::Coord device = device_coord(p, uniforms); in BuildProgram()
311 skvm::Color paint = p->uniformColor(params.paint, uniforms); in BuildProgram()
314 skvm::Color src = as_SB(params.shader)->program(p, device, /*local=*/device, paint, in BuildProgram()
319 skvm::F32 M = from_unorm(8, p->load8(p->varying<uint8_t>())), in BuildProgram()
336 skvm::PixelFormat dstFormat = skvm::SkColorType_to_PixelFormat(params.dst.colorType()); in BuildProgram()
337 skvm::Color dst = p->load(dstFormat, dst_ptr); in BuildProgram()
348 skvm::Color cov; in BuildProgram()
364 skvm::PixelFormat fmt = skvm::SkColorType_to_PixelFormat(kRGB_565_SkColorType); in BuildProgram()
371 skvm::Color clip = as_SB(params.clip)->program(p, device, /*local=*/device, paint, in BuildProgram()
425 const Params& params, skvm::Uniforms* uniforms, SkArenaAlloc* alloc, bool* ok) { in CacheKey()
427 skvm::Uniform r = uniforms->pushF(params.paint.fR), in CacheKey()
432 auto hash_shader = [&](skvm::Builder& p, const sk_sp<SkShader>& shader, in CacheKey()
433 skvm::Color* outColor) { in CacheKey()
436 skvm::Coord device = device_coord(&p, uniforms); in CacheKey()
437 skvm::Color paint = { in CacheKey()
453 const skvm::Val outputs[] = { in CacheKey()
473 skvm::Builder p; in CacheKey()
477 skvm::Color src; in CacheKey()
483 skvm::Color cov; in CacheKey()
497 skvm::Color dst = DstColor(&p, params); in CacheKey()
498 skvm::Color outColor = blender->program(&p, src, dst, params.dst, uniforms, alloc); in CacheKey()
502 const skvm::Val outputs[] = { in CacheKey()
538 , fUniforms(skvm::UPtr{0}, kBlitterUniformsCount)
543 if (SkLRUCache<Key, skvm::Program>* cache = TryAcquireProgramCache()) { in ~SkVMBlitter()
544 auto cache_program = [&](skvm::Program&& program, Coverage coverage) { in ~SkVMBlitter()
559 SkLRUCache<SkVMBlitter::Key, skvm::Program>* SkVMBlitter::TryAcquireProgramCache() { in TryAcquireProgramCache()
561 thread_local static SkLRUCache<Key, skvm::Program> cache{64}; in TryAcquireProgramCache()
585 skvm::Program SkVMBlitter::buildProgram(Coverage coverage) { in buildProgram()
588 skvm::Program p; in buildProgram()
589 if (SkLRUCache<Key, skvm::Program>* cache = TryAcquireProgramCache()) { in buildProgram()
590 if (skvm::Program* found = cache->find(key)) { in buildProgram()
605 skvm::Builder builder; in buildProgram()
610 skvm::Program program = builder.done(DebugName(key).c_str()); in buildProgram()
692 const skvm::Program* program = nullptr; in blitMask()