mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Bug 907926 - Use the ClientArea when initializing the draw target in nsWindowGfx. r=Bas
This commit is contained in:
parent
5c0ccaac57
commit
a62154253e
@ -367,10 +367,12 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
|
||||
|
||||
nsRefPtr<gfxContext> thebesContext;
|
||||
if (gfxPlatform::GetPlatform()->SupportsAzureContentForType(mozilla::gfx::BACKEND_CAIRO)) {
|
||||
RECT paintRect;
|
||||
::GetClientRect(mWnd, &paintRect);
|
||||
RefPtr<mozilla::gfx::DrawTarget> dt =
|
||||
gfxPlatform::GetPlatform()->CreateDrawTargetForSurface(targetSurface,
|
||||
mozilla::gfx::IntSize(targetSurface->GetSize().width,
|
||||
targetSurface->GetSize().height));
|
||||
mozilla::gfx::IntSize(paintRect.right - paintRect.left,
|
||||
paintRect.bottom - paintRect.top));
|
||||
thebesContext = new gfxContext(dt);
|
||||
} else {
|
||||
thebesContext = new gfxContext(targetSurface);
|
||||
|
Loading…
Reference in New Issue
Block a user