| 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 | 
| 1003 DEF_GPUTEST(ImageFilterCropRectGPU, reporter, factory) { | 1005 DEF_GPUTEST(ImageFilterCropRectGPU, reporter, factory) { | 
| 1004     GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
      e>(0)); | 1006     GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
      e>(0)); | 
| 1005     SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 1007     SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 
| 1006                                                          SkImageInfo::MakeN32Pre
      mul(100, 100), | 1008                                                          SkImageInfo::MakeN32Pre
      mul(100, 100), | 
|  | 1009                                                          gProps, | 
| 1007                                                          0)); | 1010                                                          0)); | 
| 1008     test_crop_rects(device, reporter); | 1011     test_crop_rects(device, reporter); | 
| 1009 } | 1012 } | 
| 1010 | 1013 | 
| 1011 DEF_GPUTEST(HugeBlurImageFilterGPU, reporter, factory) { | 1014 DEF_GPUTEST(HugeBlurImageFilterGPU, reporter, factory) { | 
| 1012     GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
      e>(0)); | 1015     GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
      e>(0)); | 
| 1013     SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 1016     SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 
| 1014                                                          SkImageInfo::MakeN32Pre
      mul(100, 100), | 1017                                                          SkImageInfo::MakeN32Pre
      mul(100, 100), | 
|  | 1018                                                          gProps, | 
| 1015                                                          0)); | 1019                                                          0)); | 
| 1016     test_huge_blur(device, reporter); | 1020     test_huge_blur(device, reporter); | 
| 1017 } | 1021 } | 
| 1018 | 1022 | 
| 1019 DEF_GPUTEST(XfermodeImageFilterCroppedInputGPU, reporter, factory) { | 1023 DEF_GPUTEST(XfermodeImageFilterCroppedInputGPU, reporter, factory) { | 
| 1020     GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
      e>(0)); | 1024     GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
      e>(0)); | 
| 1021     SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 1025     SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 
| 1022                                                          SkImageInfo::MakeN32Pre
      mul(1, 1), | 1026                                                          SkImageInfo::MakeN32Pre
      mul(1, 1), | 
|  | 1027                                                          gProps, | 
| 1023                                                          0)); | 1028                                                          0)); | 
| 1024     test_xfermode_cropped_input(device, reporter); | 1029     test_xfermode_cropped_input(device, reporter); | 
| 1025 } | 1030 } | 
| 1026 | 1031 | 
| 1027 DEF_GPUTEST(TestNegativeBlurSigmaGPU, reporter, factory) { | 1032 DEF_GPUTEST(TestNegativeBlurSigmaGPU, reporter, factory) { | 
| 1028     GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
      e>(0)); | 1033     GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp
      e>(0)); | 
| 1029     SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 1034     SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, | 
| 1030                                                          SkImageInfo::MakeN32Pre
      mul(1, 1), | 1035                                                          SkImageInfo::MakeN32Pre
      mul(1, 1), | 
|  | 1036                                                          gProps, | 
| 1031                                                          0)); | 1037                                                          0)); | 
| 1032     test_negative_blur_sigma(device, reporter); | 1038     test_negative_blur_sigma(device, reporter); | 
| 1033 } | 1039 } | 
| 1034 #endif | 1040 #endif | 
| OLD | NEW | 
|---|