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

Side by Side Diff: LayoutTests/fast/canvas/script-tests/canvas-blend-image.js

Issue 13637006: Add canvas blending modes under a runtime flag (Closed) Base URL: http://src.chromium.org/blink/trunk/
Patch Set: Created 7 years, 7 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
OLDNEW
1 description("Series of tests to ensure correct results on applying different ble nd modes."); 1 description("Series of tests to ensure correct results on applying different ble nd modes.");
2 2
3 var tmpimg = document.createElement('canvas'); 3 var tmpimg = document.createElement('canvas');
4 tmpimg.width = 200; 4 tmpimg.width = 200;
5 tmpimg.height = 200; 5 tmpimg.height = 200;
6 ctx = tmpimg.getContext('2d'); 6 ctx = tmpimg.getContext('2d');
7 7
8 // Create the image for blending test with images. 8 // Create the image for blending test with images.
9 var img = document.createElement('canvas'); 9 var img = document.createElement('canvas');
10 img.width = 200; 10 img.width = 200;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 ], 61 ],
62 ['color-dodge', 62 ['color-dodge',
63 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], 63 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]],
64 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], 64 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]],
65 [[128, 0, 127, 255],[128, 128, 127, 255],[0, 64, 127, 255],[0, 0, 255, 255]], 65 [[128, 0, 127, 255],[128, 128, 127, 255],[0, 64, 127, 255],[0, 0, 255, 255]],
66 [[85, 0, 170, 191],[85, 85, 170, 191],[0, 43, 170, 191],[0, 0, 255, 191 ]] 66 [[85, 0, 170, 191],[85, 85, 170, 191],[0, 43, 170, 191],[0, 0, 255, 191 ]]
67 ], 67 ],
68 ['color-burn', 68 ['color-burn',
69 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], 69 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]],
70 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], 70 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]],
71 » [[128, 0, 127, 255],[128, 128, 127, 255],[0, 0, 127, 255],[0, 0, 255, 2 55]], 71 » [[128, 0, 127, 255],[128, 128, 127, 255],[0, 64, 127, 255],[0, 0, 255, 255]],
72 » [[85, 0, 170, 191],[85, 85, 170, 191],[0, 0, 170, 191],[0, 0, 255, 191] ] 72 » [[85, 0, 170, 191],[85, 85, 170, 191],[0, 42, 170, 191],[0, 0, 255, 191 ]]
73 73
74 ], 74 ],
75 ['hard-light', 75 ['hard-light',
76 [[255, 0, 0, 255],[255, 255, 0, 255],[0, 1, 0, 255],[0, 0, 255, 255]], 76 [[255, 0, 0, 255],[255, 255, 0, 255],[0, 1, 0, 255],[0, 0, 255, 255]],
77 [[128, 0, 127, 255],[128, 128, 127, 255],[0, 0, 127, 255],[0, 0, 255, 2 55]], 77 [[128, 0, 127, 255],[128, 128, 127, 255],[0, 0, 127, 255],[0, 0, 255, 2 55]],
78 [[255, 0, 0, 255],[255, 255, 0, 255],[0, 65, 0, 255],[0, 0, 255, 255]], 78 [[255, 0, 0, 255],[255, 255, 0, 255],[0, 65, 0, 255],[0, 0, 255, 255]],
79 [[171, 0, 84, 191],[171, 171, 84, 191],[0, 43, 84, 191],[0, 0, 255, 191 ]] 79 [[171, 0, 84, 191],[171, 171, 84, 191],[0, 43, 84, 191],[0, 0, 255, 191 ]]
80 ], 80 ],
81 ['soft-light', 81 ['soft-light',
82 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]], 82 [[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255],[0, 0, 255, 255]],
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 checkBlendModeResult(blendModes[i][0], testScenario[j][0], blendModes[ i][j+1], sigma); 168 checkBlendModeResult(blendModes[i][0], testScenario[j][0], blendModes[ i][j+1], sigma);
169 ctx.restore(); 169 ctx.restore();
170 } 170 }
171 debug(''); 171 debug('');
172 } 172 }
173 } 173 }
174 174
175 // Run test and allow variation of results. 175 // Run test and allow variation of results.
176 prepareTestScenario(5); 176 prepareTestScenario(5);
OLDNEW
« no previous file with comments | « LayoutTests/fast/canvas/canvas-blend-solid-expected.txt ('k') | LayoutTests/fast/canvas/script-tests/canvas-blend-solid.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698