Back out ebc291b18b35:eaf6e83e80fe (bug 946532) for non-unified Windows bustage
authorPhil Ringnalda <philringnalda@gmail.com>
Sun, 08 Dec 2013 15:24:42 -0800
changeset 174157 eb2a2c686cc7f098fb568f8d7a72cd5061231fda
parent 174156 052685e62b342c87522a53665cf2e0080f7e93ec
child 174158 86ce0ae55c5dd0db6e93b8a5c9424f111b52c35a
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs946532
milestone28.0a1
backs outebc291b18b352496d8a565baa2fc577f5688608c
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
Back out ebc291b18b35:eaf6e83e80fe (bug 946532) for non-unified Windows bustage CLOSED TREE
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -3509,66 +3509,44 @@ nsWindow::OverrideSystemMouseScrollSpeed
   }
   return NS_OK;
 }
 
 mozilla::TemporaryRef<mozilla::gfx::DrawTarget>
 nsWindow::StartRemoteDrawing()
 {
   MOZ_ASSERT(!mCompositeDC);
-  NS_ASSERTION(IsRenderMode(gfxWindowsPlatform::RENDER_DIRECT2D) ||
-               IsRenderMode(gfxWindowsPlatform::RENDER_GDI),
-               "Unexpected render mode for remote drawing");
 
   HDC dc = (HDC)GetNativeData(NS_NATIVE_GRAPHIC);
-  nsRefPtr<gfxASurface> surf;
-
-  if (mTransparencyMode == eTransparencyTransparent) {
-    if (!mTransparentSurface) {
-      SetupTranslucentWindowMemoryBitmap(mTransparencyMode);
-    }
-    if (mTransparentSurface) {
-      surf = mTransparentSurface;
-    }
-  } 
-  
-  if (!surf) {
-    if (!dc) {
-      return nullptr;
-    }
-    uint32_t flags = (mTransparencyMode == eTransparencyOpaque) ? 0 :
-        gfxWindowsSurface::FLAG_IS_TRANSPARENT;
-    surf = new gfxWindowsSurface(dc, flags);
-  }
+  if (!dc) {
+    return nullptr;
+  }
+
+  uint32_t flags = (mTransparencyMode == eTransparencyOpaque) ? 0 :
+      gfxWindowsSurface::FLAG_IS_TRANSPARENT;
+  nsRefPtr<gfxASurface> surf = new gfxWindowsSurface(dc, flags);
 
   mozilla::gfx::IntSize size(surf->GetSize().width, surf->GetSize().height);
   if (size.width <= 0 || size.height <= 0) {
-    if (dc) {
-      FreeNativeData(dc, NS_NATIVE_GRAPHIC);
-    }
+    FreeNativeData(dc, NS_NATIVE_GRAPHIC);
     return nullptr;
   }
 
   MOZ_ASSERT(!mCompositeDC);
   mCompositeDC = dc;
 
   return mozilla::gfx::Factory::CreateDrawTargetForCairoSurface(surf->CairoSurface(), size);
 }
 
 void
 nsWindow::EndRemoteDrawing()
 {
-  if (mTransparencyMode == eTransparencyTransparent) {
-    MOZ_ASSERT(IsRenderMode(gfxWindowsPlatform::RENDER_DIRECT2D)
-               || mTransparentSurface);
-    UpdateTranslucentWindow();
-  }
-  if (mCompositeDC) {
-    FreeNativeData(mCompositeDC, NS_NATIVE_GRAPHIC);
-  }
+  MOZ_ASSERT(mCompositeDC);
+  UpdateTranslucentWindow();
+  FreeNativeData(mCompositeDC, NS_NATIVE_GRAPHIC);
   mCompositeDC = nullptr;
 }
 
 /**************************************************************
  **************************************************************
  **
  ** BLOCK: Moz Events
  **