| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 sourceEffect->setOperatingColorSpace(ColorSpaceDeviceRGB); | 49 sourceEffect->setOperatingColorSpace(ColorSpaceDeviceRGB); |
| 50 | 50 |
| 51 // Add a blur effect (with input : source) | 51 // Add a blur effect (with input : source) |
| 52 RefPtr<FilterEffect> blurEffect = | 52 RefPtr<FilterEffect> blurEffect = |
| 53 FEGaussianBlur::create(referenceFilter.get(), 3.0f, 3.0f); | 53 FEGaussianBlur::create(referenceFilter.get(), 3.0f, 3.0f); |
| 54 blurEffect->setOperatingColorSpace(ColorSpaceLinearRGB); | 54 blurEffect->setOperatingColorSpace(ColorSpaceLinearRGB); |
| 55 blurEffect->inputEffects().append(sourceEffect); | 55 blurEffect->inputEffects().append(sourceEffect); |
| 56 | 56 |
| 57 // Add a blend effect (with inputs : blur, source) | 57 // Add a blend effect (with inputs : blur, source) |
| 58 RefPtr<FilterEffect> blendEffect = | 58 RefPtr<FilterEffect> blendEffect = |
| 59 FEBlend::create(referenceFilter.get(), FEBLEND_MODE_NORMAL); | 59 FEBlend::create(referenceFilter.get(), WebBlendModeNormal); |
| 60 blendEffect->setOperatingColorSpace(ColorSpaceDeviceRGB); | 60 blendEffect->setOperatingColorSpace(ColorSpaceDeviceRGB); |
| 61 FilterEffectVector& blendInputs = blendEffect->inputEffects(); | 61 FilterEffectVector& blendInputs = blendEffect->inputEffects(); |
| 62 blendInputs.reserveCapacity(2); | 62 blendInputs.reserveCapacity(2); |
| 63 blendInputs.append(sourceEffect); | 63 blendInputs.append(sourceEffect); |
| 64 blendInputs.append(blurEffect); | 64 blendInputs.append(blurEffect); |
| 65 | 65 |
| 66 // Add a merge effect (with inputs : blur, blend) | 66 // Add a merge effect (with inputs : blur, blend) |
| 67 RefPtr<FilterEffect> mergeEffect = FEMerge::create(referenceFilter.get()
); | 67 RefPtr<FilterEffect> mergeEffect = FEMerge::create(referenceFilter.get()
); |
| 68 mergeEffect->setOperatingColorSpace(ColorSpaceLinearRGB); | 68 mergeEffect->setOperatingColorSpace(ColorSpaceLinearRGB); |
| 69 FilterEffectVector& mergeInputs = mergeEffect->inputEffects(); | 69 FilterEffectVector& mergeInputs = mergeEffect->inputEffects(); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 namespace { | 118 namespace { |
| 119 | 119 |
| 120 TEST_F(ImageFilterBuilderTest, testColorSpace) | 120 TEST_F(ImageFilterBuilderTest, testColorSpace) |
| 121 { | 121 { |
| 122 colorSpaceTest(); | 122 colorSpaceTest(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 } // namespace | 125 } // namespace |
| OLD | NEW |