зеркало из https://github.com/mozilla/gecko-dev.git
Bug 866232 - Reserve a layer tree id for the root layer tree. r=BenWa
This commit is contained in:
Родитель
d7cb73e242
Коммит
d8a4ad4023
|
@ -697,12 +697,17 @@ CompositorParent::NotifyChildCreated(uint64_t aChild)
|
|||
sIndirectLayerTrees[aChild].mParent = this;
|
||||
}
|
||||
|
||||
// Ensure all layer tree IDs are greater than zero, so if we
|
||||
// ever see a zero-valued layer tree id we know it's actually
|
||||
// uninitialized and/or garbage.
|
||||
uint64_t CompositorParent::ROOT_LAYER_TREE_ID = 1;
|
||||
|
||||
/*static*/ uint64_t
|
||||
CompositorParent::AllocateLayerTreeId()
|
||||
{
|
||||
MOZ_ASSERT(CompositorLoop());
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
static uint64_t ids;
|
||||
static uint64_t ids = ROOT_LAYER_TREE_ID;
|
||||
return ++ids;
|
||||
}
|
||||
|
||||
|
|
|
@ -113,6 +113,11 @@ public:
|
|||
*/
|
||||
static void ShutDown();
|
||||
|
||||
/**
|
||||
* The reserved layer tree ID for the root of the layer tree.
|
||||
*/
|
||||
static uint64_t ROOT_LAYER_TREE_ID;
|
||||
|
||||
/**
|
||||
* Allocate an ID that can be used to refer to a layer tree and
|
||||
* associated resources that live only on the compositor thread.
|
||||
|
|
Загрузка…
Ссылка в новой задаче