Bug 1131840 - Propagate the EventRegionsOverride flag on RefLayers also. r=roc
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 16 Feb 2015 21:30:02 -0500
changeset 229420 23c78316747f971604118a0b10e213b0ecf316c8
parent 229419 34a3bc7200c191371137cdea16cd61ec1ffb2497
child 229421 93fb431c34649a8b742a4a35c94901c6b4fa5f5b
push id11352
push userryanvm@gmail.com
push dateTue, 17 Feb 2015 19:29:37 +0000
treeherderfx-team@b6c56fab513d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1131840
milestone38.0a1
Bug 1131840 - Propagate the EventRegionsOverride flag on RefLayers also. r=roc
gfx/layers/Layers.cpp
gfx/layers/ipc/LayerTransactionParent.cpp
gfx/layers/ipc/LayersMessages.ipdlh
--- a/gfx/layers/Layers.cpp
+++ b/gfx/layers/Layers.cpp
@@ -1269,17 +1269,17 @@ ContainerLayer::DidInsertChild(Layer* aL
   if (aLayer->GetType() == TYPE_READBACK) {
     mMayHaveReadbackChild = true;
   }
 }
 
 void
 RefLayer::FillSpecificAttributes(SpecificLayerAttributes& aAttrs)
 {
-  aAttrs = RefLayerAttributes(GetReferentId());
+  aAttrs = RefLayerAttributes(GetReferentId(), mEventRegionsOverride);
 }
 
 /** 
  * StartFrameTimeRecording, together with StopFrameTimeRecording
  * enable recording of frame intervals.
  *
  * To allow concurrent consumers, a cyclic array is used which serves all
  * consumers, practically stateless with regard to consumers.
--- a/gfx/layers/ipc/LayerTransactionParent.cpp
+++ b/gfx/layers/ipc/LayerTransactionParent.cpp
@@ -423,16 +423,17 @@ LayerTransactionParent::RecvUpdate(Infal
       case Specific::TRefLayerAttributes: {
         MOZ_LAYERS_LOG(("[ParentSide]   ref layer"));
 
         RefLayerComposite* refLayer = layerParent->AsRefLayerComposite();
         if (!refLayer) {
           return false;
         }
         refLayer->SetReferentId(specific.get_RefLayerAttributes().id());
+        refLayer->SetEventRegionsOverride(specific.get_RefLayerAttributes().eventRegionsOverride());
         break;
       }
       case Specific::TImageLayerAttributes: {
         MOZ_LAYERS_LOG(("[ParentSide]   image layer"));
 
         ImageLayerComposite* imageLayer = layerParent->AsImageLayerComposite();
         if (!imageLayer) {
           return false;
--- a/gfx/layers/ipc/LayersMessages.ipdlh
+++ b/gfx/layers/ipc/LayersMessages.ipdlh
@@ -238,17 +238,22 @@ struct ContainerLayerAttributes {
   EventRegionsOverride eventRegionsOverride;
   // This is a bare pointer; LayerTransactionParent::RecvUpdate prevents this
   // from being used when !IsSameProcess(), but we should make this truly
   // cross process at some point by passing the HMDConfig
   uint64_t hmdInfo;
 };
 struct ColorLayerAttributes     { LayerColor color; nsIntRect bounds; };
 struct CanvasLayerAttributes    { GraphicsFilterType filter; nsIntRect bounds; };
-struct RefLayerAttributes       { int64_t id; };
+struct RefLayerAttributes {
+  int64_t id;
+  // TODO: Once bug 1132895 is fixed we shouldn't need to propagate the override
+  // explicitly here.
+  EventRegionsOverride eventRegionsOverride;
+};
 struct ImageLayerAttributes     { GraphicsFilterType filter; IntSize scaleToSize; ScaleMode scaleMode; };
 
 union SpecificLayerAttributes {
   null_t;
   PaintedLayerAttributes;
   ContainerLayerAttributes;
   ColorLayerAttributes;
   CanvasLayerAttributes;