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

Side by Side Diff: content/test/data/gpu/pixel_webgl2_util.js

Issue 2822743003: Preserve alpha channel of 1.0 when emulating RGB back buffer.
Patch Set: Created 3 years, 8 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // READ BEFORE UPDATING:
6 // If this file is updated, make sure to increment the "revision" value of any
7 // tests that use this file in content/test/gpu/page_sets/pixel_tests.py. This
8 // will ensure that the baseline images are regenerated on the next run.
9
10 var g_swapsBeforeAckUtil = 15;
11
12 // TODO(kbr): We should test premultiplyAlpha as well.
13 function initGL(canvas, antialias, alpha)
14 {
15 var gl = null;
16 try {
17 gl = canvas.getContext("webgl2",
18 {"alpha": alpha, "antialias":antialias});
19 } catch (e) {}
20 return gl;
21 }
22
23 function waitAndSignalHarness()
24 {
25 if (g_swapsBeforeAckUtil == 0) {
26 if (window.domAutomationController) {
27 domAutomationController.setAutomationId(1);
28 domAutomationController.send("SUCCESS");
29 }
30 } else {
31 g_swapsBeforeAckUtil--;
32 requestAnimationFrame(waitAndSignalHarness);
33 }
34 }
OLDNEW
« no previous file with comments | « content/test/data/gpu/pixel_webgl2_blitframebuffer_noalpha.html ('k') | content/test/gpu/gpu_tests/pixel_expectations.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698