mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 393662 - Removal of Old GFX and obsolete codes in nsBaseWidget.cpp p=Jonathan Steele <xfsunoles@gmail.com> r+sr+a=roc
This commit is contained in:
parent
84f65f4288
commit
0632352cd4
@ -612,13 +612,9 @@ nsIRenderingContext* nsBaseWidget::GetRenderingContext()
|
|||||||
|
|
||||||
rv = mContext->CreateRenderingContextInstance(*getter_AddRefs(renderingCtx));
|
rv = mContext->CreateRenderingContextInstance(*getter_AddRefs(renderingCtx));
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
#if defined(MOZ_CAIRO_GFX)
|
|
||||||
gfxASurface* surface = GetThebesSurface();
|
gfxASurface* surface = GetThebesSurface();
|
||||||
NS_ENSURE_TRUE(surface, nsnull);
|
NS_ENSURE_TRUE(surface, nsnull);
|
||||||
rv = renderingCtx->Init(mContext, surface);
|
rv = renderingCtx->Init(mContext, surface);
|
||||||
#else
|
|
||||||
rv = renderingCtx->Init(mContext, this);
|
|
||||||
#endif
|
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
nsIRenderingContext *ret = renderingCtx;
|
nsIRenderingContext *ret = renderingCtx;
|
||||||
/* Increment object refcount that the |ret| object is still a valid one
|
/* Increment object refcount that the |ret| object is still a valid one
|
||||||
@ -658,7 +654,6 @@ nsIDeviceContext* nsBaseWidget::GetDeviceContext()
|
|||||||
return mContext;
|
return mContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_CAIRO_GFX
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Get the thebes surface
|
// Get the thebes surface
|
||||||
@ -666,15 +661,11 @@ nsIDeviceContext* nsBaseWidget::GetDeviceContext()
|
|||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
gfxASurface *nsBaseWidget::GetThebesSurface()
|
gfxASurface *nsBaseWidget::GetThebesSurface()
|
||||||
{
|
{
|
||||||
nsIWidget *parent = GetParent();
|
|
||||||
if (!parent)
|
|
||||||
return nsnull;
|
|
||||||
|
|
||||||
// in theory we should get our parent's surface,
|
// in theory we should get our parent's surface,
|
||||||
// clone it, and set a device offset before returning
|
// clone it, and set a device offset before returning
|
||||||
return nsnull;
|
return nsnull;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user