gfx/tests/gtest/TestLayers.h
author Jean-Yves Avenard <jyavenard@mozilla.com>
Thu, 06 Aug 2015 10:58:35 +1000
changeset 256477 c32cd64adb3745e4bfb5c44739c2417e1ff845fc
parent 197236 1df59831403ab2dd073f0453a0792bfdd2ac9216
child 266617 91d4539e00cecb658604e021675a923c60ef3235
permissions -rw-r--r--
Bug 1190258: P1. Use getter to access MediaRawData mData and mSize member. r=cpearce

/* 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,
    nsRefPtr<mozilla::layers::LayerManager>& aLayerManager,
    nsTArray<nsRefPtr<mozilla::layers::Layer> >& aLayersOut);


#endif