Esempio n. 1
0
            public MyCustomFilter(CustomerFilterType type)
            {
                Type = type;
#if XAMCORE_2_0
                kernel = CIKernel.FromProgramSingle(GetKernelString());
#else
                kernel = CIKernel.FromProgram(GetKernelString());
#endif
            }
Esempio n. 2
0
            public MyCustomFilter(CustomerFilterType type)
            {
                Type = type;
#if XAMCORE_2_0
                kernel = CIKernel.FromProgramSingle(GetKernelString());
#else
                kernel = CIKernel.FromProgram(GetKernelString());
#endif
                Assert.IsNotNull(kernel, $"Kernel: {Type}");
            }
Esempio n. 3
0
        public void CIKernel_TestFromPrograms()
        {
            TestRuntime.AssertSystemVersion(ApplePlatform.iOS, 8, 0, throwIfOtherPlatform: false);
            TestRuntime.AssertSystemVersion(ApplePlatform.MacOSX, 10, 11, throwIfOtherPlatform: false);

            CIKernel[] kernels =
                CIKernel.FromProgramMultiple(
                    NoOpColorKernel + "\n" + NoOpWithParamColorKernel + "\n" + PositionColorKernel + "\n" + NoOpWarpKernel);
            Assert.AreEqual(4, kernels.Length, "CIKernel_TestFromPrograms did not get back the right number of programs");
            foreach (CIKernel kernel in kernels)
            {
                Assert.IsTrue(kernel is CIColorKernel || kernel is CIWarpKernel, "CIKernel_TestFromPrograms is neither type of kernel?");
            }
        }
Esempio n. 4
0
        public void CIKernel_TestFromPrograms()
        {
            if (!TestRuntime.CheckSystemAndSDKVersion(8, 0))
            {
                Assert.Inconclusive("Custom filters require iOS8+");
            }

            CIKernel[] kernels =
#if XAMCORE_2_0
                CIKernel.FromProgramMultiple(
#else
                CIKernel.FromPrograms(
#endif
                    NoOpColorKernel + "\n" + NoOpWithParamColorKernel + "\n" + PositionColorKernel + "\n" + NoOpWarpKernel);
            Assert.AreEqual(4, kernels.Length, "CIKernel_TestFromPrograms did not get back the right number of programs");
                            foreach (CIKernel kernel in kernels)
            {
                Assert.IsTrue(kernel is CIColorKernel || kernel is CIWarpKernel, "CIKernel_TestFromPrograms is neither type of kernel?");
            }
        }
Esempio n. 5
0
 public MyCustomFilter(CustomerFilterType type)
 {
     Type   = type;
     kernel = CIKernel.FromProgramSingle(GetKernelString());
     Assert.IsNotNull(kernel, $"Kernel: {Type}");
 }