summaryrefslogtreecommitdiffstats
path: root/gfx/tests/gtest/TestLayers.h
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /gfx/tests/gtest/TestLayers.h
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'gfx/tests/gtest/TestLayers.h')
-rw-r--r--gfx/tests/gtest/TestLayers.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/gfx/tests/gtest/TestLayers.h b/gfx/tests/gtest/TestLayers.h
new file mode 100644
index 000000000..18e351f77
--- /dev/null
+++ b/gfx/tests/gtest/TestLayers.h
@@ -0,0 +1,36 @@
+/* vim:set ts=2 sw=2 sts=2 et: */
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+#ifndef GFX_TEST_LAYERS_H
+#define GFX_TEST_LAYERS_H
+
+#include "Layers.h"
+#include "nsTArray.h"
+
+/* Create layer tree from a simple layer tree description syntax.
+ * Each index is either the first letter of the layer type or
+ * a '(',')' to indicate the start/end of the child layers.
+ * The aim of this function is to remove hard to read
+ * layer tree creation code.
+ *
+ * Example "c(c(c(tt)t))" would yield:
+ * c
+ * |
+ * c
+ * / \
+ * c t
+ * / \
+ * t t
+ */
+already_AddRefed<mozilla::layers::Layer> CreateLayerTree(
+ const char* aLayerTreeDescription,
+ nsIntRegion* aVisibleRegions,
+ const mozilla::gfx::Matrix4x4* aTransforms,
+ RefPtr<mozilla::layers::LayerManager>& aLayerManager,
+ nsTArray<RefPtr<mozilla::layers::Layer> >& aLayersOut);
+
+
+#endif
+