mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 711063 - Part 5: Adjust gfxWindowsNativeDrawing to be compatible with Azure wrapper. r=jrmuizel
This commit is contained in:
parent
a8dc64fce4
commit
338c264807
@ -69,8 +69,13 @@ HDC
|
||||
gfxWindowsNativeDrawing::BeginNativeDrawing()
|
||||
{
|
||||
if (mRenderState == RENDER_STATE_INIT) {
|
||||
nsRefPtr<gfxASurface> surf = mContext->CurrentSurface(&mDeviceOffset.x, &mDeviceOffset.y);
|
||||
if (!surf || surf->CairoStatus())
|
||||
nsRefPtr<gfxASurface> surf;
|
||||
|
||||
if (mContext->GetCairo()) {
|
||||
surf = mContext->CurrentSurface(&mDeviceOffset.x, &mDeviceOffset.y);
|
||||
}
|
||||
|
||||
if (surf && surf->CairoStatus())
|
||||
return nsnull;
|
||||
|
||||
gfxMatrix m = mContext->CurrentMatrix();
|
||||
@ -84,11 +89,12 @@ gfxWindowsNativeDrawing::BeginNativeDrawing()
|
||||
// if this is a native win32 surface, we don't have to
|
||||
// redirect rendering to our own HDC; in some cases,
|
||||
// we may be able to use the HDC from the surface directly.
|
||||
if ((surf->GetType() == gfxASurface::SurfaceTypeWin32 ||
|
||||
surf->GetType() == gfxASurface::SurfaceTypeWin32Printing) &&
|
||||
(surf->GetContentType() == gfxASurface::CONTENT_COLOR ||
|
||||
(surf->GetContentType() == gfxASurface::CONTENT_COLOR_ALPHA &&
|
||||
(mNativeDrawFlags & CAN_DRAW_TO_COLOR_ALPHA))))
|
||||
if (surf &&
|
||||
((surf->GetType() == gfxASurface::SurfaceTypeWin32 ||
|
||||
surf->GetType() == gfxASurface::SurfaceTypeWin32Printing) &&
|
||||
(surf->GetContentType() == gfxASurface::CONTENT_COLOR ||
|
||||
(surf->GetContentType() == gfxASurface::CONTENT_COLOR_ALPHA &&
|
||||
(mNativeDrawFlags & CAN_DRAW_TO_COLOR_ALPHA)))))
|
||||
{
|
||||
// grab the DC. This can fail if there is a complex clipping path,
|
||||
// in which case we'll have to fall back.
|
||||
@ -208,11 +214,15 @@ gfxWindowsNativeDrawing::BeginNativeDrawing()
|
||||
bool
|
||||
gfxWindowsNativeDrawing::IsDoublePass()
|
||||
{
|
||||
if (!mContext->IsCairo()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
nsRefPtr<gfxASurface> surf = mContext->CurrentSurface(&mDeviceOffset.x, &mDeviceOffset.y);
|
||||
if (!surf || surf->CairoStatus())
|
||||
return false;
|
||||
if (surf->GetType() != gfxASurface::SurfaceTypeWin32 &&
|
||||
surf->GetType() != gfxASurface::SurfaceTypeWin32Printing) {
|
||||
surf->GetType() != gfxASurface::SurfaceTypeWin32Printing) {
|
||||
return true;
|
||||
}
|
||||
if ((surf->GetContentType() != gfxASurface::CONTENT_COLOR ||
|
||||
|
Loading…
Reference in New Issue
Block a user