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 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 SkBitmapDevice device(temp); | 1067 SkBitmapDevice device(temp); |
1068 test_xfermode_cropped_input(&device, reporter); | 1068 test_xfermode_cropped_input(&device, reporter); |
1069 } | 1069 } |
1070 | 1070 |
1071 #if SK_SUPPORT_GPU | 1071 #if SK_SUPPORT_GPU |
1072 const SkSurfaceProps gProps = SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_Ini
tType); | 1072 const SkSurfaceProps gProps = SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_Ini
tType); |
1073 | 1073 |
1074 DEF_GPUTEST(ImageFilterCropRectGPU, reporter, factory) { | 1074 DEF_GPUTEST(ImageFilterCropRectGPU, reporter, factory) { |
1075 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); | 1075 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); |
1076 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 1076 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, |
| 1077 SkSurface::kNo_Budgeted
, |
1077 SkImageInfo::MakeN32Pre
mul(100, 100), | 1078 SkImageInfo::MakeN32Pre
mul(100, 100), |
1078 gProps, | 1079 0, |
1079 0)); | 1080 &gProps)); |
1080 test_crop_rects(device, reporter); | 1081 test_crop_rects(device, reporter); |
1081 } | 1082 } |
1082 | 1083 |
1083 DEF_GPUTEST(HugeBlurImageFilterGPU, reporter, factory) { | 1084 DEF_GPUTEST(HugeBlurImageFilterGPU, reporter, factory) { |
1084 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); | 1085 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); |
1085 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 1086 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, |
| 1087 SkSurface::kNo_Budgeted
, |
1086 SkImageInfo::MakeN32Pre
mul(100, 100), | 1088 SkImageInfo::MakeN32Pre
mul(100, 100), |
1087 gProps, | 1089 0, |
1088 0)); | 1090 &gProps)); |
1089 test_huge_blur(device, reporter); | 1091 test_huge_blur(device, reporter); |
1090 } | 1092 } |
1091 | 1093 |
1092 DEF_GPUTEST(XfermodeImageFilterCroppedInputGPU, reporter, factory) { | 1094 DEF_GPUTEST(XfermodeImageFilterCroppedInputGPU, reporter, factory) { |
1093 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); | 1095 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); |
1094 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 1096 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, |
| 1097 SkSurface::kNo_Budgeted
, |
1095 SkImageInfo::MakeN32Pre
mul(1, 1), | 1098 SkImageInfo::MakeN32Pre
mul(1, 1), |
1096 gProps, | 1099 0, |
1097 0)); | 1100 &gProps)); |
1098 test_xfermode_cropped_input(device, reporter); | 1101 test_xfermode_cropped_input(device, reporter); |
1099 } | 1102 } |
1100 | 1103 |
1101 DEF_GPUTEST(TestNegativeBlurSigmaGPU, reporter, factory) { | 1104 DEF_GPUTEST(TestNegativeBlurSigmaGPU, reporter, factory) { |
1102 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); | 1105 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
e>(0)); |
1103 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 1106 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, |
| 1107 SkSurface::kNo_Budgeted
, |
1104 SkImageInfo::MakeN32Pre
mul(1, 1), | 1108 SkImageInfo::MakeN32Pre
mul(1, 1), |
1105 gProps, | 1109 0, |
1106 0)); | 1110 &gProps)); |
1107 test_negative_blur_sigma(device, reporter); | 1111 test_negative_blur_sigma(device, reporter); |
1108 } | 1112 } |
1109 #endif | 1113 #endif |
OLD | NEW |