Bug 539356 - Part 21 - BasicLayers should always retain content. r=roc

This commit is contained in:
Matt Woodrow 2012-06-11 16:45:39 +12:00
Родитель 9376556289
Коммит e2b0e9efbb
3 изменённых файлов: 1 добавлений и 16 удалений

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

@ -64,14 +64,6 @@ public:
void* aCallbackData, void* aCallbackData,
ReadbackProcessor* aReadback) {} ReadbackProcessor* aReadback) {}
/**
* Implementations return true here if they *must* retain their
* layer contents. This is true of shadowable layers with shadows,
* because there's no target on which to composite directly in the
* layer-publishing child process.
*/
virtual bool MustRetainContent() { return false; }
/** /**
* Layers will get this call when their layer manager is destroyed, this * Layers will get this call when their layer manager is destroyed, this
* indicates they should clear resources they don't really need after their * indicates they should clear resources they don't really need after their

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

@ -647,10 +647,7 @@ BasicThebesLayer::PaintThebes(gfxContext* aContext,
gfxASurface::CONTENT_COLOR_ALPHA; gfxASurface::CONTENT_COLOR_ALPHA;
float opacity = GetEffectiveOpacity(); float opacity = GetEffectiveOpacity();
if (!BasicManager()->IsRetained() || if (!BasicManager()->IsRetained()) {
(!canUseOpaqueSurface &&
(mContentFlags & CONTENT_COMPONENT_ALPHA) &&
!MustRetainContent())) {
NS_ASSERTION(readbackUpdates.IsEmpty(), "Can't do readback for non-retained layer"); NS_ASSERTION(readbackUpdates.IsEmpty(), "Can't do readback for non-retained layer");
mValidRegion.SetEmpty(); mValidRegion.SetEmpty();
@ -2333,7 +2330,6 @@ public:
virtual Layer* AsLayer() { return this; } virtual Layer* AsLayer() { return this; }
virtual ShadowableLayer* AsShadowableLayer() { return this; } virtual ShadowableLayer* AsShadowableLayer() { return this; }
virtual bool MustRetainContent() { return HasShadow(); }
void SetBackBufferAndAttrs(const OptionalThebesBuffer& aBuffer, void SetBackBufferAndAttrs(const OptionalThebesBuffer& aBuffer,
const nsIntRegion& aValidRegion, const nsIntRegion& aValidRegion,

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

@ -173,9 +173,6 @@ public:
mValidRegion.Sub(mValidRegion, mInvalidRegion); mValidRegion.Sub(mValidRegion, mInvalidRegion);
} }
// BasicImplData
virtual bool MustRetainContent() { return HasShadow(); }
// Shadow methods // Shadow methods
virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs); virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs);
virtual ShadowableLayer* AsShadowableLayer() { return this; } virtual ShadowableLayer* AsShadowableLayer() { return this; }