зеркало из https://github.com/mozilla/gecko-dev.git
Bug 577200. Part 2: When painting a Win32 transparent widget with GDI (Aero Glass), tell gfxWindowsSurface our HDC surface is transparent. r=roc
This commit is contained in:
Родитель
7b063ed632
Коммит
8375ae3268
|
@ -63,7 +63,11 @@ gfxWindowsSurface::gfxWindowsSurface(HDC dc, PRUint32 flags) :
|
|||
mForPrinting = PR_TRUE;
|
||||
} else
|
||||
#endif
|
||||
if (flags & FLAG_IS_TRANSPARENT) {
|
||||
Init(cairo_win32_surface_create_with_alpha(mDC));
|
||||
} else {
|
||||
Init(cairo_win32_surface_create(mDC));
|
||||
}
|
||||
}
|
||||
|
||||
gfxWindowsSurface::gfxWindowsSurface(const gfxIntSize& size, gfxImageFormat imageFormat) :
|
||||
|
|
|
@ -49,7 +49,8 @@ class THEBES_API gfxWindowsSurface : public gfxASurface {
|
|||
public:
|
||||
enum {
|
||||
FLAG_TAKE_DC = (1 << 0),
|
||||
FLAG_FOR_PRINTING = (1 << 1)
|
||||
FLAG_FOR_PRINTING = (1 << 1),
|
||||
FLAG_IS_TRANSPARENT = (1 << 2),
|
||||
};
|
||||
|
||||
gfxWindowsSurface(HWND wnd);
|
||||
|
|
|
@ -436,7 +436,9 @@ PRBool nsWindow::OnPaint(HDC aDC)
|
|||
if (!targetSurface &&
|
||||
IsRenderMode(gfxWindowsPlatform::RENDER_GDI))
|
||||
{
|
||||
targetSurfaceWin = new gfxWindowsSurface(hDC);
|
||||
PRUint32 flags = (mTransparencyMode == eTransparencyOpaque) ? 0 :
|
||||
gfxWindowsSurface::FLAG_IS_TRANSPARENT;
|
||||
targetSurfaceWin = new gfxWindowsSurface(hDC, flags);
|
||||
targetSurface = targetSurfaceWin;
|
||||
}
|
||||
#ifdef CAIRO_HAS_D2D_SURFACE
|
||||
|
|
Загрузка…
Ссылка в новой задаче