Bug 994024 - Add assertions in ShadowLayers.cpp. r=bjacob

This commit is contained in:
Nicolas Silva 2014-04-11 18:47:56 +02:00
Родитель bf6caebb23
Коммит e6b591c126
1 изменённых файлов: 24 добавлений и 0 удалений

Просмотреть файл

@ -310,6 +310,8 @@ void
ShadowLayerForwarder::UseTiledLayerBuffer(CompositableClient* aCompositable,
const SurfaceDescriptorTiles& aTileLayerDescriptor)
{
MOZ_ASSERT(aCompositable);
MOZ_ASSERT(aCompositable->GetIPDLActor());
mTxn->AddNoSwapPaint(OpUseTiledLayerBuffer(nullptr, aCompositable->GetIPDLActor(),
aTileLayerDescriptor));
}
@ -350,6 +352,8 @@ void
ShadowLayerForwarder::UpdatePictureRect(CompositableClient* aCompositable,
const nsIntRect& aRect)
{
MOZ_ASSERT(aCompositable);
MOZ_ASSERT(aCompositable->GetIPDLActor());
mTxn->AddNoSwapPaint(OpUpdatePictureRect(nullptr, aCompositable->GetIPDLActor(), aRect));
}
@ -358,6 +362,10 @@ ShadowLayerForwarder::UpdatedTexture(CompositableClient* aCompositable,
TextureClient* aTexture,
nsIntRegion* aRegion)
{
MOZ_ASSERT(aCompositable);
MOZ_ASSERT(aTexture);
MOZ_ASSERT(aCompositable->GetIPDLActor());
MOZ_ASSERT(aTexture->GetIPDLActor());
MaybeRegion region = aRegion ? MaybeRegion(*aRegion)
: MaybeRegion(null_t());
if (aTexture->GetFlags() & TEXTURE_IMMEDIATE_UPLOAD) {
@ -375,6 +383,10 @@ void
ShadowLayerForwarder::UseTexture(CompositableClient* aCompositable,
TextureClient* aTexture)
{
MOZ_ASSERT(aCompositable);
MOZ_ASSERT(aTexture);
MOZ_ASSERT(aCompositable->GetIPDLActor());
MOZ_ASSERT(aTexture->GetIPDLActor());
mTxn->AddEdit(OpUseTexture(nullptr, aCompositable->GetIPDLActor(),
nullptr, aTexture->GetIPDLActor()));
}
@ -384,6 +396,12 @@ ShadowLayerForwarder::UseComponentAlphaTextures(CompositableClient* aCompositabl
TextureClient* aTextureOnBlack,
TextureClient* aTextureOnWhite)
{
MOZ_ASSERT(aCompositable);
MOZ_ASSERT(aTextureOnWhite);
MOZ_ASSERT(aTextureOnBlack);
MOZ_ASSERT(aCompositable->GetIPDLActor());
MOZ_ASSERT(aTextureOnBlack->GetIPDLActor());
MOZ_ASSERT(aTextureOnWhite->GetIPDLActor());
MOZ_ASSERT(aTextureOnBlack->GetSize() == aTextureOnWhite->GetSize());
mTxn->AddEdit(OpUseComponentAlphaTextures(nullptr, aCompositable->GetIPDLActor(),
nullptr, aTextureOnBlack->GetIPDLActor(),
@ -394,6 +412,10 @@ void
ShadowLayerForwarder::RemoveTextureFromCompositable(CompositableClient* aCompositable,
TextureClient* aTexture)
{
MOZ_ASSERT(aCompositable);
MOZ_ASSERT(aTexture);
MOZ_ASSERT(aCompositable->GetIPDLActor());
MOZ_ASSERT(aTexture->GetIPDLActor());
mTxn->AddEdit(OpRemoveTexture(nullptr, aCompositable->GetIPDLActor(),
nullptr, aTexture->GetIPDLActor()));
if (aTexture->GetFlags() & TEXTURE_DEALLOCATE_CLIENT) {
@ -406,6 +428,7 @@ ShadowLayerForwarder::RemoveTextureFromCompositable(CompositableClient* aComposi
void
ShadowLayerForwarder::RemoveTexture(TextureClient* aTexture)
{
MOZ_ASSERT(aTexture);
aTexture->ForceRemove();
}
@ -618,6 +641,7 @@ ShadowLayerForwarder::CreatedIncrementalBuffer(CompositableClient* aCompositable
const TextureInfo& aTextureInfo,
const nsIntRect& aBufferRect)
{
MOZ_ASSERT(aCompositable);
mTxn->AddNoSwapPaint(OpCreatedIncrementalTexture(nullptr, aCompositable->GetIPDLActor(),
aTextureInfo, aBufferRect));
}