Bug 1335895 - part 19: Update WebRenderBridgeParent.cpp to fix the way the first paint event is sent to the Android UI thread r=kats draft
authorRandall Barker <rbarker@mozilla.com>
Thu, 06 Apr 2017 13:19:50 -0700
changeset 561585 9f1faa111e53c4d216e8e3766e4975f4d1093abf
parent 561584 90e1853062c65689cec5d675aa253a03c10911d9
child 561586 269193854e69bb66b876a8f7c3e7308bab78ae96
push id53787
push userbmo:rbarker@mozilla.com
push dateWed, 12 Apr 2017 22:56:58 +0000
reviewerskats
bugs1335895
milestone55.0a1
Bug 1335895 - part 19: Update WebRenderBridgeParent.cpp to fix the way the first paint event is sent to the Android UI thread r=kats
gfx/layers/wr/WebRenderBridgeParent.cpp
--- a/gfx/layers/wr/WebRenderBridgeParent.cpp
+++ b/gfx/layers/wr/WebRenderBridgeParent.cpp
@@ -138,19 +138,19 @@ WebRenderBridgeParent::RecvCreate(const 
     return IPC_OK();
   }
 
   MOZ_ASSERT(mApi);
 
 #ifdef MOZ_WIDGET_ANDROID
   // XXX temporary hack.
   // XXX Remove it when APZ is supported.
-  widget::AndroidCompositorWidget* widget = mWidget->AsAndroid();
-  if (widget) {
-    widget->SetFirstPaintViewport(LayerIntPoint(0, 0), CSSToLayerScale(), CSSRect(0, 0, aSize.width, aSize.height));
+  RefPtr<UiCompositorControllerParent> uiController = UiCompositorControllerParent::GetFromRootLayerTreeId(mCompositorBridge->GetRootLayerTreeId());
+  if (uiController) {
+    uiController->ToolbarAnimatorMessageFromCompositor(/*FIRST_PAINT*/ 5);
   }
 #endif
 
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 WebRenderBridgeParent::RecvShutdown()