mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 539356 - Part 12 - Remove unnecessary LayerManagerLayerBuilder indirection. r=roc
This commit is contained in:
parent
8acde25c22
commit
0725f91922
@ -87,20 +87,6 @@ public:
|
||||
virtual ~LayerUserData() {}
|
||||
};
|
||||
|
||||
class LayerManagerLayerBuilder : public LayerUserData {
|
||||
public:
|
||||
LayerManagerLayerBuilder(FrameLayerBuilder* aBuilder, bool aDelete = true)
|
||||
: mLayerBuilder(aBuilder)
|
||||
, mDelete(aDelete)
|
||||
{
|
||||
MOZ_COUNT_CTOR(LayerManagerLayerBuilder);
|
||||
}
|
||||
~LayerManagerLayerBuilder();
|
||||
|
||||
FrameLayerBuilder* mLayerBuilder;
|
||||
bool mDelete;
|
||||
};
|
||||
|
||||
/*
|
||||
* Motivation: For truly smooth animation and video playback, we need to
|
||||
* be able to compose frames and render them on a dedicated thread (i.e.
|
||||
@ -213,8 +199,7 @@ public:
|
||||
};
|
||||
|
||||
FrameLayerBuilder* GetLayerBuilder() {
|
||||
LayerManagerLayerBuilder *data = static_cast<LayerManagerLayerBuilder*>(GetUserData(&gLayerManagerLayerBuilder));
|
||||
return data ? data->mLayerBuilder : nullptr;
|
||||
return reinterpret_cast<FrameLayerBuilder*>(GetUserData(&gLayerManagerLayerBuilder));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -644,7 +644,7 @@ FrameLayerBuilder::Init(nsDisplayListBuilder* aBuilder, LayerManager* aManager)
|
||||
if (mRootPresContext) {
|
||||
mInitialDOMGeneration = mRootPresContext->GetDOMGeneration();
|
||||
}
|
||||
aManager->SetUserData(&gLayerManagerLayerBuilder, new LayerManagerLayerBuilder(this));
|
||||
aManager->SetUserData(&gLayerManagerLayerBuilder, this);
|
||||
}
|
||||
|
||||
bool
|
||||
@ -930,14 +930,6 @@ FrameLayerBuilder::RemoveDisplayItemDataForFrame(DisplayItemDataEntry* aEntry,
|
||||
return PL_DHASH_REMOVE;
|
||||
}
|
||||
|
||||
LayerManagerLayerBuilder::~LayerManagerLayerBuilder()
|
||||
{
|
||||
MOZ_COUNT_DTOR(LayerManagerLayerBuilder);
|
||||
if (mDelete) {
|
||||
delete mLayerBuilder;
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ PLDHashOperator
|
||||
FrameLayerBuilder::StoreNewDisplayItemData(DisplayItemDataEntry* aEntry,
|
||||
void* aUserArg)
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
* integer types (nsIntPoint/nsIntSize/nsIntRect/nsIntRegion) are all in layer
|
||||
* coordinates, post-scaling, whereas appunit types are all pre-scaling.
|
||||
*/
|
||||
class FrameLayerBuilder {
|
||||
class FrameLayerBuilder : public layers::LayerUserData {
|
||||
public:
|
||||
typedef layers::ContainerLayer ContainerLayer;
|
||||
typedef layers::Layer Layer;
|
||||
|
Loading…
Reference in New Issue
Block a user