mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out 8bc719810cd5 (bug 757380) and 3f93e4add42b (bug 757933) for mochitest-4 assertions
This commit is contained in:
parent
63f4b896a4
commit
b475e5c880
@ -1976,8 +1976,7 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
|
||||
|
||||
nsRefPtr<gfxContext> groupTarget;
|
||||
nsRefPtr<gfxASurface> untransformedSurface;
|
||||
bool clipIsEmpty = !aTarget || aTarget->GetClipExtents().IsEmpty();
|
||||
if (!is2D && !clipIsEmpty) {
|
||||
if (!is2D) {
|
||||
untransformedSurface =
|
||||
gfxPlatform::GetPlatform()->CreateOffscreenSurface(gfxIntSize(bounds.width, bounds.height),
|
||||
gfxASurface::CONTENT_COLOR_ALPHA);
|
||||
@ -1995,7 +1994,7 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
|
||||
}
|
||||
untransformedSurface->SetDeviceOffset(gfxPoint(-bounds.x, -bounds.y));
|
||||
groupTarget = new gfxContext(untransformedSurface);
|
||||
} else if (needsGroup && !clipIsEmpty) {
|
||||
} else if (needsGroup) {
|
||||
groupTarget = PushGroupForLayer(aTarget, aLayer, aLayer->GetEffectiveVisibleRegion(),
|
||||
&needsClipToVisibleRegion);
|
||||
} else {
|
||||
@ -2052,7 +2051,9 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
|
||||
|
||||
// Temporary fast fix for bug 725886
|
||||
// Revert these changes when 725886 is ready
|
||||
if (!clipIsEmpty) {
|
||||
gfxRect clipExtents;
|
||||
clipExtents = aTarget->GetClipExtents();
|
||||
if (!clipExtents.IsEmpty()) {
|
||||
gfxPoint offset;
|
||||
bool dontBlit = needsClipToVisibleRegion || mTransactionIncomplete ||
|
||||
aLayer->GetEffectiveOpacity() != 1.0f;
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include "nsRegion.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "nsTArray.h"
|
||||
#include "mozilla/ThreadLocal.h"
|
||||
|
||||
/*
|
||||
* The SENTINEL values below guaranties that a < or >
|
||||
@ -184,43 +183,47 @@ void RgnRectMemoryAllocator::Free (nsRegion::RgnRect* aRect)
|
||||
|
||||
|
||||
// Global pool for nsRegion::RgnRect allocation
|
||||
mozilla::ThreadLocal<RgnRectMemoryAllocator*> gRectPoolTlsIndex;
|
||||
static PRUintn gRectPoolTlsIndex;
|
||||
|
||||
void RgnRectMemoryAllocatorDTOR(void *priv)
|
||||
{
|
||||
RgnRectMemoryAllocator* allocator = gRectPoolTlsIndex.get();
|
||||
RgnRectMemoryAllocator* allocator = (static_cast<RgnRectMemoryAllocator*>(
|
||||
PR_GetThreadPrivate(gRectPoolTlsIndex)));
|
||||
delete allocator;
|
||||
}
|
||||
|
||||
nsresult nsRegion::InitStatic()
|
||||
{
|
||||
return gRectPoolTlsIndex.init() ? NS_OK : NS_ERROR_FAILURE;
|
||||
return PR_NewThreadPrivateIndex(&gRectPoolTlsIndex, RgnRectMemoryAllocatorDTOR);
|
||||
}
|
||||
|
||||
void nsRegion::ShutdownStatic()
|
||||
{
|
||||
RgnRectMemoryAllocator* allocator = gRectPoolTlsIndex.get();
|
||||
RgnRectMemoryAllocator* allocator = (static_cast<RgnRectMemoryAllocator*>(
|
||||
PR_GetThreadPrivate(gRectPoolTlsIndex)));
|
||||
if (!allocator)
|
||||
return;
|
||||
|
||||
delete allocator;
|
||||
|
||||
gRectPoolTlsIndex.set(nsnull);
|
||||
PR_SetThreadPrivate(gRectPoolTlsIndex, nsnull);
|
||||
}
|
||||
|
||||
void* nsRegion::RgnRect::operator new (size_t) CPP_THROW_NEW
|
||||
{
|
||||
RgnRectMemoryAllocator* allocator = gRectPoolTlsIndex.get();
|
||||
RgnRectMemoryAllocator* allocator = (static_cast<RgnRectMemoryAllocator*>(
|
||||
PR_GetThreadPrivate(gRectPoolTlsIndex)));
|
||||
if (!allocator) {
|
||||
allocator = new RgnRectMemoryAllocator(INIT_MEM_CHUNK_ENTRIES);
|
||||
gRectPoolTlsIndex.set(allocator);
|
||||
PR_SetThreadPrivate(gRectPoolTlsIndex, allocator);
|
||||
}
|
||||
return allocator->Alloc ();
|
||||
}
|
||||
|
||||
void nsRegion::RgnRect::operator delete (void* aRect, size_t)
|
||||
{
|
||||
RgnRectMemoryAllocator* allocator = gRectPoolTlsIndex.get();
|
||||
RgnRectMemoryAllocator* allocator = (static_cast<RgnRectMemoryAllocator*>(
|
||||
PR_GetThreadPrivate(gRectPoolTlsIndex)));
|
||||
if (!allocator) {
|
||||
NS_ERROR("Invalid nsRegion::RgnRect delete");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user