зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1113435 - Don't cull for layers being drawn progressively. r=jrmuizel
--HG-- extra : rebase_source : 775d70542a94bd5e9bd137aac7507699e6fb581d
This commit is contained in:
Родитель
04d545a0f6
Коммит
1d64a10ded
|
@ -236,6 +236,8 @@ public:
|
|||
*/
|
||||
virtual const nsIntRegion& GetValidLowPrecisionRegion() const = 0;
|
||||
|
||||
virtual const nsIntRegion& GetValidRegion() const = 0;
|
||||
|
||||
#if defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 17
|
||||
/**
|
||||
* Store a fence that will signal when the current buffer is no longer being read.
|
||||
|
|
|
@ -212,6 +212,7 @@ LayerManagerComposite::ApplyOcclusionCulling(Layer* aLayer, nsIntRegion& aOpaque
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Subtract any areas that we know to be opaque from our
|
||||
// visible region.
|
||||
LayerComposite *composite = aLayer->AsLayerComposite();
|
||||
|
@ -233,7 +234,7 @@ LayerManagerComposite::ApplyOcclusionCulling(Layer* aLayer, nsIntRegion& aOpaque
|
|||
!aLayer->GetMaskLayer() &&
|
||||
aLayer->GetLocalOpacity() == 1.0f) {
|
||||
if (aLayer->GetContentFlags() & Layer::CONTENT_OPAQUE) {
|
||||
localOpaque.Or(localOpaque, composite->GetShadowVisibleRegion());
|
||||
localOpaque.Or(localOpaque, composite->GetRenderedVisibleRegion());
|
||||
}
|
||||
localOpaque.MoveBy(transform2d._31, transform2d._32);
|
||||
const nsIntRect* clip = aLayer->GetEffectiveClipRect();
|
||||
|
@ -1151,6 +1152,14 @@ LayerComposite::SetLayerManager(LayerManagerComposite* aManager)
|
|||
mCompositor = aManager->GetCompositor();
|
||||
}
|
||||
|
||||
const nsIntRegion&
|
||||
LayerComposite::GetRenderedVisibleRegion() {
|
||||
if (TiledLayerComposer* tiled = GetTiledLayerComposer()) {
|
||||
return tiled->GetValidRegion();
|
||||
}
|
||||
return GetShadowVisibleRegion();
|
||||
}
|
||||
|
||||
#ifndef MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS
|
||||
|
||||
/*static*/ bool
|
||||
|
|
|
@ -441,6 +441,13 @@ public:
|
|||
bool HasLayerBeenComposited() { return mLayerComposited; }
|
||||
nsIntRect GetClearRect() { return mClearRect; }
|
||||
|
||||
/**
|
||||
* Return the part of the visible region that has been rendered.
|
||||
* While progressive drawing is in progress this region will be
|
||||
* a subset of the shadow visible region.
|
||||
*/
|
||||
const nsIntRegion& GetRenderedVisibleRegion();
|
||||
|
||||
protected:
|
||||
gfx::Matrix4x4 mShadowTransform;
|
||||
nsIntRegion mShadowVisibleRegion;
|
||||
|
|
|
@ -231,6 +231,11 @@ public:
|
|||
return mLowPrecisionTiledBuffer.GetValidRegion();
|
||||
}
|
||||
|
||||
const nsIntRegion& GetValidRegion() const MOZ_OVERRIDE
|
||||
{
|
||||
return mTiledBuffer.GetValidRegion();
|
||||
}
|
||||
|
||||
virtual void SetCompositor(Compositor* aCompositor) MOZ_OVERRIDE
|
||||
{
|
||||
CompositableHost::SetCompositor(aCompositor);
|
||||
|
|
Загрузка…
Ссылка в новой задаче