mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Bug 844928, smarten up content client/host texture creation. r=nical
--HG-- extra : rebase_source : 2b15c0d233c45fc13b2bdfb155255e480fb3a947
This commit is contained in:
parent
fdc9d01061
commit
acce520504
@ -24,30 +24,16 @@ CompositableParentManager::ReceiveCompositableUpdate(const CompositableOperation
|
||||
EditReplyVector& replyv)
|
||||
{
|
||||
switch (aEdit.type()) {
|
||||
case CompositableOperation::TOpCreatedSingleBuffer: {
|
||||
MOZ_LAYERS_LOG(("[ParentSide] Created single buffer"));
|
||||
const OpCreatedSingleBuffer& op = aEdit.get_OpCreatedSingleBuffer();
|
||||
CompositableParent* compositableParent = static_cast<CompositableParent*>(op.compositableParent());
|
||||
ContentHostBase* content = static_cast<ContentHostBase*>(compositableParent->GetCompositableHost());
|
||||
case CompositableOperation::TOpCreatedTexture: {
|
||||
MOZ_LAYERS_LOG(("[ParentSide] Created texture"));
|
||||
const OpCreatedTexture& op = aEdit.get_OpCreatedTexture();
|
||||
CompositableParent* compositableParent =
|
||||
static_cast<CompositableParent*>(op.compositableParent());
|
||||
CompositableHost* compositable = compositableParent->GetCompositableHost();
|
||||
|
||||
content->EnsureTextureHost(TextureFront, op.descriptor(),
|
||||
compositableParent->GetCompositableManager(),
|
||||
op.textureInfo());
|
||||
|
||||
break;
|
||||
}
|
||||
case CompositableOperation::TOpCreatedDoubleBuffer: {
|
||||
MOZ_LAYERS_LOG(("[ParentSide] Created double buffer"));
|
||||
const OpCreatedDoubleBuffer& op = aEdit.get_OpCreatedDoubleBuffer();
|
||||
CompositableParent* compositableParent = static_cast<CompositableParent*>(op.compositableParent());
|
||||
ContentHostBase* content = static_cast<ContentHostBase*>(compositableParent->GetCompositableHost());
|
||||
|
||||
content->EnsureTextureHost(TextureFront, op.frontDescriptor(),
|
||||
compositableParent->GetCompositableManager(),
|
||||
op.textureInfo());
|
||||
content->EnsureTextureHost(TextureBack, op.backDescriptor(),
|
||||
compositableParent->GetCompositableManager(),
|
||||
op.textureInfo());
|
||||
compositable->EnsureTextureHost(op.textureId(), op.descriptor(),
|
||||
compositableParent->GetCompositableManager(),
|
||||
op.textureInfo());
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -241,17 +241,12 @@ struct OpPaintTiledLayerBuffer {
|
||||
uintptr_t tiledLayerBuffer;
|
||||
};
|
||||
|
||||
struct OpCreatedSingleBuffer {
|
||||
struct OpCreatedTexture {
|
||||
PCompositable compositable;
|
||||
uint32_t textureId;
|
||||
SurfaceDescriptor descriptor;
|
||||
TextureInfo textureInfo;
|
||||
};
|
||||
struct OpCreatedDoubleBuffer {
|
||||
PCompositable compositable;
|
||||
SurfaceDescriptor frontDescriptor;
|
||||
SurfaceDescriptor backDescriptor;
|
||||
TextureInfo textureInfo;
|
||||
};
|
||||
|
||||
struct OpDestroyThebesBuffer {
|
||||
PCompositable compositable;
|
||||
@ -277,8 +272,7 @@ struct OpUpdatePictureRect {
|
||||
union CompositableOperation {
|
||||
OpUpdatePictureRect;
|
||||
|
||||
OpCreatedSingleBuffer;
|
||||
OpCreatedDoubleBuffer;
|
||||
OpCreatedTexture;
|
||||
OpDestroyThebesBuffer;
|
||||
|
||||
OpPaintTexture;
|
||||
|
@ -719,8 +719,10 @@ ShadowLayerForwarder::CreatedSingleBuffer(CompositableClient* aCompositable,
|
||||
{
|
||||
MOZ_ASSERT(aDescriptor.type() != SurfaceDescriptor::T__None &&
|
||||
aDescriptor.type() != SurfaceDescriptor::Tnull_t);
|
||||
mTxn->AddEdit(OpCreatedSingleBuffer(nullptr, aCompositable->GetIPDLActor(),
|
||||
aDescriptor, aTextureInfo));
|
||||
mTxn->AddEdit(OpCreatedTexture(nullptr, aCompositable->GetIPDLActor(),
|
||||
TextureFront,
|
||||
aDescriptor,
|
||||
aTextureInfo));
|
||||
}
|
||||
|
||||
void
|
||||
@ -733,9 +735,14 @@ ShadowLayerForwarder::CreatedDoubleBuffer(CompositableClient* aCompositable,
|
||||
aBackDescriptor.type() != SurfaceDescriptor::T__None &&
|
||||
aFrontDescriptor.type() != SurfaceDescriptor::Tnull_t &&
|
||||
aBackDescriptor.type() != SurfaceDescriptor::Tnull_t);
|
||||
mTxn->AddEdit(OpCreatedDoubleBuffer(nullptr, aCompositable->GetIPDLActor(),
|
||||
aFrontDescriptor, aBackDescriptor,
|
||||
aTextureInfo));
|
||||
mTxn->AddEdit(OpCreatedTexture(nullptr, aCompositable->GetIPDLActor(),
|
||||
TextureFront,
|
||||
aFrontDescriptor,
|
||||
aTextureInfo));
|
||||
mTxn->AddEdit(OpCreatedTexture(nullptr, aCompositable->GetIPDLActor(),
|
||||
TextureBack,
|
||||
aBackDescriptor,
|
||||
aTextureInfo));
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user