Backed out 5 changesets (bug 907926, bug 911393, bug 917703) due to OSX reftest bustage during an unrelated CLOSED TREE

Backed out changeset 94a6733b01dc (bug 907926)
Backed out changeset 44108fb6f7cc (bug 917703)
Backed out changeset f2dd2a27af69 (bug 911393)
Backed out changeset fdb0d1053128 (bug 907926)
Backed out changeset b3616b786e8f (bug 907926)
This commit is contained in:
Wes Kocher 2013-09-19 17:56:18 -07:00
Родитель a20dd26efe
Коммит c83409e3af
12 изменённых файлов: 21 добавлений и 165 удалений

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

@ -236,8 +236,6 @@ pixman-enable-altivec-acceleration.patch: enable building the altivec accelerati
win32-d3dsurface9.patch: Create a win32 d3d9 surface to support LockRect
win32-avoid-extend-pad-fallback: Avoid falling back to pixman when using EXTEND_PAD
==== disable printing patch ====
disable-printing.patch: allows us to use NS_PRINTING to disable printing.

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

@ -1119,7 +1119,7 @@ _cairo_win32_surface_composite (cairo_operator_t op,
cairo_fixed_t x0_fixed, y0_fixed;
cairo_int_status_t status;
cairo_bool_t needs_alpha, needs_scale, needs_repeat, needs_pad;
cairo_bool_t needs_alpha, needs_scale, needs_repeat;
cairo_image_surface_t *src_image = NULL;
cairo_format_t src_format;
@ -1150,8 +1150,7 @@ _cairo_win32_surface_composite (cairo_operator_t op,
goto UNSUPPORTED;
if (pattern->extend != CAIRO_EXTEND_NONE &&
pattern->extend != CAIRO_EXTEND_REPEAT &&
pattern->extend != CAIRO_EXTEND_PAD)
pattern->extend != CAIRO_EXTEND_REPEAT)
goto UNSUPPORTED;
if (mask_pattern) {
@ -1258,7 +1257,6 @@ _cairo_win32_surface_composite (cairo_operator_t op,
* black.
*/
needs_pad = FALSE;
if (pattern->extend != CAIRO_EXTEND_REPEAT) {
needs_repeat = FALSE;
@ -1280,7 +1278,6 @@ _cairo_win32_surface_composite (cairo_operator_t op,
dst_r.x -= src_r.x;
src_r.x = 0;
needs_pad = TRUE;
}
if (src_r.y < 0) {
@ -1290,28 +1287,21 @@ _cairo_win32_surface_composite (cairo_operator_t op,
dst_r.y -= src_r.y;
src_r.y = 0;
needs_pad = TRUE;
}
if (src_r.x + src_r.width > src_extents.width) {
src_r.width = src_extents.width - src_r.x;
dst_r.width = src_r.width;
needs_pad = TRUE;
}
if (src_r.y + src_r.height > src_extents.height) {
src_r.height = src_extents.height - src_r.y;
dst_r.height = src_r.height;
needs_pad = TRUE;
}
} else {
needs_repeat = TRUE;
}
if (pattern->extend == CAIRO_EXTEND_PAD && needs_pad) {
goto UNSUPPORTED;
}
/*
* Operations that we can do:
*

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

@ -1,109 +0,0 @@
diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
--- a/gfx/cairo/cairo/src/cairo-win32-surface.c
+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
@@ -1114,17 +1114,17 @@ static cairo_int_status_t
cairo_win32_surface_t *dst = abstract_dst;
cairo_win32_surface_t *src;
cairo_surface_pattern_t *src_surface_pattern;
int alpha;
double scalex, scaley;
cairo_fixed_t x0_fixed, y0_fixed;
cairo_int_status_t status;
- cairo_bool_t needs_alpha, needs_scale, needs_repeat;
+ cairo_bool_t needs_alpha, needs_scale, needs_repeat, needs_pad;
cairo_image_surface_t *src_image = NULL;
cairo_format_t src_format;
cairo_rectangle_int_t src_extents;
cairo_rectangle_int_t src_r = { src_x, src_y, width, height };
cairo_rectangle_int_t dst_r = { dst_x, dst_y, width, height };
@@ -1145,17 +1145,18 @@ static cairo_int_status_t
{
goto UNSUPPORTED;
}
if (pattern->type != CAIRO_PATTERN_TYPE_SURFACE)
goto UNSUPPORTED;
if (pattern->extend != CAIRO_EXTEND_NONE &&
- pattern->extend != CAIRO_EXTEND_REPEAT)
+ pattern->extend != CAIRO_EXTEND_REPEAT &&
+ pattern->extend != CAIRO_EXTEND_PAD)
goto UNSUPPORTED;
if (mask_pattern) {
/* FIXME: When we fully support RENDER style 4-channel
* masks we need to check r/g/b != 1.0.
*/
if (mask_pattern->type != CAIRO_PATTERN_TYPE_SOLID)
return CAIRO_INT_STATUS_UNSUPPORTED;
@@ -1252,16 +1253,17 @@ static cairo_int_status_t
/* If the src rectangle doesn't wholly lie within the src extents,
* fudge things. We really need to do fixup on the unpainted
* region -- e.g. the SOURCE operator is broken for areas outside
* of the extents, because it won't clear that area to transparent
* black.
*/
+ needs_pad = FALSE;
if (pattern->extend != CAIRO_EXTEND_REPEAT) {
needs_repeat = FALSE;
/* If the src rect and the extents of the source image don't overlap at all,
* we can't do anything useful here.
*/
if (src_r.x > src_extents.width || src_r.y > src_extents.height ||
(src_r.x + src_r.width) < 0 || (src_r.y + src_r.height) < 0)
@@ -1273,40 +1275,48 @@ static cairo_int_status_t
if (src_r.x < 0) {
src_r.width += src_r.x;
dst_r.width += src_r.x;
dst_r.x -= src_r.x;
src_r.x = 0;
+ needs_pad = TRUE;
}
if (src_r.y < 0) {
src_r.height += src_r.y;
dst_r.height += src_r.y;
dst_r.y -= src_r.y;
src_r.y = 0;
+ needs_pad = TRUE;
}
if (src_r.x + src_r.width > src_extents.width) {
src_r.width = src_extents.width - src_r.x;
dst_r.width = src_r.width;
+ needs_pad = TRUE;
}
if (src_r.y + src_r.height > src_extents.height) {
src_r.height = src_extents.height - src_r.y;
dst_r.height = src_r.height;
+ needs_pad = TRUE;
}
} else {
needs_repeat = TRUE;
}
+ if (pattern->extend == CAIRO_EXTEND_PAD && needs_pad) {
+ goto UNSUPPORTED;
+ }
+
/*
* Operations that we can do:
*
* AlphaBlend uses the following formula for alpha when not use the per-pixel alpha (AlphaFormat = 0)
* Dst.Alpha = Src.Alpha * (SCA/255.0) + Dst.Alpha * (1.0 - (SCA/255.0))
* This turns into Dst.Alpha = Src.Alpha when SCA = 255.
* (http://msdn.microsoft.com/en-us/library/aa921335.aspx)
*

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

@ -175,9 +175,9 @@ public:
{
const nsIntRegion& visibleRegion = mLayer->GetEffectiveVisibleRegion();
const nsIntRect& bounds = visibleRegion.GetBounds();
nsRefPtr<gfxASurface> currentSurface = mTarget->CurrentSurface();
if (mTarget->IsCairo()) {
nsRefPtr<gfxASurface> currentSurface = mTarget->CurrentSurface();
const gfxRect& targetOpaqueRect = currentSurface->GetOpaqueRect();
// Try to annotate currentSurface with a region of pixels that have been
@ -322,17 +322,15 @@ BasicLayerManager::PopGroupToSourceWithCachedSurface(gfxContext *aTarget, gfxCon
{
if (!aTarget)
return;
if (aTarget->IsCairo()) {
nsRefPtr<gfxASurface> current = aPushed->CurrentSurface();
if (mCachedSurface.IsSurface(current)) {
gfxContextMatrixAutoSaveRestore saveMatrix(aTarget);
aTarget->IdentityMatrix();
aTarget->SetSource(current);
mCachedSurfaceInUse = false;
return;
}
nsRefPtr<gfxASurface> current = aPushed->CurrentSurface();
if (aTarget->IsCairo() && mCachedSurface.IsSurface(current)) {
gfxContextMatrixAutoSaveRestore saveMatrix(aTarget);
aTarget->IdentityMatrix();
aTarget->SetSource(current);
mCachedSurfaceInUse = false;
} else {
aTarget->PopGroupToSource();
}
aTarget->PopGroupToSource();
}
void

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

@ -87,6 +87,7 @@ BasicThebesLayer::PaintThebes(gfxContext* aContext,
PROFILER_LABEL("BasicThebesLayer", "PaintThebes");
NS_ASSERTION(BasicManager()->InDrawing(),
"Can only draw in drawing phase");
nsRefPtr<gfxASurface> targetSurface = aContext->CurrentSurface();
if (!mContentClient) {
// we pass a null pointer for the Forwarder argument, which means

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

@ -134,12 +134,6 @@ gfxSurfaceDrawable::Draw(gfxContext* aContext,
return true;
}
already_AddRefed<gfxImageSurface>
gfxSurfaceDrawable::GetAsImageSurface()
{
return mSurface->GetAsImageSurface();
}
gfxCallbackDrawable::gfxCallbackDrawable(gfxDrawingCallback* aCallback,
const gfxIntSize aSize)
: gfxDrawable(aSize)

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

@ -15,7 +15,6 @@
#include "gfxPattern.h"
class gfxASurface;
class gfxImageSurface;
class gfxContext;
/**
@ -42,7 +41,6 @@ public:
bool aRepeat,
const gfxPattern::GraphicsFilter& aFilter,
const gfxMatrix& aTransform = gfxMatrix()) = 0;
virtual already_AddRefed<gfxImageSurface> GetAsImageSurface() { return nullptr; }
virtual gfxIntSize Size() { return mSize; }
protected:
@ -64,8 +62,6 @@ public:
bool aRepeat,
const gfxPattern::GraphicsFilter& aFilter,
const gfxMatrix& aTransform = gfxMatrix());
virtual already_AddRefed<gfxImageSurface> GetAsImageSurface();
protected:
nsRefPtr<gfxASurface> mSurface;

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

@ -297,8 +297,6 @@ gfxImageSurface::GetSubimage(const gfxRect& aRect)
{
gfxRect r(aRect);
r.Round();
MOZ_ASSERT(gfxRect(0, 0, mSize.width, mSize.height).Contains(r));
unsigned char* subData = Data() +
(Stride() * (int)r.Y()) +
(int)r.X() * gfxASurface::BytePerPixelFromFormat(Format());

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

@ -245,23 +245,16 @@ CreateSamplingRestrictedDrawable(gfxDrawable* aDrawable,
if (needed.IsEmpty())
return nullptr;
nsRefPtr<gfxASurface> temp;
gfxIntSize size(int32_t(needed.Width()), int32_t(needed.Height()));
nsRefPtr<gfxASurface> temp =
gfxPlatform::GetPlatform()->CreateOffscreenSurface(size, gfxASurface::ContentFromFormat(aFormat));
if (!temp || temp->CairoStatus())
return nullptr;
nsRefPtr<gfxImageSurface> image = aDrawable->GetAsImageSurface();
if (image && gfxRect(0, 0, image->GetSize().width, image->GetSize().height).Contains(needed)) {
temp = image->GetSubimage(needed);
} else {
temp =
gfxPlatform::GetPlatform()->CreateOffscreenSurface(size, gfxASurface::ContentFromFormat(aFormat));
if (!temp || temp->CairoStatus())
return nullptr;
nsRefPtr<gfxContext> tmpCtx = new gfxContext(temp);
tmpCtx->SetOperator(OptimalFillOperator());
aDrawable->Draw(tmpCtx, needed - needed.TopLeft(), true,
gfxPattern::FILTER_FAST, gfxMatrix().Translate(needed.TopLeft()));
}
nsRefPtr<gfxContext> tmpCtx = new gfxContext(temp);
tmpCtx->SetOperator(OptimalFillOperator());
aDrawable->Draw(tmpCtx, needed - needed.TopLeft(), true,
gfxPattern::FILTER_FAST, gfxMatrix().Translate(needed.TopLeft()));
nsRefPtr<gfxDrawable> drawable =
new gfxSurfaceDrawable(temp, size, gfxMatrix().Translate(-needed.TopLeft()));

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

@ -506,7 +506,7 @@ gfxWindowsPlatform::UpdateRenderMode()
#endif
uint32_t canvasMask = 1 << BACKEND_CAIRO;
uint32_t contentMask = 1 << BACKEND_CAIRO;
uint32_t contentMask = 0;
if (mRenderMode == RENDER_DIRECT2D) {
canvasMask |= 1 << BACKEND_DIRECT2D;
contentMask |= 1 << BACKEND_DIRECT2D;

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

@ -3282,7 +3282,6 @@ FrameLayerBuilder::DrawThebesLayer(ThebesLayer* aLayer,
NS_ASSERTION(commonClipCount < 100,
"Maybe you really do have more than a hundred clipping rounded rects, or maybe something has gone wrong.");
currentClip.ApplyTo(aContext, presContext, commonClipCount);
aContext->NewPath();
}
}

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

@ -1579,8 +1579,6 @@ nsCSSBorderRenderer::DrawNoCompositeColorSolidBorderAzure()
builder->LineTo(strokeEnd);
RefPtr<Path> path = builder->Finish();
dt->Stroke(path, ColorPattern(Color::FromABGR(mBorderColors[i])), StrokeOptions(mBorderWidths[i]));
builder = nullptr;
path = nullptr;
Pattern *pattern;