Bug 1455488. Blend modes are container items. r=mstange draft
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Mon, 23 Apr 2018 17:38:38 -0400
changeset 786810 e1dcad15dc45ab9d3496acc786bd9ecab7db0118
parent 786770 bfc5f524402eb6545090da94477c2409b0be4252
push id107578
push userbmo:jmuizelaar@mozilla.com
push dateMon, 23 Apr 2018 21:41:23 +0000
reviewersmstange
bugs1455488
milestone61.0a1
Bug 1455488. Blend modes are container items. r=mstange BLEND_MODE and BLEND_CONTAINER wrap items so their bounds can change. We need to account for that like we do with OPACTIY etc.
gfx/layers/wr/WebRenderCommandBuilder.cpp
--- a/gfx/layers/wr/WebRenderCommandBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -214,16 +214,18 @@ struct Grouper
 static bool
 IsContainerLayerItem(nsDisplayItem* aItem)
 {
   switch (aItem->GetType()) {
     case DisplayItemType::TYPE_TRANSFORM:
     case DisplayItemType::TYPE_LAYER_EVENT_REGIONS:
     case DisplayItemType::TYPE_OPACITY:
     case DisplayItemType::TYPE_FILTER:
+    case DisplayItemType::TYPE_BLEND_CONTAINER:
+    case DisplayItemType::TYPE_BLEND_MODE:
     case DisplayItemType::TYPE_MASK: {
       return true;
     }
     default: {
       return false;
     }
   }
 }