gfx/tests/gtest/TestLayers.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/tests/gtest/TestLayers.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,36 @@
     1.4 +/* vim:set ts=2 sw=2 sts=2 et: */
     1.5 +/* Any copyright is dedicated to the Public Domain.
     1.6 + * http://creativecommons.org/publicdomain/zero/1.0/
     1.7 + */
     1.8 +
     1.9 +#ifndef GFX_TEST_LAYERS_H
    1.10 +#define GFX_TEST_LAYERS_H
    1.11 +
    1.12 +#include "Layers.h"
    1.13 +#include "nsTArray.h"
    1.14 +
    1.15 +/* Create layer tree from a simple layer tree description syntax.
    1.16 + * Each index is either the first letter of the layer type or
    1.17 + * a '(',')' to indicate the start/end of the child layers.
    1.18 + * The aim of this function is to remove hard to read
    1.19 + * layer tree creation code.
    1.20 + *
    1.21 + * Example "c(c(c(tt)t))" would yield:
    1.22 + *          c
    1.23 + *          |
    1.24 + *          c
    1.25 + *         / \
    1.26 + *        c   t
    1.27 + *       / \
    1.28 + *      t   t
    1.29 + */
    1.30 +already_AddRefed<mozilla::layers::Layer> CreateLayerTree(
    1.31 +    const char* aLayerTreeDescription,
    1.32 +    nsIntRegion* aVisibleRegions,
    1.33 +    const gfx3DMatrix* aTransforms,
    1.34 +    nsRefPtr<mozilla::layers::LayerManager>& aLayerManager,
    1.35 +    nsTArray<nsRefPtr<mozilla::layers::Layer> >& aLayersOut);
    1.36 +
    1.37 +
    1.38 +#endif
    1.39 +

mercurial