Bug 806406: Remove some lingering references to gfxD2DSurface. r=jrmuizel

This commit is contained in:
Bas Schouten 2014-02-13 02:59:12 +01:00
parent c0aac862cd
commit 22ff6636d9
4 changed files with 1 additions and 60 deletions

View File

@ -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<gfxD2DSurface*>(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();

View File

@ -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<gfxD2DSurface> mD2DWindowSurface; // Surface for this window.
#endif
// Transparency
#ifdef MOZ_XUL
// Use layered windows to support full 256 level alpha translucency

View File

@ -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<gfxWindowsSurface> 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))

View File

@ -8,7 +8,6 @@
#include "MetroWidget.h"
#include "MetroInput.h"
#include "gfxWindowsPlatform.h"
#include "gfxD2DSurface.h"
#include "nsDataHashtable.h"
#include "mozwrlbase.h"