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
parent 15486835a9
commit 0d92dbde77
3 changed files with 1 additions and 16 deletions

View File

@ -64,14 +64,6 @@ public:
void* aCallbackData,
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
* indicates they should clear resources they don't really need after their

View File

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

View File

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