Backed out changeset 9db369ba372c (bug 1375759) for unused mComputedDrawRegion. r=backout

This commit is contained in:
Sebastian Hengst 2017-06-27 20:47:30 +02:00
parent 7c2f5c4502
commit 4798a534fd
9 changed files with 2 additions and 49 deletions

View File

@ -2102,15 +2102,6 @@ Layer::RemoveUserData(void* aKey)
return d;
}
void
Layer::SetManager(LayerManager* aManager, HostLayer* aSelf)
{
// No one should be calling this for weird reasons.
MOZ_ASSERT(aSelf);
MOZ_ASSERT(aSelf->GetLayer() == this);
mManager = aManager;
}
void
PaintedLayer::PrintInfo(std::stringstream& aStream, const char* aPrefix)
{

View File

@ -844,11 +844,6 @@ public:
*/
LayerManager* Manager() { return mManager; }
/**
* This should only be called when changing layer managers from HostLayers.
*/
void SetManager(LayerManager* aManager, HostLayer* aSelf);
enum {
/**
* If this is set, the caller is promising that by the end of this

View File

@ -49,12 +49,6 @@ ContainerLayerMLGPU::OnPrepareToRender(FrameBuilder* aBuilder)
return true;
}
void
ContainerLayerMLGPU::OnLayerManagerChange(LayerManagerMLGPU* aManager)
{
ClearCachedResources();
}
RefPtr<MLGRenderTarget>
ContainerLayerMLGPU::UpdateRenderTarget(MLGDevice* aDevice, MLGRenderTargetFlags aFlags)
{

View File

@ -53,7 +53,6 @@ public:
protected:
bool OnPrepareToRender(FrameBuilder* aBuilder) override;
void OnLayerManagerChange(LayerManagerMLGPU* aManager) override;
private:
RefPtr<MLGRenderTarget> mRenderTarget;

View File

@ -125,22 +125,6 @@ LayerMLGPU::SetRegionToRender(LayerIntRegion&& aRegion)
SetShadowVisibleRegion(Move(aRegion));
}
void
LayerMLGPU::SetLayerManager(HostLayerManager* aManager)
{
LayerManagerMLGPU* manager = aManager->AsLayerManagerMLGPU();
MOZ_RELEASE_ASSERT(manager);
HostLayer::SetLayerManager(aManager);
GetLayer()->SetManager(manager, this);
if (CompositableHost* host = GetCompositableHost()) {
host->SetTextureSourceProvider(manager->GetTextureSourceProvider());
}
OnLayerManagerChange(manager);
}
RefLayerMLGPU::RefLayerMLGPU(LayerManagerMLGPU* aManager)
: RefLayer(aManager, static_cast<HostLayer*>(this))
, LayerMLGPU(aManager)

View File

@ -105,11 +105,6 @@ protected:
void MarkPrepared();
// We don't want derivative layers overriding this directly - we provide a
// callback instead.
void SetLayerManager(HostLayerManager* aManager) override;
virtual void OnLayerManagerChange(LayerManagerMLGPU* aManager) {}
private:
// This is a monotonic counter used to check whether a layer appears twice
// when 3d sorting.

View File

@ -193,12 +193,6 @@ LayerManagerMLGPU::GetBackendType()
return mDevice ? mDevice->GetLayersBackend() : LayersBackend::LAYERS_NONE;
}
void
LayerManagerMLGPU::SetRoot(Layer* aLayer)
{
mRoot = aLayer;
}
bool
LayerManagerMLGPU::BeginTransaction()
{

View File

@ -38,7 +38,7 @@ public:
// LayerManager methods
bool BeginTransaction() override;
void BeginTransactionWithDrawTarget(gfx::DrawTarget* aTarget, const gfx::IntRect& aRect) override;
void SetRoot(Layer* aLayer) override;
void SetRoot(Layer* aLayer) override { mRoot = aLayer; }
already_AddRefed<PaintedLayer> CreatePaintedLayer() override;
already_AddRefed<ContainerLayer> CreateContainerLayer() override;
already_AddRefed<ImageLayer> CreateImageLayer() override;

View File

@ -64,6 +64,7 @@ public:
protected:
void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
bool OnPrepareToRender(FrameBuilder* aBuilder) override;
void ComputeDrawRegion();
void CleanupResources();