Bug 614721 - Remove some DirectDraw left overs. r=joedrew,jrmuizel
authorMatheus Kerschbaum <matjk7@gmail.com>
Fri, 10 Jun 2011 18:27:01 +0200
changeset 70879 635d71b87150506a97b1cbdcea901b5415b4dccb
parent 70878 e109c624ae001f2fa0f0d262e64ad4a2a655717e
child 70880 b735bb9178c15c769ad874b51358af590b1aac8b
push id20435
push usereakhgari@mozilla.com
push dateFri, 10 Jun 2011 20:08:22 +0000
treeherdermozilla-central@28217403cd02 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoedrew, jrmuizel
bugs614721
milestone7.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 614721 - Remove some DirectDraw left overs. r=joedrew,jrmuizel
gfx/cairo/d2d.patch
gfx/thebes/gfxWindowsPlatform.cpp
gfx/thebes/gfxWindowsPlatform.h
widget/src/windows/nsWindowGfx.cpp
--- a/gfx/cairo/d2d.patch
+++ b/gfx/cairo/d2d.patch
@@ -409,22 +409,21 @@ index 3a8b8a6..21827aa 100644
      CAIRO_FONT_TYPE_WIN32,
      CAIRO_FONT_TYPE_QUARTZ,
 -    CAIRO_FONT_TYPE_USER
 +    CAIRO_FONT_TYPE_USER,
 +    CAIRO_FONT_TYPE_DWRITE
  } cairo_font_type_t;
  
  cairo_public cairo_font_type_t
-@@ -2009,7 +2010,8 @@ typedef enum _cairo_surface_type {
+@@ -2009,7 +2010,7 @@ typedef enum _cairo_surface_type {
      CAIRO_SURFACE_TYPE_TEE,
      CAIRO_SURFACE_TYPE_XML,
      CAIRO_SURFACE_TYPE_SKIA,
 -    CAIRO_SURFACE_TYPE_DDRAW
-+    CAIRO_SURFACE_TYPE_DDRAW,
 +    CAIRO_SURFACE_TYPE_D2D
  } cairo_surface_type_t;
  
  cairo_public cairo_surface_type_t
 diff --git a/src/cairoint.h b/src/cairoint.h
 index b942b4b..58850ab 100644
 --- a/src/cairoint.h
 +++ b/src/cairoint.h
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -263,26 +263,20 @@ gfxWindowsPlatform::~gfxWindowsPlatform(
      * Uninitialize COM 
      */ 
     CoUninitialize();
 }
 
 void
 gfxWindowsPlatform::UpdateRenderMode()
 {
-/* Pick the default render mode differently between
- * desktop, Windows Mobile, and Windows CE.
+/* Pick the default render mode for
+ * desktop.
  */
-#if defined(WINCE_WINDOWS_MOBILE)
-    mRenderMode = RENDER_IMAGE_DDRAW16;
-#elif defined(WINCE)
-    mRenderMode = RENDER_DDRAW_GL;
-#else
     mRenderMode = RENDER_GDI;
-#endif
 
     OSVERSIONINFOA versionInfo;
     versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
     ::GetVersionExA(&versionInfo);
     bool isVistaOrHigher = versionInfo.dwMajorVersion >= 6;
 
     PRBool safeMode = PR_FALSE;
     nsCOMPtr<nsIXULRuntime> xr = do_GetService("@mozilla.org/xre/runtime;1");
--- a/gfx/thebes/gfxWindowsPlatform.h
+++ b/gfx/thebes/gfxWindowsPlatform.h
@@ -145,25 +145,16 @@ public:
         RENDER_GDI = 0,
 
         /* Use 32bpp image surfaces and call StretchDIBits */
         RENDER_IMAGE_STRETCH32,
 
         /* Use 32bpp image surfaces, and do 32->24 conversion before calling StretchDIBits */
         RENDER_IMAGE_STRETCH24,
 
-        /* Use DirectDraw on Windows CE */
-        RENDER_DDRAW,
-
-        /* Use 24bpp image surfaces, with final DirectDraw 16bpp blt on Windows CE */
-        RENDER_IMAGE_DDRAW16,
-
-        /* Use DirectDraw with OpenGL on Windows CE */
-        RENDER_DDRAW_GL,
-
         /* Use Direct2D rendering */
         RENDER_DIRECT2D,
 
         /* max */
         RENDER_MODE_MAX
     };
 
     RenderMode GetRenderMode() { return mRenderMode; }
--- a/widget/src/windows/nsWindowGfx.cpp
+++ b/widget/src/windows/nsWindowGfx.cpp
@@ -441,21 +441,18 @@ PRBool nsWindow::OnPaint(HDC aDC, PRUint
 #ifdef CAIRO_HAS_D2D_SURFACE
           if (result) {
             if (mD2DWindowSurface) {
               mD2DWindowSurface->Present();
             }
           }
 #endif
           if (result) {
-            if (IsRenderMode(gfxWindowsPlatform::RENDER_DDRAW) ||
-                       IsRenderMode(gfxWindowsPlatform::RENDER_DDRAW_GL))
-            {
-            } else if (IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_STRETCH24) ||
-                       IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_STRETCH32)) 
+            if (IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_STRETCH24) ||
+                IsRenderMode(gfxWindowsPlatform::RENDER_IMAGE_STRETCH32))
             {
               gfxIntSize surfaceSize = targetSurfaceImage->GetSize();
 
               // Just blit this directly
               BITMAPINFOHEADER bi;
               memset(&bi, 0, sizeof(BITMAPINFOHEADER));
               bi.biSize = sizeof(BITMAPINFOHEADER);
               bi.biWidth = surfaceSize.width;