diff -r 000000000000 -r 6474c204b198 gfx/tests/gtest/TestLayers.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gfx/tests/gtest/TestLayers.h Wed Dec 31 06:09:35 2014 +0100 @@ -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 CreateLayerTree( + const char* aLayerTreeDescription, + nsIntRegion* aVisibleRegions, + const gfx3DMatrix* aTransforms, + nsRefPtr& aLayerManager, + nsTArray >& aLayersOut); + + +#endif +