Bug 1121811 - Fix redraw loop regression causing mac plugins to draw at 60 FPS. r=josh, a=lmandel
authorBenoit Girard <b56girard@gmail.com>
Wed, 21 Jan 2015 14:02:32 -0500
changeset 249564 4811407460e6a3d438a324ab299456dafc4c0844
parent 249563 8f3d1a85d073ac0a9b89e66a9579e39e424a5a62
child 249565 2e9b093db1fb3f0abd8dc5f93839bd495374551a
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjosh, lmandel
bugs1121811
milestone37.0a2
Bug 1121811 - Fix redraw loop regression causing mac plugins to draw at 60 FPS. r=josh, a=lmandel
layout/generic/nsPluginFrame.cpp
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -998,29 +998,31 @@ void
 nsPluginFrame::NotifyPluginReflowObservers()
 {
   nsContentUtils::AddScriptRunner(new PluginEventNotifier(NS_LITERAL_STRING("reflow")));
 }
 
 void
 nsPluginFrame::DidSetWidgetGeometry()
 {
-#ifndef XP_MACOSX
+#if defined(XP_MACOSX)
+  if (mInstanceOwner) {
+    mInstanceOwner->FixUpPluginWindow(nsPluginInstanceOwner::ePluginPaintEnable);
+  }
+#else
   if (!mWidget && mInstanceOwner) {
     // UpdateWindowVisibility will notify the plugin of position changes
     // by updating the NPWindow and calling NPP_SetWindow/AsyncSetWindow.
     // We treat windowless plugins inside popups as always visible, since
     // plugins inside popups don't get valid mNextConfigurationBounds
     // set up.
     mInstanceOwner->UpdateWindowVisibility(
       nsLayoutUtils::IsPopup(nsLayoutUtils::GetDisplayRootFrame(this)) ||
       !mNextConfigurationBounds.IsEmpty());
   }
-#else
-  CallSetWindow(false);
 #endif
 }
 
 bool
 nsPluginFrame::IsOpaque() const
 {
 #if defined(XP_MACOSX)
   return false;