Bug 593839. Part 2: Remove DESTINED_FOR_SCREEN flag now that it's no longer used. r=vlad a=blocking-betaN

This commit is contained in:
Robert O'Callahan 2010-10-25 16:39:27 +02:00
Родитель 92b4269cac
Коммит f77d26e905
4 изменённых файлов: 1 добавлений и 24 удалений

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

@ -390,16 +390,6 @@ ClipToContain(gfxContext* aContext, const nsIntRect& aRect)
aContext->SetMatrix(currentMatrix);
}
static void
InheritContextFlags(gfxContext* aSource, gfxContext* aDest)
{
if (aSource->GetFlags() & gfxContext::FLAG_DESTINED_FOR_SCREEN) {
aDest->SetFlag(gfxContext::FLAG_DESTINED_FOR_SCREEN);
} else {
aDest->ClearFlag(gfxContext::FLAG_DESTINED_FOR_SCREEN);
}
}
static PRBool
ShouldRetainTransparentSurface(PRUint32 aContentFlags,
gfxASurface* aTargetSurface)
@ -493,7 +483,6 @@ BasicThebesLayer::Paint(gfxContext* aContext,
// from RGB to RGBA, because we might need to repaint with
// subpixel AA)
state.mRegionToInvalidate.And(state.mRegionToInvalidate, mVisibleRegion);
InheritContextFlags(target, state.mContext);
mXResolution = paintXRes;
mYResolution = paintYRes;
PaintBuffer(state.mContext,
@ -1016,7 +1005,6 @@ BasicLayerManager::PushGroupWithCachedSurface(gfxContext *aTarget,
mCachedSurface.Get(aContent,
gfxIntSize(clip.size.width, clip.size.height),
currentSurf);
InheritContextFlags(aTarget, ctx);
/* Align our buffer for the original surface */
ctx->Translate(-clip.pos);
*aSavedOffset = clip.pos;

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

@ -637,15 +637,7 @@ public:
* When this flag is set, snapping to device pixels is disabled.
* It simply never does anything.
*/
FLAG_DISABLE_SNAPPING = (1 << 1),
/**
* When this flag is set, rendering through this context
* is destined to be (eventually) drawn on the screen. It can be
* useful to know this, for example so that windowed plugins are
* not unnecessarily rendered (since they will already appear
* on the screen, thanks to their windows).
*/
FLAG_DESTINED_FOR_SCREEN = (1 << 2)
FLAG_DISABLE_SNAPPING = (1 << 1)
};
void SetFlag(PRInt32 aFlag) { mFlags |= aFlag; }

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

@ -2074,7 +2074,6 @@ do {
nsPaintEvent event(PR_TRUE, NS_PAINT, this);
InitEvent(event);
nsRefPtr<gfxContext> thebesContext = new gfxContext(mThebesSurface);
thebesContext->SetFlag(gfxContext::FLAG_DESTINED_FOR_SCREEN);
// Intersect the update region with the paint rectangle to clip areas
// that aren't visible (e.g. offscreen or covered by another window).

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

@ -523,7 +523,6 @@ DDRAW_FAILED:
}
nsRefPtr<gfxContext> thebesContext = new gfxContext(targetSurface);
thebesContext->SetFlag(gfxContext::FLAG_DESTINED_FOR_SCREEN);
if (IsRenderMode(gfxWindowsPlatform::RENDER_DIRECT2D)) {
const nsIntRect* r;
for (nsIntRegionRectIterator iter(event.region);
@ -1045,7 +1044,6 @@ PRBool nsWindow::OnPaintImageDDraw16()
targetSurfaceImage->SetDeviceOffset(gfxPoint(-brx, -bry));
thebesContext = new gfxContext(targetSurfaceImage);
thebesContext->SetFlag(gfxContext::FLAG_DESTINED_FOR_SCREEN);
thebesContext->SetFlag(gfxContext::FLAG_SIMPLIFY_OPERATORS);
{