1/* 2* Copyright 2020 Google LLC 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 8in fragmentProcessor fp; 9 10half4 main() { 11 return sample(fp, sk_FragCoord.xy); 12} 13 14@optimizationFlags { 15 ProcessorOptimizationFlags(fp.get()) 16} 17 18@class { 19 SkPMColor4f constantOutputForConstantInput(const SkPMColor4f& inColor) const override { 20 return ConstantOutputForConstantInput(this->childProcessor(0), inColor); 21 } 22} 23 24@make{ 25 static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> fp) { 26 return std::unique_ptr<GrFragmentProcessor>(new GrDeviceSpaceEffect(std::move(fp))); 27 } 28} 29 30@test(d) { 31 return GrDeviceSpaceEffect::Make(GrProcessorUnitTest::MakeChildFP(d)); 32} 33