Bug 1231864 (part 1) - Remove useless GetCairo() call in gfxWindowsNativeDrawing::BeginNativeDrawing(). r=mattwoodrow.

GetCairo() never returns null so testing its result like this is pointless.
This commit is contained in:
Nicholas Nethercote 2015-12-14 14:59:33 -08:00
parent e09094f3cd
commit 7df55cf9f2

View File

@ -43,13 +43,9 @@ HDC
gfxWindowsNativeDrawing::BeginNativeDrawing()
{
if (mRenderState == RENDER_STATE_INIT) {
RefPtr<gfxASurface> surf;
if (mContext->GetCairo()) {
surf = mContext->CurrentSurface(&mDeviceOffset.x, &mDeviceOffset.y);
}
if (surf && surf->CairoStatus())
RefPtr<gfxASurface> surf =
mContext->CurrentSurface(&mDeviceOffset.x, &mDeviceOffset.y);
if (surf && surf->CairoStatus() != 0)
return nullptr;
gfxMatrix m = mContext->CurrentMatrix();