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

Unified Diff: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js

Issue 2041193005: [compositorworker] compositor proxy mutation updates underlying layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compositor-worker-upstream-registration
Patch Set: Use RAII pattern Created 4 years, 6 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: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js
new file mode 100644
index 0000000000000000000000000000000000000000..e551f837ead12a789ae9eef0de8763c6b36d265e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/resources/basic-plumbing-main-to-worker.js
@@ -0,0 +1,16 @@
+self.importScripts('worker-common.js');
+
+self.onmessage = function(msg) {
+ if (msg.data.proxy)
+ self.proxy = msg.data.proxy;
+
+ awaitProxyInit(self.proxy).then((proxy) => {
+ var keys = ['opacity', 'scrollTop', 'scrollLeft'];
+ var values = {};
+ for (var i = 0; i < keys.length; i++) {
+ values[keys[i]] = proxy[keys[i]];
+ }
+ values.transform = proxy.transform.toFloat32Array();
+ postMessage(values);
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698