OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkBitmapDevice.h" | 9 #include "SkBitmapDevice.h" |
10 #include "SkBitmapSource.h" | 10 #include "SkBitmapSource.h" |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 } | 993 } |
994 | 994 |
995 DEF_TEST(XfermodeImageFilterCroppedInput, reporter) { | 995 DEF_TEST(XfermodeImageFilterCroppedInput, reporter) { |
996 SkBitmap temp; | 996 SkBitmap temp; |
997 temp.allocN32Pixels(100, 100); | 997 temp.allocN32Pixels(100, 100); |
998 SkBitmapDevice device(temp); | 998 SkBitmapDevice device(temp); |
999 test_xfermode_cropped_input(&device, reporter); | 999 test_xfermode_cropped_input(&device, reporter); |
1000 } | 1000 } |
1001 | 1001 |
1002 #if SK_SUPPORT_GPU | 1002 #if SK_SUPPORT_GPU |
1003 const SkSurfaceProps gProps = SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_Ini
tType); | |
1004 | |
1005 DEF_GPUTEST(ImageFilterCropRectGPU, reporter, factory) { | 1003 DEF_GPUTEST(ImageFilterCropRectGPU, reporter, factory) { |
1006 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); | 1004 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); |
1007 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 1005 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, |
1008 SkImageInfo::MakeN32Pre
mul(100, 100), | 1006 SkImageInfo::MakeN32Pre
mul(100, 100), |
1009 gProps, | |
1010 0)); | 1007 0)); |
1011 test_crop_rects(device, reporter); | 1008 test_crop_rects(device, reporter); |
1012 } | 1009 } |
1013 | 1010 |
1014 DEF_GPUTEST(HugeBlurImageFilterGPU, reporter, factory) { | 1011 DEF_GPUTEST(HugeBlurImageFilterGPU, reporter, factory) { |
1015 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); | 1012 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); |
1016 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 1013 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, |
1017 SkImageInfo::MakeN32Pre
mul(100, 100), | 1014 SkImageInfo::MakeN32Pre
mul(100, 100), |
1018 gProps, | |
1019 0)); | 1015 0)); |
1020 test_huge_blur(device, reporter); | 1016 test_huge_blur(device, reporter); |
1021 } | 1017 } |
1022 | 1018 |
1023 DEF_GPUTEST(XfermodeImageFilterCroppedInputGPU, reporter, factory) { | 1019 DEF_GPUTEST(XfermodeImageFilterCroppedInputGPU, reporter, factory) { |
1024 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); | 1020 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); |
1025 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 1021 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, |
1026 SkImageInfo::MakeN32Pre
mul(1, 1), | 1022 SkImageInfo::MakeN32Pre
mul(1, 1), |
1027 gProps, | |
1028 0)); | 1023 0)); |
1029 test_xfermode_cropped_input(device, reporter); | 1024 test_xfermode_cropped_input(device, reporter); |
1030 } | 1025 } |
1031 | 1026 |
1032 DEF_GPUTEST(TestNegativeBlurSigmaGPU, reporter, factory) { | 1027 DEF_GPUTEST(TestNegativeBlurSigmaGPU, reporter, factory) { |
1033 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); | 1028 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); |
1034 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 1029 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, |
1035 SkImageInfo::MakeN32Pre
mul(1, 1), | 1030 SkImageInfo::MakeN32Pre
mul(1, 1), |
1036 gProps, | |
1037 0)); | 1031 0)); |
1038 test_negative_blur_sigma(device, reporter); | 1032 test_negative_blur_sigma(device, reporter); |
1039 } | 1033 } |
1040 #endif | 1034 #endif |
OLD | NEW |