Backout 4b46f6eff8f4 (Bug 732988) for linux Cipc orange

This commit is contained in:
Daniel Holbert
2012-03-11 16:43:12 -07:00
parent 25f6085512
commit 22ff58b4ab
5 changed files with 18 additions and 47 deletions

View File

@@ -867,7 +867,8 @@ BasicThebesLayerBuffer::SetBackingBufferAndUpdateFrom(
class BasicImageLayer : public ImageLayer, public BasicImplData {
public:
BasicImageLayer(BasicLayerManager* aLayerManager) :
ImageLayer(aLayerManager, static_cast<BasicImplData*>(this))
ImageLayer(aLayerManager, static_cast<BasicImplData*>(this)),
mSize(-1, -1)
{
MOZ_COUNT_CTOR(BasicImageLayer);
}
@@ -900,6 +901,8 @@ protected:
already_AddRefed<gfxPattern>
GetAndPaintCurrentImage(gfxContext* aContext,
float aOpacity);
gfxIntSize mSize;
};
void
@@ -923,7 +926,7 @@ BasicImageLayer::GetAndPaintCurrentImage(gfxContext* aContext,
nsRefPtr<gfxASurface> surface;
AutoLockImage autoLock(mContainer, getter_AddRefs(surface));
Image *image = autoLock.GetImage();
gfxIntSize size = autoLock.GetSize();
mSize = autoLock.GetSize();
if (!surface || surface->CairoStatus()) {
return nsnull;
@@ -935,15 +938,6 @@ BasicImageLayer::GetAndPaintCurrentImage(gfxContext* aContext,
}
pat->SetFilter(mFilter);
gfxIntSize sourceSize = surface->GetSize();
if (mScaleMode != SCALE_NONE) {
NS_ASSERTION(mScaleMode == SCALE_STRETCH,
"No other scalemodes than stretch and none supported yet.");
gfxMatrix mat = pat->GetMatrix();
mat.Scale(float(sourceSize.width) / mScaleToSize.width, float(sourceSize.height) / mScaleToSize.height);
pat->SetMatrix(mat);
size = mScaleToSize;
}
// The visible region can extend outside the image. If we're not
// tiling, we don't want to draw into that area, so just draw within
@@ -951,7 +945,7 @@ BasicImageLayer::GetAndPaintCurrentImage(gfxContext* aContext,
const nsIntRect* tileSrcRect = GetTileSourceRect();
AutoSetOperator setOperator(aContext, GetOperator());
PaintContext(pat,
tileSrcRect ? GetVisibleRegion() : nsIntRegion(nsIntRect(0, 0, size.width, size.height)),
tileSrcRect ? GetVisibleRegion() : nsIntRegion(nsIntRect(0, 0, mSize.width, mSize.height)),
tileSrcRect,
aOpacity, aContext);
@@ -2475,8 +2469,7 @@ class BasicShadowableImageLayer : public BasicImageLayer,
public:
BasicShadowableImageLayer(BasicShadowLayerManager* aManager) :
BasicImageLayer(aManager),
mBufferIsOpaque(false),
mSize(-1, -1)
mBufferIsOpaque(false)
{
MOZ_COUNT_CTOR(BasicShadowableImageLayer);
}
@@ -2543,7 +2536,6 @@ private:
nsRefPtr<gfxSharedImageSurface> mBackBufferU;
nsRefPtr<gfxSharedImageSurface> mBackBufferV;
gfxIntSize mCbCrSize;
gfxIntSize mSize;
};
void