From bde98f5bfb2e005b64c45d70c1e2c7d86968ba64 Mon Sep 17 00:00:00 2001 From: Doug Turner Date: Tue, 23 Jun 2009 16:35:40 -0700 Subject: [PATCH] Bug 495298 - DirectDraw render mode for windows mobile. Build bustage fix on systems that do not have ddraw support. --- widget/src/windows/nsWindow.cpp | 4 ++++ widget/src/windows/nsWindow.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/widget/src/windows/nsWindow.cpp b/widget/src/windows/nsWindow.cpp index 29bdecc07dfa..c059492b8890 100644 --- a/widget/src/windows/nsWindow.cpp +++ b/widget/src/windows/nsWindow.cpp @@ -5963,9 +5963,11 @@ InitDDraw() PRBool nsWindow::OnPaint(HDC aDC) { +#ifdef CAIRO_HAS_DDRAW_SURFACE if (gRenderMode == RENDER_IMAGE_DDRAW16) { return OnPaintImageDDraw16(); } +#endif PRBool result = PR_TRUE; PAINTSTRUCT ps; @@ -6366,6 +6368,7 @@ DDRAW_FAILED: return result; } +#ifdef CAIRO_HAS_DDRAW_SURFACE // Windows Mobile Special image/direct draw painting fun PRBool nsWindow::OnPaintImageDDraw16() { @@ -6594,6 +6597,7 @@ cleanup: mPainting = PR_FALSE; return result; } +#endif //------------------------------------------------------------------------- // diff --git a/widget/src/windows/nsWindow.h b/widget/src/windows/nsWindow.h index 133612be4fb9..dcf15139a55f 100644 --- a/widget/src/windows/nsWindow.h +++ b/widget/src/windows/nsWindow.h @@ -339,7 +339,9 @@ protected: virtual void OnDestroy(); virtual PRBool OnMove(PRInt32 aX, PRInt32 aY); virtual PRBool OnPaint(HDC aDC = nsnull); +#ifdef CAIRO_HAS_DDRAW_SURFACE PRBool OnPaintImageDDraw16(); +#endif virtual PRBool OnResize(nsIntRect &aWindowRect);