diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index f29699fddda..ccde0dcca72 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -3343,11 +3343,6 @@ nsWindow::GetLayerManager(PLayerTransactionChild* aShadowManager, gfxASurface *nsWindow::GetThebesSurface() { -#ifdef CAIRO_HAS_D2D_SURFACE - if (mD2DWindowSurface) { - return mD2DWindowSurface; - } -#endif if (mPaintDC) return (new gfxWindowsSurface(mPaintDC)); @@ -6442,13 +6437,6 @@ void nsWindow::OnDestroy() // Send a resize message to the listener bool nsWindow::OnResize(nsIntRect &aWindowRect) { -#ifdef CAIRO_HAS_D2D_SURFACE - if (mD2DWindowSurface) { - mD2DWindowSurface = nullptr; - Invalidate(); - } -#endif - bool result = mWidgetListener ? mWidgetListener->WindowResized(this, aWindowRect.width, aWindowRect.height) : false; @@ -6836,14 +6824,6 @@ nsresult nsWindow::UpdateTranslucentWindow() ::UpdateLayeredWindow(hWnd, nullptr, (POINT*)&winRect, &winSize, mMemoryDC, &srcPos, 0, &bf, ULW_ALPHA); -#ifdef CAIRO_HAS_D2D_SURFACE - if (gfxWindowsPlatform::GetPlatform()->GetRenderMode() == - gfxWindowsPlatform::RENDER_DIRECT2D) { - nsIntRect r(0, 0, 0, 0); - static_cast(mTransparentSurface.get())->ReleaseDC(&r); - } -#endif - if (!updateSuccesful) { return NS_ERROR_FAILURE; } @@ -7091,9 +7071,6 @@ BOOL CALLBACK nsWindow::ClearResourcesCallback(HWND aWnd, LPARAM aMsg) void nsWindow::ClearCachedResources() { -#ifdef CAIRO_HAS_D2D_SURFACE - mD2DWindowSurface = nullptr; -#endif if (mLayerManager && mLayerManager->GetBackendType() == LayersBackend::LAYERS_BASIC) { mLayerManager->ClearCachedResources(); diff --git a/widget/windows/nsWindow.h b/widget/windows/nsWindow.h index cc41f98d93a..91229de428f 100644 --- a/widget/windows/nsWindow.h +++ b/widget/windows/nsWindow.h @@ -29,10 +29,6 @@ #include "mozilla/TimeStamp.h" #include "nsMargin.h" -#ifdef CAIRO_HAS_D2D_SURFACE -#include "gfxD2DSurface.h" -#endif - #include "nsWinGesture.h" #include "WindowHook.h" @@ -548,10 +544,6 @@ protected: nsIntRect mLastPaintBounds; -#ifdef CAIRO_HAS_D2D_SURFACE - nsRefPtr mD2DWindowSurface; // Surface for this window. -#endif - // Transparency #ifdef MOZ_XUL // Use layered windows to support full 256 level alpha translucency diff --git a/widget/windows/nsWindowGfx.cpp b/widget/windows/nsWindowGfx.cpp index 8eb49da8677..4579f52d9ef 100644 --- a/widget/windows/nsWindowGfx.cpp +++ b/widget/windows/nsWindowGfx.cpp @@ -323,27 +323,6 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel) } #endif -#ifdef CAIRO_HAS_D2D_SURFACE - if (!targetSurface && - IsRenderMode(gfxWindowsPlatform::RENDER_DIRECT2D)) - { - if (!mD2DWindowSurface) { - gfxContentType content = gfxContentType::COLOR; -#if defined(MOZ_XUL) - if (mTransparencyMode != eTransparencyOpaque) { - content = gfxContentType::COLOR_ALPHA; - } -#endif - mD2DWindowSurface = new gfxD2DSurface(mWnd, content); - } - if (!mD2DWindowSurface->CairoStatus()) { - targetSurface = mD2DWindowSurface; - } else { - mD2DWindowSurface = nullptr; - } - } -#endif - nsRefPtr targetSurfaceWin; if (!targetSurface && (IsRenderMode(gfxWindowsPlatform::RENDER_GDI) || @@ -451,13 +430,7 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel) UpdateTranslucentWindow(); } else #endif -#ifdef CAIRO_HAS_D2D_SURFACE - if (result) { - if (mD2DWindowSurface) { - mD2DWindowSurface->Present(); - } - } -#endif + if (result) { if (IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_STRETCH24) || IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_STRETCH32)) diff --git a/widget/windows/winrt/FrameworkView.h b/widget/windows/winrt/FrameworkView.h index d95d8e1ad20..3d7748a9b1c 100644 --- a/widget/windows/winrt/FrameworkView.h +++ b/widget/windows/winrt/FrameworkView.h @@ -8,7 +8,6 @@ #include "MetroWidget.h" #include "MetroInput.h" #include "gfxWindowsPlatform.h" -#include "gfxD2DSurface.h" #include "nsDataHashtable.h" #include "mozwrlbase.h"