mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1023522 - Get rid of the remaining Thebes backed gfxContexts in the Windows widget code. r=mattwoodrow
This commit is contained in:
parent
4ee9bd8ce2
commit
e0cf315c57
@ -54,6 +54,8 @@
|
||||
**************************************************************
|
||||
**************************************************************/
|
||||
|
||||
#include "gfx2DGlue.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "mozilla/MathAlgorithms.h"
|
||||
#include "mozilla/MiscEvents.h"
|
||||
#include "mozilla/MouseEvents.h"
|
||||
@ -184,6 +186,7 @@
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::gfx;
|
||||
using namespace mozilla::layers;
|
||||
using namespace mozilla::widget;
|
||||
|
||||
@ -7002,9 +7005,10 @@ void nsWindow::SetupTranslucentWindowMemoryBitmap(nsTransparencyMode aMode)
|
||||
void nsWindow::ClearTranslucentWindow()
|
||||
{
|
||||
if (mTransparentSurface) {
|
||||
nsRefPtr<gfxContext> thebesContext = new gfxContext(mTransparentSurface);
|
||||
thebesContext->SetOperator(gfxContext::OPERATOR_CLEAR);
|
||||
thebesContext->Paint();
|
||||
IntSize size = ToIntSize(mTransparentSurface->GetSize());
|
||||
RefPtr<DrawTarget> drawTarget = gfxPlatform::GetPlatform()->
|
||||
CreateDrawTargetForSurface(mTransparentSurface, size);
|
||||
drawTarget->ClearRect(Rect(0, 0, size.width, size.height));
|
||||
UpdateTranslucentWindow();
|
||||
}
|
||||
}
|
||||
|
@ -368,18 +368,13 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
|
||||
return false;
|
||||
}
|
||||
|
||||
nsRefPtr<gfxContext> thebesContext;
|
||||
if (gfxPlatform::GetPlatform()->SupportsAzureContentForType(mozilla::gfx::BackendType::CAIRO)) {
|
||||
RECT paintRect;
|
||||
::GetClientRect(mWnd, &paintRect);
|
||||
RefPtr<mozilla::gfx::DrawTarget> dt =
|
||||
gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(targetSurface,
|
||||
mozilla::gfx::IntSize(paintRect.right - paintRect.left,
|
||||
paintRect.bottom - paintRect.top));
|
||||
thebesContext = new gfxContext(dt);
|
||||
} else {
|
||||
thebesContext = new gfxContext(targetSurface);
|
||||
}
|
||||
RECT paintRect;
|
||||
::GetClientRect(mWnd, &paintRect);
|
||||
RefPtr<DrawTarget> dt =
|
||||
gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(targetSurface,
|
||||
IntSize(paintRect.right - paintRect.left,
|
||||
paintRect.bottom - paintRect.top));
|
||||
nsRefPtr<gfxContext> thebesContext = new gfxContext(dt);
|
||||
|
||||
// don't need to double buffer with anything but GDI
|
||||
BufferMode doubleBuffering = mozilla::layers::BufferMode::BUFFER_NONE;
|
||||
|
Loading…
Reference in New Issue
Block a user