Bug 1358805 - part 1: Add new UiCompositorController message types TOOLBAR_SNAPSHOT_FAILED and IS_COMPOSITOR_CONTROLLER_OPEN r=kats draft
authorRandall Barker <rbarker@mozilla.com>
Tue, 25 Apr 2017 12:42:34 -0700
changeset 568202 e8bb73fcf44ec6ef12f4085d770f5d738695b083
parent 568201 a3b4b98b525b75f3276f9e226781ee4bcc1a33c0
child 568203 1a7f6f4132d1f5bbfb7f762fee6dc23b5efc005d
child 568265 056c9605bb04d998f47fd615f4fcfeabbd415e3b
push id55787
push userbmo:rbarker@mozilla.com
push dateTue, 25 Apr 2017 21:15:32 +0000
reviewerskats
bugs1358805
milestone55.0a1
Bug 1358805 - part 1: Add new UiCompositorController message types TOOLBAR_SNAPSHOT_FAILED and IS_COMPOSITOR_CONTROLLER_OPEN r=kats MozReview-Commit-ID: Ezd8Ng7Zsxm
gfx/layers/ipc/UiCompositorControllerMessageTypes.h
mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/LayerView.java
--- a/gfx/layers/ipc/UiCompositorControllerMessageTypes.h
+++ b/gfx/layers/ipc/UiCompositorControllerMessageTypes.h
@@ -22,15 +22,17 @@ enum UiCompositorControllerMessageTypes 
   TOOLBAR_VISIBLE                  = 3,  // Sent to compositor when the real toolbar has been made  visible
   TOOLBAR_SHOW                     = 4,  // Sent from compositor when the real toolbar should be shown
   FIRST_PAINT                      = 5,  // Sent from compositor after first paint
   REQUEST_SHOW_TOOLBAR_IMMEDIATELY = 6,  // Sent to the compositor when the snapshot should be shown immediately
   REQUEST_SHOW_TOOLBAR_ANIMATED    = 7,  // Sent to the compositor when the snapshot should be shown with an animation
   REQUEST_HIDE_TOOLBAR_IMMEDIATELY = 8,  // Sent to the compositor when the snapshot should be hidden immediately
   REQUEST_HIDE_TOOLBAR_ANIMATED    = 9,  // Sent to the compositor when the snapshot should be hidden with an animation
   LAYERS_UPDATED                   = 10, // Sent from the compositor when any layer has been updated
-  COMPOSITOR_CONTROLLER_OPEN       = 20  // Compositor controller IPC is open
+  TOOLBAR_SNAPSHOT_FAILED          = 11, // Sent to compositor when the toolbar snapshot fails.
+  COMPOSITOR_CONTROLLER_OPEN       = 20, // Compositor controller IPC is open
+  IS_COMPOSITOR_CONTROLLER_OPEN    = 21  // Special message sent from controller to query if the compositor controller is open
 };
 
 } // namespace layers
 } // namespace mozilla
 
 #endif // include_gfx_ipc_UiCompositorControllerMessageTypes_h
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/LayerView.java
@@ -83,18 +83,20 @@ public class LayerView extends FrameLayo
     /* package */ final static int TOOLBAR_HIDDEN                   = 2;  // Sent to compositor when the real toolbar has been hidden.
     /* package */ final static int TOOLBAR_VISIBLE                  = 3;  // Sent to compositor when the real toolbar is visible.
     /* package */ final static int TOOLBAR_SHOW                     = 4;  // Sent from compositor when the static toolbar has been made visible so the real toolbar should be shown.
     /* package */ final static int FIRST_PAINT                      = 5;  // Sent from compositor after first paint
     /* package */ final static int REQUEST_SHOW_TOOLBAR_IMMEDIATELY = 6;  // Sent to compositor requesting toolbar be shown immediately
     /* package */ final static int REQUEST_SHOW_TOOLBAR_ANIMATED    = 7;  // Sent to compositor requesting toolbar be shown animated
     /* package */ final static int REQUEST_HIDE_TOOLBAR_IMMEDIATELY = 8;  // Sent to compositor requesting toolbar be hidden immediately
     /* package */ final static int REQUEST_HIDE_TOOLBAR_ANIMATED    = 9;  // Sent to compositor requesting toolbar be hidden animated
-    /* package */ final static int LAYERS_UPDATED                    = 10; // Sent from compositor when a layer has been updated
+    /* package */ final static int LAYERS_UPDATED                   = 10; // Sent from compositor when a layer has been updated
+    /* package */ final static int TOOLBAR_SNAPSHOT_FAILED          = 11; // Sent to compositor when the toolbar snapshot fails.
     /* package */ final static int COMPOSITOR_CONTROLLER_OPEN       = 20; // Special message sent from UiCompositorControllerChild once it is open
+    /* package */ final static int IS_COMPOSITOR_CONTROLLER_OPEN    = 21; // Special message sent from controller to query if the compositor controller is open
 
     private void postCompositorMessage(final int message) {
         ThreadUtils.postToUiThread(new Runnable() {
             @Override
             public void run() {
                 mCompositor.sendToolbarAnimatorMessage(message);
             }
         });