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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: content/test/data/gpu/pixel_webgl2_util.js
diff --git a/content/test/data/gpu/pixel_webgl2_util.js b/content/test/data/gpu/pixel_webgl2_util.js
new file mode 100644
index 0000000000000000000000000000000000000000..82f38033f8cfa92c3e0e0a924531a105a4f9fae9
--- /dev/null
+++ b/content/test/data/gpu/pixel_webgl2_util.js
@@ -0,0 +1,34 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// READ BEFORE UPDATING:
+// If this file is updated, make sure to increment the "revision" value of any
+// tests that use this file in content/test/gpu/page_sets/pixel_tests.py. This
+// will ensure that the baseline images are regenerated on the next run.
+
+var g_swapsBeforeAckUtil = 15;
+
+// TODO(kbr): We should test premultiplyAlpha as well.
+function initGL(canvas, antialias, alpha)
+{
+ var gl = null;
+ try {
+ gl = canvas.getContext("webgl2",
+ {"alpha": alpha, "antialias":antialias});
+ } catch (e) {}
+ return gl;
+}
+
+function waitAndSignalHarness()
+{
+ if (g_swapsBeforeAckUtil == 0) {
+ if (window.domAutomationController) {
+ domAutomationController.setAutomationId(1);
+ domAutomationController.send("SUCCESS");
+ }
+ } else {
+ g_swapsBeforeAckUtil--;
+ requestAnimationFrame(waitAndSignalHarness);
+ }
+}
« 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