mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out ebc291b18b35:eaf6e83e80fe (bug 946532) for non-unified Windows bustage
CLOSED TREE
This commit is contained in:
parent
af8e5172d6
commit
9c9133624d
@ -3514,36 +3514,19 @@ mozilla::TemporaryRef<mozilla::gfx::DrawTarget>
|
||||
nsWindow::StartRemoteDrawing()
|
||||
{
|
||||
MOZ_ASSERT(!mCompositeDC);
|
||||
NS_ASSERTION(IsRenderMode(gfxWindowsPlatform::RENDER_DIRECT2D) ||
|
||||
IsRenderMode(gfxWindowsPlatform::RENDER_GDI),
|
||||
"Unexpected render mode for remote drawing");
|
||||
|
||||
HDC dc = (HDC)GetNativeData(NS_NATIVE_GRAPHIC);
|
||||
nsRefPtr<gfxASurface> surf;
|
||||
|
||||
if (mTransparencyMode == eTransparencyTransparent) {
|
||||
if (!mTransparentSurface) {
|
||||
SetupTranslucentWindowMemoryBitmap(mTransparencyMode);
|
||||
}
|
||||
if (mTransparentSurface) {
|
||||
surf = mTransparentSurface;
|
||||
}
|
||||
}
|
||||
|
||||
if (!surf) {
|
||||
if (!dc) {
|
||||
return nullptr;
|
||||
}
|
||||
uint32_t flags = (mTransparencyMode == eTransparencyOpaque) ? 0 :
|
||||
gfxWindowsSurface::FLAG_IS_TRANSPARENT;
|
||||
surf = new gfxWindowsSurface(dc, flags);
|
||||
if (!dc) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
uint32_t flags = (mTransparencyMode == eTransparencyOpaque) ? 0 :
|
||||
gfxWindowsSurface::FLAG_IS_TRANSPARENT;
|
||||
nsRefPtr<gfxASurface> surf = new gfxWindowsSurface(dc, flags);
|
||||
|
||||
mozilla::gfx::IntSize size(surf->GetSize().width, surf->GetSize().height);
|
||||
if (size.width <= 0 || size.height <= 0) {
|
||||
if (dc) {
|
||||
FreeNativeData(dc, NS_NATIVE_GRAPHIC);
|
||||
}
|
||||
FreeNativeData(dc, NS_NATIVE_GRAPHIC);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -3556,14 +3539,9 @@ nsWindow::StartRemoteDrawing()
|
||||
void
|
||||
nsWindow::EndRemoteDrawing()
|
||||
{
|
||||
if (mTransparencyMode == eTransparencyTransparent) {
|
||||
MOZ_ASSERT(IsRenderMode(gfxWindowsPlatform::RENDER_DIRECT2D)
|
||||
|| mTransparentSurface);
|
||||
UpdateTranslucentWindow();
|
||||
}
|
||||
if (mCompositeDC) {
|
||||
FreeNativeData(mCompositeDC, NS_NATIVE_GRAPHIC);
|
||||
}
|
||||
MOZ_ASSERT(mCompositeDC);
|
||||
UpdateTranslucentWindow();
|
||||
FreeNativeData(mCompositeDC, NS_NATIVE_GRAPHIC);
|
||||
mCompositeDC = nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user