Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: Source/platform/graphics/filters/ImageFilterBuilderTest.cpp

Issue 419253002: Use WebBlendMode in FEBlend (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: WebBlendModeNormal -> "normal" (not "source-over"). Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/graphics/filters/FEBlend.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/platform/graphics/filters/FEBlend.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698