LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - LayersSurfaces.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 129 885 14.6 %
Date: 2017-07-14 16:53:18 Functions: 24 170 14.1 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //
       2             : // Automatically generated by ipdlc.
       3             : // Edit at your own risk
       4             : //
       5             : 
       6             : 
       7             : #include "mozilla/layers/LayersSurfaces.h"
       8             : 
       9             : 
      10             : //-----------------------------------------------------------------------------
      11             : // Method definitions for the IPDL type |union OverlayHandle|
      12             : //
      13             : namespace mozilla {
      14             : namespace layers {
      15           0 : auto OverlayHandle::MaybeDestroy(Type aNewType) -> bool
      16             : {
      17           0 :     if ((mType) == (T__None)) {
      18           0 :         return true;
      19             :     }
      20           0 :     if ((mType) == (aNewType)) {
      21           0 :         return false;
      22             :     }
      23           0 :     switch (mType) {
      24             :     case Tint32_t:
      25             :         {
      26           0 :             (ptr_int32_t())->~int32_t__tdef();
      27           0 :             break;
      28             :         }
      29             :     case Tnull_t:
      30             :         {
      31           0 :             (ptr_null_t())->~null_t__tdef();
      32           0 :             break;
      33             :         }
      34             :     default:
      35             :         {
      36           0 :             mozilla::ipc::LogicError("not reached");
      37           0 :             break;
      38             :         }
      39             :     }
      40           0 :     return true;
      41             : }
      42             : 
      43           0 : MOZ_IMPLICIT OverlayHandle::OverlayHandle(const int32_t& aOther)
      44             : {
      45           0 :     new (mozilla::KnownNotNull, ptr_int32_t()) int32_t(aOther);
      46           0 :     mType = Tint32_t;
      47           0 : }
      48             : 
      49           0 : MOZ_IMPLICIT OverlayHandle::OverlayHandle(const null_t& aOther)
      50             : {
      51           0 :     new (mozilla::KnownNotNull, ptr_null_t()) null_t(aOther);
      52           0 :     mType = Tnull_t;
      53           0 : }
      54             : 
      55           0 : MOZ_IMPLICIT OverlayHandle::OverlayHandle(const OverlayHandle& aOther)
      56             : {
      57           0 :     (aOther).AssertSanity();
      58           0 :     switch ((aOther).type()) {
      59             :     case Tint32_t:
      60             :         {
      61           0 :             new (mozilla::KnownNotNull, ptr_int32_t()) int32_t((aOther).get_int32_t());
      62           0 :             break;
      63             :         }
      64             :     case Tnull_t:
      65             :         {
      66           0 :             new (mozilla::KnownNotNull, ptr_null_t()) null_t((aOther).get_null_t());
      67           0 :             break;
      68             :         }
      69             :     case T__None:
      70             :         {
      71           0 :             break;
      72             :         }
      73             :     default:
      74             :         {
      75           0 :             mozilla::ipc::LogicError("unreached");
      76           0 :             return;
      77             :         }
      78             :     }
      79           0 :     mType = (aOther).type();
      80             : }
      81             : 
      82           0 : OverlayHandle::~OverlayHandle()
      83             : {
      84           0 :     static_cast<void>(MaybeDestroy(T__None));
      85           0 : }
      86             : 
      87           0 : auto OverlayHandle::operator=(const int32_t& aRhs) -> OverlayHandle&
      88             : {
      89           0 :     if (MaybeDestroy(Tint32_t)) {
      90           0 :         new (mozilla::KnownNotNull, ptr_int32_t()) int32_t;
      91             :     }
      92           0 :     (*(ptr_int32_t())) = aRhs;
      93           0 :     mType = Tint32_t;
      94           0 :     return (*(this));
      95             : }
      96             : 
      97           0 : auto OverlayHandle::operator=(const null_t& aRhs) -> OverlayHandle&
      98             : {
      99           0 :     if (MaybeDestroy(Tnull_t)) {
     100           0 :         new (mozilla::KnownNotNull, ptr_null_t()) null_t;
     101             :     }
     102           0 :     (*(ptr_null_t())) = aRhs;
     103           0 :     mType = Tnull_t;
     104           0 :     return (*(this));
     105             : }
     106             : 
     107           0 : auto OverlayHandle::operator=(const OverlayHandle& aRhs) -> OverlayHandle&
     108             : {
     109           0 :     (aRhs).AssertSanity();
     110           0 :     Type t = (aRhs).type();
     111           0 :     switch (t) {
     112             :     case Tint32_t:
     113             :         {
     114           0 :             if (MaybeDestroy(t)) {
     115           0 :                 new (mozilla::KnownNotNull, ptr_int32_t()) int32_t;
     116             :             }
     117           0 :             (*(ptr_int32_t())) = (aRhs).get_int32_t();
     118           0 :             break;
     119             :         }
     120             :     case Tnull_t:
     121             :         {
     122           0 :             if (MaybeDestroy(t)) {
     123           0 :                 new (mozilla::KnownNotNull, ptr_null_t()) null_t;
     124             :             }
     125           0 :             (*(ptr_null_t())) = (aRhs).get_null_t();
     126           0 :             break;
     127             :         }
     128             :     case T__None:
     129             :         {
     130           0 :             static_cast<void>(MaybeDestroy(t));
     131           0 :             break;
     132             :         }
     133             :     default:
     134             :         {
     135           0 :             mozilla::ipc::LogicError("unreached");
     136           0 :             break;
     137             :         }
     138             :     }
     139           0 :     mType = t;
     140           0 :     return (*(this));
     141             : }
     142             : 
     143           0 : auto OverlayHandle::operator==(const int32_t& aRhs) const -> bool
     144             : {
     145           0 :     return (get_int32_t()) == (aRhs);
     146             : }
     147             : 
     148           0 : auto OverlayHandle::operator==(const null_t& aRhs) const -> bool
     149             : {
     150           0 :     return (get_null_t()) == (aRhs);
     151             : }
     152             : 
     153           0 : auto OverlayHandle::operator==(const OverlayHandle& aRhs) const -> bool
     154             : {
     155           0 :     if ((type()) != ((aRhs).type())) {
     156           0 :         return false;
     157             :     }
     158             : 
     159           0 :     switch (type()) {
     160             :     case Tint32_t:
     161             :         {
     162           0 :             return (get_int32_t()) == ((aRhs).get_int32_t());
     163             :         }
     164             :     case Tnull_t:
     165             :         {
     166           0 :             return (get_null_t()) == ((aRhs).get_null_t());
     167             :         }
     168             :     default:
     169             :         {
     170           0 :             mozilla::ipc::LogicError("unreached");
     171           0 :             return false;
     172             :         }
     173             :     }
     174             : }
     175             : 
     176           0 : auto OverlayHandle::get(int32_t* aOutValue) const -> void
     177             : {
     178           0 :     (*(aOutValue)) = get_int32_t();
     179           0 : }
     180             : 
     181           0 : auto OverlayHandle::get(null_t* aOutValue) const -> void
     182             : {
     183           0 :     (*(aOutValue)) = get_null_t();
     184           0 : }
     185             : 
     186             : } // namespace layers
     187             : } // namespace mozilla
     188             : 
     189             : //-----------------------------------------------------------------------------
     190             : // Method definitions for the IPDL type |struct OverlaySource|
     191             : //
     192             : namespace mozilla {
     193             : namespace layers {
     194           0 : MOZ_IMPLICIT OverlaySource::OverlaySource() :
     195           0 :     size_()
     196             : {
     197           0 :     Init();
     198           0 : }
     199             : 
     200           0 : OverlaySource::~OverlaySource()
     201             : {
     202           0 : }
     203             : 
     204           0 : auto OverlaySource::operator==(const OverlaySource& _o) const -> bool
     205             : {
     206           0 :     if ((!((handle()) == ((_o).handle())))) {
     207           0 :         return false;
     208             :     }
     209           0 :     if ((!((size()) == ((_o).size())))) {
     210           0 :         return false;
     211             :     }
     212           0 :     return true;
     213             : }
     214             : 
     215           0 : auto OverlaySource::operator!=(const OverlaySource& _o) const -> bool
     216             : {
     217           0 :     return (!(operator==(_o)));
     218             : }
     219             : 
     220           0 : auto OverlaySource::Init() -> void
     221             : {
     222           0 : }
     223             : 
     224           0 : auto OverlaySource::Assign(
     225             :         const OverlayHandle& _handle,
     226             :         const IntSize& _size) -> void
     227             : {
     228           0 :     handle_ = _handle;
     229           0 :     size_ = _size;
     230           0 : }
     231             : 
     232             : } // namespace layers
     233             : } // namespace mozilla
     234             : 
     235             : //-----------------------------------------------------------------------------
     236             : // Method definitions for the IPDL type |struct SurfaceDescriptorFileMapping|
     237             : //
     238             : namespace mozilla {
     239             : namespace layers {
     240           0 : MOZ_IMPLICIT SurfaceDescriptorFileMapping::SurfaceDescriptorFileMapping() :
     241             :     handle_(),
     242             :     format_(),
     243           0 :     size_()
     244             : {
     245           0 :     Init();
     246           0 : }
     247             : 
     248           0 : SurfaceDescriptorFileMapping::~SurfaceDescriptorFileMapping()
     249             : {
     250           0 : }
     251             : 
     252           0 : auto SurfaceDescriptorFileMapping::operator==(const SurfaceDescriptorFileMapping& _o) const -> bool
     253             : {
     254           0 :     if ((!((handle()) == ((_o).handle())))) {
     255           0 :         return false;
     256             :     }
     257           0 :     if ((!((format()) == ((_o).format())))) {
     258           0 :         return false;
     259             :     }
     260           0 :     if ((!((size()) == ((_o).size())))) {
     261           0 :         return false;
     262             :     }
     263           0 :     return true;
     264             : }
     265             : 
     266           0 : auto SurfaceDescriptorFileMapping::operator!=(const SurfaceDescriptorFileMapping& _o) const -> bool
     267             : {
     268           0 :     return (!(operator==(_o)));
     269             : }
     270             : 
     271           0 : auto SurfaceDescriptorFileMapping::Init() -> void
     272             : {
     273           0 : }
     274             : 
     275           0 : auto SurfaceDescriptorFileMapping::Assign(
     276             :         const WindowsHandle& _handle,
     277             :         const SurfaceFormat& _format,
     278             :         const IntSize& _size) -> void
     279             : {
     280           0 :     handle_ = _handle;
     281           0 :     format_ = _format;
     282           0 :     size_ = _size;
     283           0 : }
     284             : 
     285             : } // namespace layers
     286             : } // namespace mozilla
     287             : 
     288             : //-----------------------------------------------------------------------------
     289             : // Method definitions for the IPDL type |struct SurfaceDescriptorDIB|
     290             : //
     291             : namespace mozilla {
     292             : namespace layers {
     293           0 : MOZ_IMPLICIT SurfaceDescriptorDIB::SurfaceDescriptorDIB() :
     294           0 :     surface_()
     295             : {
     296           0 :     Init();
     297           0 : }
     298             : 
     299           0 : SurfaceDescriptorDIB::~SurfaceDescriptorDIB()
     300             : {
     301           0 : }
     302             : 
     303           0 : auto SurfaceDescriptorDIB::operator==(const SurfaceDescriptorDIB& _o) const -> bool
     304             : {
     305           0 :     if ((!((surface()) == ((_o).surface())))) {
     306           0 :         return false;
     307             :     }
     308           0 :     return true;
     309             : }
     310             : 
     311           0 : auto SurfaceDescriptorDIB::operator!=(const SurfaceDescriptorDIB& _o) const -> bool
     312             : {
     313           0 :     return (!(operator==(_o)));
     314             : }
     315             : 
     316           0 : auto SurfaceDescriptorDIB::Init() -> void
     317             : {
     318           0 : }
     319             : 
     320           0 : auto SurfaceDescriptorDIB::Assign(const uintptr_t& _surface) -> void
     321             : {
     322           0 :     surface_ = _surface;
     323           0 : }
     324             : 
     325             : } // namespace layers
     326             : } // namespace mozilla
     327             : 
     328             : //-----------------------------------------------------------------------------
     329             : // Method definitions for the IPDL type |struct SurfaceDescriptorD3D10|
     330             : //
     331             : namespace mozilla {
     332             : namespace layers {
     333           0 : MOZ_IMPLICIT SurfaceDescriptorD3D10::SurfaceDescriptorD3D10() :
     334             :     handle_(),
     335             :     format_(),
     336           0 :     size_()
     337             : {
     338           0 :     Init();
     339           0 : }
     340             : 
     341           0 : SurfaceDescriptorD3D10::~SurfaceDescriptorD3D10()
     342             : {
     343           0 : }
     344             : 
     345           0 : auto SurfaceDescriptorD3D10::operator==(const SurfaceDescriptorD3D10& _o) const -> bool
     346             : {
     347           0 :     if ((!((handle()) == ((_o).handle())))) {
     348           0 :         return false;
     349             :     }
     350           0 :     if ((!((format()) == ((_o).format())))) {
     351           0 :         return false;
     352             :     }
     353           0 :     if ((!((size()) == ((_o).size())))) {
     354           0 :         return false;
     355             :     }
     356           0 :     return true;
     357             : }
     358             : 
     359           0 : auto SurfaceDescriptorD3D10::operator!=(const SurfaceDescriptorD3D10& _o) const -> bool
     360             : {
     361           0 :     return (!(operator==(_o)));
     362             : }
     363             : 
     364           0 : auto SurfaceDescriptorD3D10::Init() -> void
     365             : {
     366           0 : }
     367             : 
     368           0 : auto SurfaceDescriptorD3D10::Assign(
     369             :         const WindowsHandle& _handle,
     370             :         const SurfaceFormat& _format,
     371             :         const IntSize& _size) -> void
     372             : {
     373           0 :     handle_ = _handle;
     374           0 :     format_ = _format;
     375           0 :     size_ = _size;
     376           0 : }
     377             : 
     378             : } // namespace layers
     379             : } // namespace mozilla
     380             : 
     381             : //-----------------------------------------------------------------------------
     382             : // Method definitions for the IPDL type |struct SurfaceDescriptorDXGIYCbCr|
     383             : //
     384             : namespace mozilla {
     385             : namespace layers {
     386           0 : MOZ_IMPLICIT SurfaceDescriptorDXGIYCbCr::SurfaceDescriptorDXGIYCbCr() :
     387             :     handleY_(),
     388             :     handleCb_(),
     389             :     handleCr_(),
     390             :     size_(),
     391             :     sizeY_(),
     392           0 :     sizeCbCr_()
     393             : {
     394           0 :     Init();
     395           0 : }
     396             : 
     397           0 : SurfaceDescriptorDXGIYCbCr::~SurfaceDescriptorDXGIYCbCr()
     398             : {
     399           0 : }
     400             : 
     401           0 : auto SurfaceDescriptorDXGIYCbCr::operator==(const SurfaceDescriptorDXGIYCbCr& _o) const -> bool
     402             : {
     403           0 :     if ((!((handleY()) == ((_o).handleY())))) {
     404           0 :         return false;
     405             :     }
     406           0 :     if ((!((handleCb()) == ((_o).handleCb())))) {
     407           0 :         return false;
     408             :     }
     409           0 :     if ((!((handleCr()) == ((_o).handleCr())))) {
     410           0 :         return false;
     411             :     }
     412           0 :     if ((!((size()) == ((_o).size())))) {
     413           0 :         return false;
     414             :     }
     415           0 :     if ((!((sizeY()) == ((_o).sizeY())))) {
     416           0 :         return false;
     417             :     }
     418           0 :     if ((!((sizeCbCr()) == ((_o).sizeCbCr())))) {
     419           0 :         return false;
     420             :     }
     421           0 :     return true;
     422             : }
     423             : 
     424           0 : auto SurfaceDescriptorDXGIYCbCr::operator!=(const SurfaceDescriptorDXGIYCbCr& _o) const -> bool
     425             : {
     426           0 :     return (!(operator==(_o)));
     427             : }
     428             : 
     429           0 : auto SurfaceDescriptorDXGIYCbCr::Init() -> void
     430             : {
     431           0 : }
     432             : 
     433           0 : auto SurfaceDescriptorDXGIYCbCr::Assign(
     434             :         const WindowsHandle& _handleY,
     435             :         const WindowsHandle& _handleCb,
     436             :         const WindowsHandle& _handleCr,
     437             :         const IntSize& _size,
     438             :         const IntSize& _sizeY,
     439             :         const IntSize& _sizeCbCr) -> void
     440             : {
     441           0 :     handleY_ = _handleY;
     442           0 :     handleCb_ = _handleCb;
     443           0 :     handleCr_ = _handleCr;
     444           0 :     size_ = _size;
     445           0 :     sizeY_ = _sizeY;
     446           0 :     sizeCbCr_ = _sizeCbCr;
     447           0 : }
     448             : 
     449             : } // namespace layers
     450             : } // namespace mozilla
     451             : 
     452             : //-----------------------------------------------------------------------------
     453             : // Method definitions for the IPDL type |struct SurfaceDescriptorMacIOSurface|
     454             : //
     455             : namespace mozilla {
     456             : namespace layers {
     457           0 : MOZ_IMPLICIT SurfaceDescriptorMacIOSurface::SurfaceDescriptorMacIOSurface() :
     458             :     surfaceId_(),
     459             :     scaleFactor_(),
     460           0 :     isOpaque_()
     461             : {
     462           0 :     Init();
     463           0 : }
     464             : 
     465           0 : SurfaceDescriptorMacIOSurface::~SurfaceDescriptorMacIOSurface()
     466             : {
     467           0 : }
     468             : 
     469           0 : auto SurfaceDescriptorMacIOSurface::operator==(const SurfaceDescriptorMacIOSurface& _o) const -> bool
     470             : {
     471           0 :     if ((!((surfaceId()) == ((_o).surfaceId())))) {
     472           0 :         return false;
     473             :     }
     474           0 :     if ((!((scaleFactor()) == ((_o).scaleFactor())))) {
     475           0 :         return false;
     476             :     }
     477           0 :     if ((!((isOpaque()) == ((_o).isOpaque())))) {
     478           0 :         return false;
     479             :     }
     480           0 :     return true;
     481             : }
     482             : 
     483           0 : auto SurfaceDescriptorMacIOSurface::operator!=(const SurfaceDescriptorMacIOSurface& _o) const -> bool
     484             : {
     485           0 :     return (!(operator==(_o)));
     486             : }
     487             : 
     488           0 : auto SurfaceDescriptorMacIOSurface::Init() -> void
     489             : {
     490           0 : }
     491             : 
     492           0 : auto SurfaceDescriptorMacIOSurface::Assign(
     493             :         const uint32_t& _surfaceId,
     494             :         const double& _scaleFactor,
     495             :         const bool& _isOpaque) -> void
     496             : {
     497           0 :     surfaceId_ = _surfaceId;
     498           0 :     scaleFactor_ = _scaleFactor;
     499           0 :     isOpaque_ = _isOpaque;
     500           0 : }
     501             : 
     502             : } // namespace layers
     503             : } // namespace mozilla
     504             : 
     505             : //-----------------------------------------------------------------------------
     506             : // Method definitions for the IPDL type |struct SurfaceTextureDescriptor|
     507             : //
     508             : namespace mozilla {
     509             : namespace layers {
     510           0 : MOZ_IMPLICIT SurfaceTextureDescriptor::SurfaceTextureDescriptor() :
     511             :     handle_(),
     512             :     size_(),
     513           0 :     continuous_()
     514             : {
     515           0 :     Init();
     516           0 : }
     517             : 
     518           0 : SurfaceTextureDescriptor::~SurfaceTextureDescriptor()
     519             : {
     520           0 : }
     521             : 
     522           0 : auto SurfaceTextureDescriptor::operator==(const SurfaceTextureDescriptor& _o) const -> bool
     523             : {
     524           0 :     if ((!((handle()) == ((_o).handle())))) {
     525           0 :         return false;
     526             :     }
     527           0 :     if ((!((size()) == ((_o).size())))) {
     528           0 :         return false;
     529             :     }
     530           0 :     if ((!((continuous()) == ((_o).continuous())))) {
     531           0 :         return false;
     532             :     }
     533           0 :     return true;
     534             : }
     535             : 
     536           0 : auto SurfaceTextureDescriptor::operator!=(const SurfaceTextureDescriptor& _o) const -> bool
     537             : {
     538           0 :     return (!(operator==(_o)));
     539             : }
     540             : 
     541           0 : auto SurfaceTextureDescriptor::Init() -> void
     542             : {
     543           0 : }
     544             : 
     545           0 : auto SurfaceTextureDescriptor::Assign(
     546             :         const uint64_t& _handle,
     547             :         const IntSize& _size,
     548             :         const bool& _continuous) -> void
     549             : {
     550           0 :     handle_ = _handle;
     551           0 :     size_ = _size;
     552           0 :     continuous_ = _continuous;
     553           0 : }
     554             : 
     555             : } // namespace layers
     556             : } // namespace mozilla
     557             : 
     558             : //-----------------------------------------------------------------------------
     559             : // Method definitions for the IPDL type |struct EGLImageDescriptor|
     560             : //
     561             : namespace mozilla {
     562             : namespace layers {
     563           0 : MOZ_IMPLICIT EGLImageDescriptor::EGLImageDescriptor() :
     564             :     image_(),
     565             :     fence_(),
     566             :     size_(),
     567           0 :     hasAlpha_()
     568             : {
     569           0 :     Init();
     570           0 : }
     571             : 
     572           0 : EGLImageDescriptor::~EGLImageDescriptor()
     573             : {
     574           0 : }
     575             : 
     576           0 : auto EGLImageDescriptor::operator==(const EGLImageDescriptor& _o) const -> bool
     577             : {
     578           0 :     if ((!((image()) == ((_o).image())))) {
     579           0 :         return false;
     580             :     }
     581           0 :     if ((!((fence()) == ((_o).fence())))) {
     582           0 :         return false;
     583             :     }
     584           0 :     if ((!((size()) == ((_o).size())))) {
     585           0 :         return false;
     586             :     }
     587           0 :     if ((!((hasAlpha()) == ((_o).hasAlpha())))) {
     588           0 :         return false;
     589             :     }
     590           0 :     return true;
     591             : }
     592             : 
     593           0 : auto EGLImageDescriptor::operator!=(const EGLImageDescriptor& _o) const -> bool
     594             : {
     595           0 :     return (!(operator==(_o)));
     596             : }
     597             : 
     598           0 : auto EGLImageDescriptor::Init() -> void
     599             : {
     600           0 : }
     601             : 
     602           0 : auto EGLImageDescriptor::Assign(
     603             :         const uintptr_t& _image,
     604             :         const uintptr_t& _fence,
     605             :         const IntSize& _size,
     606             :         const bool& _hasAlpha) -> void
     607             : {
     608           0 :     image_ = _image;
     609           0 :     fence_ = _fence;
     610           0 :     size_ = _size;
     611           0 :     hasAlpha_ = _hasAlpha;
     612           0 : }
     613             : 
     614             : } // namespace layers
     615             : } // namespace mozilla
     616             : 
     617             : //-----------------------------------------------------------------------------
     618             : // Method definitions for the IPDL type |struct SurfaceDescriptorSharedGLTexture|
     619             : //
     620             : namespace mozilla {
     621             : namespace layers {
     622           0 : MOZ_IMPLICIT SurfaceDescriptorSharedGLTexture::SurfaceDescriptorSharedGLTexture() :
     623             :     texture_(),
     624             :     target_(),
     625             :     fence_(),
     626             :     size_(),
     627           0 :     hasAlpha_()
     628             : {
     629           0 :     Init();
     630           0 : }
     631             : 
     632           0 : SurfaceDescriptorSharedGLTexture::~SurfaceDescriptorSharedGLTexture()
     633             : {
     634           0 : }
     635             : 
     636           0 : auto SurfaceDescriptorSharedGLTexture::operator==(const SurfaceDescriptorSharedGLTexture& _o) const -> bool
     637             : {
     638           0 :     if ((!((texture()) == ((_o).texture())))) {
     639           0 :         return false;
     640             :     }
     641           0 :     if ((!((target()) == ((_o).target())))) {
     642           0 :         return false;
     643             :     }
     644           0 :     if ((!((fence()) == ((_o).fence())))) {
     645           0 :         return false;
     646             :     }
     647           0 :     if ((!((size()) == ((_o).size())))) {
     648           0 :         return false;
     649             :     }
     650           0 :     if ((!((hasAlpha()) == ((_o).hasAlpha())))) {
     651           0 :         return false;
     652             :     }
     653           0 :     return true;
     654             : }
     655             : 
     656           0 : auto SurfaceDescriptorSharedGLTexture::operator!=(const SurfaceDescriptorSharedGLTexture& _o) const -> bool
     657             : {
     658           0 :     return (!(operator==(_o)));
     659             : }
     660             : 
     661           0 : auto SurfaceDescriptorSharedGLTexture::Init() -> void
     662             : {
     663           0 : }
     664             : 
     665           0 : auto SurfaceDescriptorSharedGLTexture::Assign(
     666             :         const uint32_t& _texture,
     667             :         const uint32_t& _target,
     668             :         const uintptr_t& _fence,
     669             :         const IntSize& _size,
     670             :         const bool& _hasAlpha) -> void
     671             : {
     672           0 :     texture_ = _texture;
     673           0 :     target_ = _target;
     674           0 :     fence_ = _fence;
     675           0 :     size_ = _size;
     676           0 :     hasAlpha_ = _hasAlpha;
     677           0 : }
     678             : 
     679             : } // namespace layers
     680             : } // namespace mozilla
     681             : 
     682             : //-----------------------------------------------------------------------------
     683             : // Method definitions for the IPDL type |struct SurfaceDescriptorGPUVideo|
     684             : //
     685             : namespace mozilla {
     686             : namespace layers {
     687           0 : MOZ_IMPLICIT SurfaceDescriptorGPUVideo::SurfaceDescriptorGPUVideo() :
     688           0 :     handle_()
     689             : {
     690           0 :     Init();
     691           0 : }
     692             : 
     693           0 : SurfaceDescriptorGPUVideo::~SurfaceDescriptorGPUVideo()
     694             : {
     695           0 : }
     696             : 
     697           0 : auto SurfaceDescriptorGPUVideo::operator==(const SurfaceDescriptorGPUVideo& _o) const -> bool
     698             : {
     699           0 :     if ((!((handle()) == ((_o).handle())))) {
     700           0 :         return false;
     701             :     }
     702           0 :     return true;
     703             : }
     704             : 
     705           0 : auto SurfaceDescriptorGPUVideo::operator!=(const SurfaceDescriptorGPUVideo& _o) const -> bool
     706             : {
     707           0 :     return (!(operator==(_o)));
     708             : }
     709             : 
     710           0 : auto SurfaceDescriptorGPUVideo::Init() -> void
     711             : {
     712           0 : }
     713             : 
     714           0 : auto SurfaceDescriptorGPUVideo::Assign(const uint64_t& _handle) -> void
     715             : {
     716           0 :     handle_ = _handle;
     717           0 : }
     718             : 
     719             : } // namespace layers
     720             : } // namespace mozilla
     721             : 
     722             : //-----------------------------------------------------------------------------
     723             : // Method definitions for the IPDL type |struct RGBDescriptor|
     724             : //
     725             : namespace mozilla {
     726             : namespace layers {
     727          45 : MOZ_IMPLICIT RGBDescriptor::RGBDescriptor() :
     728             :     size_(),
     729             :     format_(),
     730          45 :     hasIntermediateBuffer_()
     731             : {
     732          45 :     Init();
     733          45 : }
     734             : 
     735          66 : RGBDescriptor::~RGBDescriptor()
     736             : {
     737          66 : }
     738             : 
     739           0 : auto RGBDescriptor::operator==(const RGBDescriptor& _o) const -> bool
     740             : {
     741           0 :     if ((!((size()) == ((_o).size())))) {
     742           0 :         return false;
     743             :     }
     744           0 :     if ((!((format()) == ((_o).format())))) {
     745           0 :         return false;
     746             :     }
     747           0 :     if ((!((hasIntermediateBuffer()) == ((_o).hasIntermediateBuffer())))) {
     748           0 :         return false;
     749             :     }
     750           0 :     return true;
     751             : }
     752             : 
     753           0 : auto RGBDescriptor::operator!=(const RGBDescriptor& _o) const -> bool
     754             : {
     755           0 :     return (!(operator==(_o)));
     756             : }
     757             : 
     758          72 : auto RGBDescriptor::Init() -> void
     759             : {
     760          72 : }
     761             : 
     762          63 : auto RGBDescriptor::Assign(
     763             :         const IntSize& _size,
     764             :         const SurfaceFormat& _format,
     765             :         const bool& _hasIntermediateBuffer) -> void
     766             : {
     767          63 :     size_ = _size;
     768          63 :     format_ = _format;
     769          63 :     hasIntermediateBuffer_ = _hasIntermediateBuffer;
     770          63 : }
     771             : 
     772             : } // namespace layers
     773             : } // namespace mozilla
     774             : 
     775             : //-----------------------------------------------------------------------------
     776             : // Method definitions for the IPDL type |struct YCbCrDescriptor|
     777             : //
     778             : namespace mozilla {
     779             : namespace layers {
     780           0 : MOZ_IMPLICIT YCbCrDescriptor::YCbCrDescriptor() :
     781             :     ySize_(),
     782             :     cbCrSize_(),
     783             :     yOffset_(),
     784             :     cbOffset_(),
     785             :     crOffset_(),
     786             :     stereoMode_(),
     787             :     yUVColorSpace_(),
     788           0 :     hasIntermediateBuffer_()
     789             : {
     790           0 :     Init();
     791           0 : }
     792             : 
     793           0 : YCbCrDescriptor::~YCbCrDescriptor()
     794             : {
     795           0 : }
     796             : 
     797           0 : auto YCbCrDescriptor::operator==(const YCbCrDescriptor& _o) const -> bool
     798             : {
     799           0 :     if ((!((ySize()) == ((_o).ySize())))) {
     800           0 :         return false;
     801             :     }
     802           0 :     if ((!((cbCrSize()) == ((_o).cbCrSize())))) {
     803           0 :         return false;
     804             :     }
     805           0 :     if ((!((yOffset()) == ((_o).yOffset())))) {
     806           0 :         return false;
     807             :     }
     808           0 :     if ((!((cbOffset()) == ((_o).cbOffset())))) {
     809           0 :         return false;
     810             :     }
     811           0 :     if ((!((crOffset()) == ((_o).crOffset())))) {
     812           0 :         return false;
     813             :     }
     814           0 :     if ((!((stereoMode()) == ((_o).stereoMode())))) {
     815           0 :         return false;
     816             :     }
     817           0 :     if ((!((yUVColorSpace()) == ((_o).yUVColorSpace())))) {
     818           0 :         return false;
     819             :     }
     820           0 :     if ((!((hasIntermediateBuffer()) == ((_o).hasIntermediateBuffer())))) {
     821           0 :         return false;
     822             :     }
     823           0 :     return true;
     824             : }
     825             : 
     826           0 : auto YCbCrDescriptor::operator!=(const YCbCrDescriptor& _o) const -> bool
     827             : {
     828           0 :     return (!(operator==(_o)));
     829             : }
     830             : 
     831           0 : auto YCbCrDescriptor::Init() -> void
     832             : {
     833           0 : }
     834             : 
     835           0 : auto YCbCrDescriptor::Assign(
     836             :         const IntSize& _ySize,
     837             :         const IntSize& _cbCrSize,
     838             :         const uint32_t& _yOffset,
     839             :         const uint32_t& _cbOffset,
     840             :         const uint32_t& _crOffset,
     841             :         const StereoMode& _stereoMode,
     842             :         const YUVColorSpace& _yUVColorSpace,
     843             :         const bool& _hasIntermediateBuffer) -> void
     844             : {
     845           0 :     ySize_ = _ySize;
     846           0 :     cbCrSize_ = _cbCrSize;
     847           0 :     yOffset_ = _yOffset;
     848           0 :     cbOffset_ = _cbOffset;
     849           0 :     crOffset_ = _crOffset;
     850           0 :     stereoMode_ = _stereoMode;
     851           0 :     yUVColorSpace_ = _yUVColorSpace;
     852           0 :     hasIntermediateBuffer_ = _hasIntermediateBuffer;
     853           0 : }
     854             : 
     855             : } // namespace layers
     856             : } // namespace mozilla
     857             : 
     858             : //-----------------------------------------------------------------------------
     859             : // Method definitions for the IPDL type |union BufferDescriptor|
     860             : //
     861             : namespace mozilla {
     862             : namespace layers {
     863         102 : auto BufferDescriptor::MaybeDestroy(Type aNewType) -> bool
     864             : {
     865         102 :     if ((mType) == (T__None)) {
     866          54 :         return true;
     867             :     }
     868          48 :     if ((mType) == (aNewType)) {
     869           0 :         return false;
     870             :     }
     871          48 :     switch (mType) {
     872             :     case TRGBDescriptor:
     873             :         {
     874          48 :             (ptr_RGBDescriptor())->~RGBDescriptor__tdef();
     875          48 :             break;
     876             :         }
     877             :     case TYCbCrDescriptor:
     878             :         {
     879           0 :             (ptr_YCbCrDescriptor())->~YCbCrDescriptor__tdef();
     880           0 :             break;
     881             :         }
     882             :     default:
     883             :         {
     884           0 :             mozilla::ipc::LogicError("not reached");
     885           0 :             break;
     886             :         }
     887             :     }
     888          48 :     return true;
     889             : }
     890             : 
     891           9 : MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(const RGBDescriptor& aOther)
     892             : {
     893           9 :     new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor(aOther);
     894           9 :     mType = TRGBDescriptor;
     895           9 : }
     896             : 
     897           0 : MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(const YCbCrDescriptor& aOther)
     898             : {
     899           0 :     new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor(aOther);
     900           0 :     mType = TYCbCrDescriptor;
     901           0 : }
     902             : 
     903           9 : MOZ_IMPLICIT BufferDescriptor::BufferDescriptor(const BufferDescriptor& aOther)
     904             : {
     905           9 :     (aOther).AssertSanity();
     906           9 :     switch ((aOther).type()) {
     907             :     case TRGBDescriptor:
     908             :         {
     909           9 :             new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor((aOther).get_RGBDescriptor());
     910           9 :             break;
     911             :         }
     912             :     case TYCbCrDescriptor:
     913             :         {
     914           0 :             new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor((aOther).get_YCbCrDescriptor());
     915           0 :             break;
     916             :         }
     917             :     case T__None:
     918             :         {
     919           0 :             break;
     920             :         }
     921             :     default:
     922             :         {
     923           0 :             mozilla::ipc::LogicError("unreached");
     924           0 :             return;
     925             :         }
     926             :     }
     927           9 :     mType = (aOther).type();
     928             : }
     929             : 
     930         114 : BufferDescriptor::~BufferDescriptor()
     931             : {
     932          57 :     static_cast<void>(MaybeDestroy(T__None));
     933          57 : }
     934             : 
     935           9 : auto BufferDescriptor::operator=(const RGBDescriptor& aRhs) -> BufferDescriptor&
     936             : {
     937           9 :     if (MaybeDestroy(TRGBDescriptor)) {
     938           9 :         new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor;
     939             :     }
     940           9 :     (*(ptr_RGBDescriptor())) = aRhs;
     941           9 :     mType = TRGBDescriptor;
     942           9 :     return (*(this));
     943             : }
     944             : 
     945           0 : auto BufferDescriptor::operator=(const YCbCrDescriptor& aRhs) -> BufferDescriptor&
     946             : {
     947           0 :     if (MaybeDestroy(TYCbCrDescriptor)) {
     948           0 :         new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor;
     949             :     }
     950           0 :     (*(ptr_YCbCrDescriptor())) = aRhs;
     951           0 :     mType = TYCbCrDescriptor;
     952           0 :     return (*(this));
     953             : }
     954             : 
     955          36 : auto BufferDescriptor::operator=(const BufferDescriptor& aRhs) -> BufferDescriptor&
     956             : {
     957          36 :     (aRhs).AssertSanity();
     958          36 :     Type t = (aRhs).type();
     959          36 :     switch (t) {
     960             :     case TRGBDescriptor:
     961             :         {
     962          27 :             if (MaybeDestroy(t)) {
     963          27 :                 new (mozilla::KnownNotNull, ptr_RGBDescriptor()) RGBDescriptor;
     964             :             }
     965          27 :             (*(ptr_RGBDescriptor())) = (aRhs).get_RGBDescriptor();
     966          27 :             break;
     967             :         }
     968             :     case TYCbCrDescriptor:
     969             :         {
     970           0 :             if (MaybeDestroy(t)) {
     971           0 :                 new (mozilla::KnownNotNull, ptr_YCbCrDescriptor()) YCbCrDescriptor;
     972             :             }
     973           0 :             (*(ptr_YCbCrDescriptor())) = (aRhs).get_YCbCrDescriptor();
     974           0 :             break;
     975             :         }
     976             :     case T__None:
     977             :         {
     978           9 :             static_cast<void>(MaybeDestroy(t));
     979           9 :             break;
     980             :         }
     981             :     default:
     982             :         {
     983           0 :             mozilla::ipc::LogicError("unreached");
     984           0 :             break;
     985             :         }
     986             :     }
     987          36 :     mType = t;
     988          36 :     return (*(this));
     989             : }
     990             : 
     991           0 : auto BufferDescriptor::operator==(const RGBDescriptor& aRhs) const -> bool
     992             : {
     993           0 :     return (get_RGBDescriptor()) == (aRhs);
     994             : }
     995             : 
     996           0 : auto BufferDescriptor::operator==(const YCbCrDescriptor& aRhs) const -> bool
     997             : {
     998           0 :     return (get_YCbCrDescriptor()) == (aRhs);
     999             : }
    1000             : 
    1001           0 : auto BufferDescriptor::operator==(const BufferDescriptor& aRhs) const -> bool
    1002             : {
    1003           0 :     if ((type()) != ((aRhs).type())) {
    1004           0 :         return false;
    1005             :     }
    1006             : 
    1007           0 :     switch (type()) {
    1008             :     case TRGBDescriptor:
    1009             :         {
    1010           0 :             return (get_RGBDescriptor()) == ((aRhs).get_RGBDescriptor());
    1011             :         }
    1012             :     case TYCbCrDescriptor:
    1013             :         {
    1014           0 :             return (get_YCbCrDescriptor()) == ((aRhs).get_YCbCrDescriptor());
    1015             :         }
    1016             :     default:
    1017             :         {
    1018           0 :             mozilla::ipc::LogicError("unreached");
    1019           0 :             return false;
    1020             :         }
    1021             :     }
    1022             : }
    1023             : 
    1024           0 : auto BufferDescriptor::get(RGBDescriptor* aOutValue) const -> void
    1025             : {
    1026           0 :     (*(aOutValue)) = get_RGBDescriptor();
    1027           0 : }
    1028             : 
    1029           0 : auto BufferDescriptor::get(YCbCrDescriptor* aOutValue) const -> void
    1030             : {
    1031           0 :     (*(aOutValue)) = get_YCbCrDescriptor();
    1032           0 : }
    1033             : 
    1034             : } // namespace layers
    1035             : } // namespace mozilla
    1036             : 
    1037             : //-----------------------------------------------------------------------------
    1038             : // Method definitions for the IPDL type |union MemoryOrShmem|
    1039             : //
    1040             : namespace mozilla {
    1041             : namespace layers {
    1042          81 : auto MemoryOrShmem::MaybeDestroy(Type aNewType) -> bool
    1043             : {
    1044          81 :     if ((mType) == (T__None)) {
    1045          45 :         return true;
    1046             :     }
    1047          36 :     if ((mType) == (aNewType)) {
    1048           0 :         return false;
    1049             :     }
    1050          36 :     switch (mType) {
    1051             :     case Tuintptr_t:
    1052             :         {
    1053          32 :             (ptr_uintptr_t())->~uintptr_t__tdef();
    1054          32 :             break;
    1055             :         }
    1056             :     case TShmem:
    1057             :         {
    1058           4 :             (ptr_Shmem())->~Shmem__tdef();
    1059           4 :             break;
    1060             :         }
    1061             :     default:
    1062             :         {
    1063           0 :             mozilla::ipc::LogicError("not reached");
    1064           0 :             break;
    1065             :         }
    1066             :     }
    1067          36 :     return true;
    1068             : }
    1069             : 
    1070           8 : MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(const uintptr_t& aOther)
    1071             : {
    1072           8 :     new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t(aOther);
    1073           8 :     mType = Tuintptr_t;
    1074           8 : }
    1075             : 
    1076           1 : MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(Shmem& aOther)
    1077             : {
    1078           1 :     new (mozilla::KnownNotNull, ptr_Shmem()) Shmem(aOther);
    1079           1 :     mType = TShmem;
    1080           1 : }
    1081             : 
    1082           0 : MOZ_IMPLICIT MemoryOrShmem::MemoryOrShmem(const MemoryOrShmem& aOther)
    1083             : {
    1084           0 :     (aOther).AssertSanity();
    1085           0 :     switch ((aOther).type()) {
    1086             :     case Tuintptr_t:
    1087             :         {
    1088           0 :             new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t((aOther).get_uintptr_t());
    1089           0 :             break;
    1090             :         }
    1091             :     case TShmem:
    1092             :         {
    1093           0 :             new (mozilla::KnownNotNull, ptr_Shmem()) Shmem((aOther).get_Shmem());
    1094           0 :             break;
    1095             :         }
    1096             :     case T__None:
    1097             :         {
    1098           0 :             break;
    1099             :         }
    1100             :     default:
    1101             :         {
    1102           0 :             mozilla::ipc::LogicError("unreached");
    1103           0 :             return;
    1104             :         }
    1105             :     }
    1106           0 :     mType = (aOther).type();
    1107             : }
    1108             : 
    1109          90 : MemoryOrShmem::~MemoryOrShmem()
    1110             : {
    1111          45 :     static_cast<void>(MaybeDestroy(T__None));
    1112          45 : }
    1113             : 
    1114           8 : auto MemoryOrShmem::operator=(const uintptr_t& aRhs) -> MemoryOrShmem&
    1115             : {
    1116           8 :     if (MaybeDestroy(Tuintptr_t)) {
    1117           8 :         new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t;
    1118             :     }
    1119           8 :     (*(ptr_uintptr_t())) = aRhs;
    1120           8 :     mType = Tuintptr_t;
    1121           8 :     return (*(this));
    1122             : }
    1123             : 
    1124           1 : auto MemoryOrShmem::operator=(Shmem& aRhs) -> MemoryOrShmem&
    1125             : {
    1126           1 :     if (MaybeDestroy(TShmem)) {
    1127           1 :         new (mozilla::KnownNotNull, ptr_Shmem()) Shmem;
    1128             :     }
    1129           1 :     (*(ptr_Shmem())) = aRhs;
    1130           1 :     mType = TShmem;
    1131           1 :     return (*(this));
    1132             : }
    1133             : 
    1134          27 : auto MemoryOrShmem::operator=(const MemoryOrShmem& aRhs) -> MemoryOrShmem&
    1135             : {
    1136          27 :     (aRhs).AssertSanity();
    1137          27 :     Type t = (aRhs).type();
    1138          27 :     switch (t) {
    1139             :     case Tuintptr_t:
    1140             :         {
    1141          16 :             if (MaybeDestroy(t)) {
    1142          16 :                 new (mozilla::KnownNotNull, ptr_uintptr_t()) uintptr_t;
    1143             :             }
    1144          16 :             (*(ptr_uintptr_t())) = (aRhs).get_uintptr_t();
    1145          16 :             break;
    1146             :         }
    1147             :     case TShmem:
    1148             :         {
    1149           2 :             if (MaybeDestroy(t)) {
    1150           2 :                 new (mozilla::KnownNotNull, ptr_Shmem()) Shmem;
    1151             :             }
    1152           2 :             (*(ptr_Shmem())) = (aRhs).get_Shmem();
    1153           2 :             break;
    1154             :         }
    1155             :     case T__None:
    1156             :         {
    1157           9 :             static_cast<void>(MaybeDestroy(t));
    1158           9 :             break;
    1159             :         }
    1160             :     default:
    1161             :         {
    1162           0 :             mozilla::ipc::LogicError("unreached");
    1163           0 :             break;
    1164             :         }
    1165             :     }
    1166          27 :     mType = t;
    1167          27 :     return (*(this));
    1168             : }
    1169             : 
    1170           0 : auto MemoryOrShmem::operator==(const uintptr_t& aRhs) const -> bool
    1171             : {
    1172           0 :     return (get_uintptr_t()) == (aRhs);
    1173             : }
    1174             : 
    1175           0 : auto MemoryOrShmem::operator==(Shmem& aRhs) const -> bool
    1176             : {
    1177           0 :     return (get_Shmem()) == (aRhs);
    1178             : }
    1179             : 
    1180           0 : auto MemoryOrShmem::operator==(const MemoryOrShmem& aRhs) const -> bool
    1181             : {
    1182           0 :     if ((type()) != ((aRhs).type())) {
    1183           0 :         return false;
    1184             :     }
    1185             : 
    1186           0 :     switch (type()) {
    1187             :     case Tuintptr_t:
    1188             :         {
    1189           0 :             return (get_uintptr_t()) == ((aRhs).get_uintptr_t());
    1190             :         }
    1191             :     case TShmem:
    1192             :         {
    1193           0 :             return (get_Shmem()) == ((aRhs).get_Shmem());
    1194             :         }
    1195             :     default:
    1196             :         {
    1197           0 :             mozilla::ipc::LogicError("unreached");
    1198           0 :             return false;
    1199             :         }
    1200             :     }
    1201             : }
    1202             : 
    1203           0 : auto MemoryOrShmem::get(uintptr_t* aOutValue) const -> void
    1204             : {
    1205           0 :     (*(aOutValue)) = get_uintptr_t();
    1206           0 : }
    1207             : 
    1208           0 : auto MemoryOrShmem::get(Shmem* aOutValue) const -> void
    1209             : {
    1210           0 :     (*(aOutValue)) = get_Shmem();
    1211           0 : }
    1212             : 
    1213             : } // namespace layers
    1214             : } // namespace mozilla
    1215             : 
    1216             : //-----------------------------------------------------------------------------
    1217             : // Method definitions for the IPDL type |struct SurfaceDescriptorBuffer|
    1218             : //
    1219             : namespace mozilla {
    1220             : namespace layers {
    1221          27 : MOZ_IMPLICIT SurfaceDescriptorBuffer::SurfaceDescriptorBuffer()
    1222             : {
    1223          27 :     Init();
    1224          27 : }
    1225             : 
    1226          36 : SurfaceDescriptorBuffer::~SurfaceDescriptorBuffer()
    1227             : {
    1228          36 : }
    1229             : 
    1230           0 : auto SurfaceDescriptorBuffer::operator==(const SurfaceDescriptorBuffer& _o) const -> bool
    1231             : {
    1232           0 :     if ((!((desc()) == ((_o).desc())))) {
    1233           0 :         return false;
    1234             :     }
    1235           0 :     if ((!((data()) == ((_o).data())))) {
    1236           0 :         return false;
    1237             :     }
    1238           0 :     return true;
    1239             : }
    1240             : 
    1241           0 : auto SurfaceDescriptorBuffer::operator!=(const SurfaceDescriptorBuffer& _o) const -> bool
    1242             : {
    1243           0 :     return (!(operator==(_o)));
    1244             : }
    1245             : 
    1246          36 : auto SurfaceDescriptorBuffer::Init() -> void
    1247             : {
    1248          36 : }
    1249             : 
    1250          27 : auto SurfaceDescriptorBuffer::Assign(
    1251             :         const BufferDescriptor& _desc,
    1252             :         const MemoryOrShmem& _data) -> void
    1253             : {
    1254          27 :     desc_ = _desc;
    1255          27 :     data_ = _data;
    1256          27 : }
    1257             : 
    1258             : } // namespace layers
    1259             : } // namespace mozilla
    1260             : 
    1261             : //-----------------------------------------------------------------------------
    1262             : // Method definitions for the IPDL type |union SurfaceDescriptor|
    1263             : //
    1264             : namespace mozilla {
    1265             : namespace layers {
    1266          36 : auto SurfaceDescriptor::MaybeDestroy(Type aNewType) -> bool
    1267             : {
    1268          36 :     if ((mType) == (T__None)) {
    1269          18 :         return true;
    1270             :     }
    1271          18 :     if ((mType) == (aNewType)) {
    1272           0 :         return false;
    1273             :     }
    1274          18 :     switch (mType) {
    1275             :     case TSurfaceDescriptorBuffer:
    1276             :         {
    1277          18 :             (ptr_SurfaceDescriptorBuffer())->~SurfaceDescriptorBuffer__tdef();
    1278          18 :             break;
    1279             :         }
    1280             :     case TSurfaceDescriptorDIB:
    1281             :         {
    1282           0 :             (ptr_SurfaceDescriptorDIB())->~SurfaceDescriptorDIB__tdef();
    1283           0 :             break;
    1284             :         }
    1285             :     case TSurfaceDescriptorD3D10:
    1286             :         {
    1287           0 :             (ptr_SurfaceDescriptorD3D10())->~SurfaceDescriptorD3D10__tdef();
    1288           0 :             break;
    1289             :         }
    1290             :     case TSurfaceDescriptorFileMapping:
    1291             :         {
    1292           0 :             (ptr_SurfaceDescriptorFileMapping())->~SurfaceDescriptorFileMapping__tdef();
    1293           0 :             break;
    1294             :         }
    1295             :     case TSurfaceDescriptorDXGIYCbCr:
    1296             :         {
    1297           0 :             (ptr_SurfaceDescriptorDXGIYCbCr())->~SurfaceDescriptorDXGIYCbCr__tdef();
    1298           0 :             break;
    1299             :         }
    1300             :     case TSurfaceDescriptorX11:
    1301             :         {
    1302           0 :             (ptr_SurfaceDescriptorX11())->~SurfaceDescriptorX11__tdef();
    1303           0 :             break;
    1304             :         }
    1305             :     case TSurfaceTextureDescriptor:
    1306             :         {
    1307           0 :             (ptr_SurfaceTextureDescriptor())->~SurfaceTextureDescriptor__tdef();
    1308           0 :             break;
    1309             :         }
    1310             :     case TEGLImageDescriptor:
    1311             :         {
    1312           0 :             (ptr_EGLImageDescriptor())->~EGLImageDescriptor__tdef();
    1313           0 :             break;
    1314             :         }
    1315             :     case TSurfaceDescriptorMacIOSurface:
    1316             :         {
    1317           0 :             (ptr_SurfaceDescriptorMacIOSurface())->~SurfaceDescriptorMacIOSurface__tdef();
    1318           0 :             break;
    1319             :         }
    1320             :     case TSurfaceDescriptorSharedGLTexture:
    1321             :         {
    1322           0 :             (ptr_SurfaceDescriptorSharedGLTexture())->~SurfaceDescriptorSharedGLTexture__tdef();
    1323           0 :             break;
    1324             :         }
    1325             :     case TSurfaceDescriptorGPUVideo:
    1326             :         {
    1327           0 :             (ptr_SurfaceDescriptorGPUVideo())->~SurfaceDescriptorGPUVideo__tdef();
    1328           0 :             break;
    1329             :         }
    1330             :     case Tnull_t:
    1331             :         {
    1332           0 :             (ptr_null_t())->~null_t__tdef();
    1333           0 :             break;
    1334             :         }
    1335             :     default:
    1336             :         {
    1337           0 :             mozilla::ipc::LogicError("not reached");
    1338           0 :             break;
    1339             :         }
    1340             :     }
    1341          18 :     return true;
    1342             : }
    1343             : 
    1344           0 : MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorBuffer& aOther)
    1345             : {
    1346           0 :     new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer(aOther);
    1347           0 :     mType = TSurfaceDescriptorBuffer;
    1348           0 : }
    1349             : 
    1350           0 : MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorDIB& aOther)
    1351             : {
    1352           0 :     new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDIB()) SurfaceDescriptorDIB(aOther);
    1353           0 :     mType = TSurfaceDescriptorDIB;
    1354           0 : }
    1355             : 
    1356           0 : MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorD3D10& aOther)
    1357             : {
    1358           0 :     new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10(aOther);
    1359           0 :     mType = TSurfaceDescriptorD3D10;
    1360           0 : }
    1361             : 
    1362           0 : MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorFileMapping& aOther)
    1363             : {
    1364           0 :     new (mozilla::KnownNotNull, ptr_SurfaceDescriptorFileMapping()) SurfaceDescriptorFileMapping(aOther);
    1365           0 :     mType = TSurfaceDescriptorFileMapping;
    1366           0 : }
    1367             : 
    1368           0 : MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorDXGIYCbCr& aOther)
    1369             : {
    1370           0 :     new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr(aOther);
    1371           0 :     mType = TSurfaceDescriptorDXGIYCbCr;
    1372           0 : }
    1373             : 
    1374           0 : MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorX11& aOther)
    1375             : {
    1376           0 :     new (mozilla::KnownNotNull, ptr_SurfaceDescriptorX11()) SurfaceDescriptorX11(aOther);
    1377           0 :     mType = TSurfaceDescriptorX11;
    1378           0 : }
    1379             : 
    1380           0 : MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceTextureDescriptor& aOther)
    1381             : {
    1382           0 :     new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor(aOther);
    1383           0 :     mType = TSurfaceTextureDescriptor;
    1384           0 : }
    1385             : 
    1386           0 : MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const EGLImageDescriptor& aOther)
    1387             : {
    1388           0 :     new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor(aOther);
    1389           0 :     mType = TEGLImageDescriptor;
    1390           0 : }
    1391             : 
    1392           0 : MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorMacIOSurface& aOther)
    1393             : {
    1394           0 :     new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface(aOther);
    1395           0 :     mType = TSurfaceDescriptorMacIOSurface;
    1396           0 : }
    1397             : 
    1398           0 : MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorSharedGLTexture& aOther)
    1399             : {
    1400           0 :     new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture(aOther);
    1401           0 :     mType = TSurfaceDescriptorSharedGLTexture;
    1402           0 : }
    1403             : 
    1404           0 : MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptorGPUVideo& aOther)
    1405             : {
    1406           0 :     new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo(aOther);
    1407           0 :     mType = TSurfaceDescriptorGPUVideo;
    1408           0 : }
    1409             : 
    1410           0 : MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const null_t& aOther)
    1411             : {
    1412           0 :     new (mozilla::KnownNotNull, ptr_null_t()) null_t(aOther);
    1413           0 :     mType = Tnull_t;
    1414           0 : }
    1415             : 
    1416           0 : MOZ_IMPLICIT SurfaceDescriptor::SurfaceDescriptor(const SurfaceDescriptor& aOther)
    1417             : {
    1418           0 :     (aOther).AssertSanity();
    1419           0 :     switch ((aOther).type()) {
    1420             :     case TSurfaceDescriptorBuffer:
    1421             :         {
    1422           0 :             new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer((aOther).get_SurfaceDescriptorBuffer());
    1423           0 :             break;
    1424             :         }
    1425             :     case TSurfaceDescriptorDIB:
    1426             :         {
    1427           0 :             new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDIB()) SurfaceDescriptorDIB((aOther).get_SurfaceDescriptorDIB());
    1428           0 :             break;
    1429             :         }
    1430             :     case TSurfaceDescriptorD3D10:
    1431             :         {
    1432           0 :             new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10((aOther).get_SurfaceDescriptorD3D10());
    1433           0 :             break;
    1434             :         }
    1435             :     case TSurfaceDescriptorFileMapping:
    1436             :         {
    1437           0 :             new (mozilla::KnownNotNull, ptr_SurfaceDescriptorFileMapping()) SurfaceDescriptorFileMapping((aOther).get_SurfaceDescriptorFileMapping());
    1438           0 :             break;
    1439             :         }
    1440             :     case TSurfaceDescriptorDXGIYCbCr:
    1441             :         {
    1442           0 :             new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr((aOther).get_SurfaceDescriptorDXGIYCbCr());
    1443           0 :             break;
    1444             :         }
    1445             :     case TSurfaceDescriptorX11:
    1446             :         {
    1447           0 :             new (mozilla::KnownNotNull, ptr_SurfaceDescriptorX11()) SurfaceDescriptorX11((aOther).get_SurfaceDescriptorX11());
    1448           0 :             break;
    1449             :         }
    1450             :     case TSurfaceTextureDescriptor:
    1451             :         {
    1452           0 :             new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor((aOther).get_SurfaceTextureDescriptor());
    1453           0 :             break;
    1454             :         }
    1455             :     case TEGLImageDescriptor:
    1456             :         {
    1457           0 :             new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor((aOther).get_EGLImageDescriptor());
    1458           0 :             break;
    1459             :         }
    1460             :     case TSurfaceDescriptorMacIOSurface:
    1461             :         {
    1462           0 :             new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface((aOther).get_SurfaceDescriptorMacIOSurface());
    1463           0 :             break;
    1464             :         }
    1465             :     case TSurfaceDescriptorSharedGLTexture:
    1466             :         {
    1467           0 :             new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture((aOther).get_SurfaceDescriptorSharedGLTexture());
    1468           0 :             break;
    1469             :         }
    1470             :     case TSurfaceDescriptorGPUVideo:
    1471             :         {
    1472           0 :             new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo((aOther).get_SurfaceDescriptorGPUVideo());
    1473           0 :             break;
    1474             :         }
    1475             :     case Tnull_t:
    1476             :         {
    1477           0 :             new (mozilla::KnownNotNull, ptr_null_t()) null_t((aOther).get_null_t());
    1478           0 :             break;
    1479             :         }
    1480             :     case T__None:
    1481             :         {
    1482           0 :             break;
    1483             :         }
    1484             :     default:
    1485             :         {
    1486           0 :             mozilla::ipc::LogicError("unreached");
    1487           0 :             return;
    1488             :         }
    1489             :     }
    1490           0 :     mType = (aOther).type();
    1491             : }
    1492             : 
    1493          36 : SurfaceDescriptor::~SurfaceDescriptor()
    1494             : {
    1495          18 :     static_cast<void>(MaybeDestroy(T__None));
    1496          18 : }
    1497             : 
    1498          18 : auto SurfaceDescriptor::operator=(const SurfaceDescriptorBuffer& aRhs) -> SurfaceDescriptor&
    1499             : {
    1500          18 :     if (MaybeDestroy(TSurfaceDescriptorBuffer)) {
    1501          18 :         new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer;
    1502             :     }
    1503          18 :     (*(ptr_SurfaceDescriptorBuffer())) = aRhs;
    1504          18 :     mType = TSurfaceDescriptorBuffer;
    1505          18 :     return (*(this));
    1506             : }
    1507             : 
    1508           0 : auto SurfaceDescriptor::operator=(const SurfaceDescriptorDIB& aRhs) -> SurfaceDescriptor&
    1509             : {
    1510           0 :     if (MaybeDestroy(TSurfaceDescriptorDIB)) {
    1511           0 :         new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDIB()) SurfaceDescriptorDIB;
    1512             :     }
    1513           0 :     (*(ptr_SurfaceDescriptorDIB())) = aRhs;
    1514           0 :     mType = TSurfaceDescriptorDIB;
    1515           0 :     return (*(this));
    1516             : }
    1517             : 
    1518           0 : auto SurfaceDescriptor::operator=(const SurfaceDescriptorD3D10& aRhs) -> SurfaceDescriptor&
    1519             : {
    1520           0 :     if (MaybeDestroy(TSurfaceDescriptorD3D10)) {
    1521           0 :         new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10;
    1522             :     }
    1523           0 :     (*(ptr_SurfaceDescriptorD3D10())) = aRhs;
    1524           0 :     mType = TSurfaceDescriptorD3D10;
    1525           0 :     return (*(this));
    1526             : }
    1527             : 
    1528           0 : auto SurfaceDescriptor::operator=(const SurfaceDescriptorFileMapping& aRhs) -> SurfaceDescriptor&
    1529             : {
    1530           0 :     if (MaybeDestroy(TSurfaceDescriptorFileMapping)) {
    1531           0 :         new (mozilla::KnownNotNull, ptr_SurfaceDescriptorFileMapping()) SurfaceDescriptorFileMapping;
    1532             :     }
    1533           0 :     (*(ptr_SurfaceDescriptorFileMapping())) = aRhs;
    1534           0 :     mType = TSurfaceDescriptorFileMapping;
    1535           0 :     return (*(this));
    1536             : }
    1537             : 
    1538           0 : auto SurfaceDescriptor::operator=(const SurfaceDescriptorDXGIYCbCr& aRhs) -> SurfaceDescriptor&
    1539             : {
    1540           0 :     if (MaybeDestroy(TSurfaceDescriptorDXGIYCbCr)) {
    1541           0 :         new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr;
    1542             :     }
    1543           0 :     (*(ptr_SurfaceDescriptorDXGIYCbCr())) = aRhs;
    1544           0 :     mType = TSurfaceDescriptorDXGIYCbCr;
    1545           0 :     return (*(this));
    1546             : }
    1547             : 
    1548           0 : auto SurfaceDescriptor::operator=(const SurfaceDescriptorX11& aRhs) -> SurfaceDescriptor&
    1549             : {
    1550           0 :     if (MaybeDestroy(TSurfaceDescriptorX11)) {
    1551           0 :         new (mozilla::KnownNotNull, ptr_SurfaceDescriptorX11()) SurfaceDescriptorX11;
    1552             :     }
    1553           0 :     (*(ptr_SurfaceDescriptorX11())) = aRhs;
    1554           0 :     mType = TSurfaceDescriptorX11;
    1555           0 :     return (*(this));
    1556             : }
    1557             : 
    1558           0 : auto SurfaceDescriptor::operator=(const SurfaceTextureDescriptor& aRhs) -> SurfaceDescriptor&
    1559             : {
    1560           0 :     if (MaybeDestroy(TSurfaceTextureDescriptor)) {
    1561           0 :         new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor;
    1562             :     }
    1563           0 :     (*(ptr_SurfaceTextureDescriptor())) = aRhs;
    1564           0 :     mType = TSurfaceTextureDescriptor;
    1565           0 :     return (*(this));
    1566             : }
    1567             : 
    1568           0 : auto SurfaceDescriptor::operator=(const EGLImageDescriptor& aRhs) -> SurfaceDescriptor&
    1569             : {
    1570           0 :     if (MaybeDestroy(TEGLImageDescriptor)) {
    1571           0 :         new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor;
    1572             :     }
    1573           0 :     (*(ptr_EGLImageDescriptor())) = aRhs;
    1574           0 :     mType = TEGLImageDescriptor;
    1575           0 :     return (*(this));
    1576             : }
    1577             : 
    1578           0 : auto SurfaceDescriptor::operator=(const SurfaceDescriptorMacIOSurface& aRhs) -> SurfaceDescriptor&
    1579             : {
    1580           0 :     if (MaybeDestroy(TSurfaceDescriptorMacIOSurface)) {
    1581           0 :         new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface;
    1582             :     }
    1583           0 :     (*(ptr_SurfaceDescriptorMacIOSurface())) = aRhs;
    1584           0 :     mType = TSurfaceDescriptorMacIOSurface;
    1585           0 :     return (*(this));
    1586             : }
    1587             : 
    1588           0 : auto SurfaceDescriptor::operator=(const SurfaceDescriptorSharedGLTexture& aRhs) -> SurfaceDescriptor&
    1589             : {
    1590           0 :     if (MaybeDestroy(TSurfaceDescriptorSharedGLTexture)) {
    1591           0 :         new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture;
    1592             :     }
    1593           0 :     (*(ptr_SurfaceDescriptorSharedGLTexture())) = aRhs;
    1594           0 :     mType = TSurfaceDescriptorSharedGLTexture;
    1595           0 :     return (*(this));
    1596             : }
    1597             : 
    1598           0 : auto SurfaceDescriptor::operator=(const SurfaceDescriptorGPUVideo& aRhs) -> SurfaceDescriptor&
    1599             : {
    1600           0 :     if (MaybeDestroy(TSurfaceDescriptorGPUVideo)) {
    1601           0 :         new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo;
    1602             :     }
    1603           0 :     (*(ptr_SurfaceDescriptorGPUVideo())) = aRhs;
    1604           0 :     mType = TSurfaceDescriptorGPUVideo;
    1605           0 :     return (*(this));
    1606             : }
    1607             : 
    1608           0 : auto SurfaceDescriptor::operator=(const null_t& aRhs) -> SurfaceDescriptor&
    1609             : {
    1610           0 :     if (MaybeDestroy(Tnull_t)) {
    1611           0 :         new (mozilla::KnownNotNull, ptr_null_t()) null_t;
    1612             :     }
    1613           0 :     (*(ptr_null_t())) = aRhs;
    1614           0 :     mType = Tnull_t;
    1615           0 :     return (*(this));
    1616             : }
    1617             : 
    1618           0 : auto SurfaceDescriptor::operator=(const SurfaceDescriptor& aRhs) -> SurfaceDescriptor&
    1619             : {
    1620           0 :     (aRhs).AssertSanity();
    1621           0 :     Type t = (aRhs).type();
    1622           0 :     switch (t) {
    1623             :     case TSurfaceDescriptorBuffer:
    1624             :         {
    1625           0 :             if (MaybeDestroy(t)) {
    1626           0 :                 new (mozilla::KnownNotNull, ptr_SurfaceDescriptorBuffer()) SurfaceDescriptorBuffer;
    1627             :             }
    1628           0 :             (*(ptr_SurfaceDescriptorBuffer())) = (aRhs).get_SurfaceDescriptorBuffer();
    1629           0 :             break;
    1630             :         }
    1631             :     case TSurfaceDescriptorDIB:
    1632             :         {
    1633           0 :             if (MaybeDestroy(t)) {
    1634           0 :                 new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDIB()) SurfaceDescriptorDIB;
    1635             :             }
    1636           0 :             (*(ptr_SurfaceDescriptorDIB())) = (aRhs).get_SurfaceDescriptorDIB();
    1637           0 :             break;
    1638             :         }
    1639             :     case TSurfaceDescriptorD3D10:
    1640             :         {
    1641           0 :             if (MaybeDestroy(t)) {
    1642           0 :                 new (mozilla::KnownNotNull, ptr_SurfaceDescriptorD3D10()) SurfaceDescriptorD3D10;
    1643             :             }
    1644           0 :             (*(ptr_SurfaceDescriptorD3D10())) = (aRhs).get_SurfaceDescriptorD3D10();
    1645           0 :             break;
    1646             :         }
    1647             :     case TSurfaceDescriptorFileMapping:
    1648             :         {
    1649           0 :             if (MaybeDestroy(t)) {
    1650           0 :                 new (mozilla::KnownNotNull, ptr_SurfaceDescriptorFileMapping()) SurfaceDescriptorFileMapping;
    1651             :             }
    1652           0 :             (*(ptr_SurfaceDescriptorFileMapping())) = (aRhs).get_SurfaceDescriptorFileMapping();
    1653           0 :             break;
    1654             :         }
    1655             :     case TSurfaceDescriptorDXGIYCbCr:
    1656             :         {
    1657           0 :             if (MaybeDestroy(t)) {
    1658           0 :                 new (mozilla::KnownNotNull, ptr_SurfaceDescriptorDXGIYCbCr()) SurfaceDescriptorDXGIYCbCr;
    1659             :             }
    1660           0 :             (*(ptr_SurfaceDescriptorDXGIYCbCr())) = (aRhs).get_SurfaceDescriptorDXGIYCbCr();
    1661           0 :             break;
    1662             :         }
    1663             :     case TSurfaceDescriptorX11:
    1664             :         {
    1665           0 :             if (MaybeDestroy(t)) {
    1666           0 :                 new (mozilla::KnownNotNull, ptr_SurfaceDescriptorX11()) SurfaceDescriptorX11;
    1667             :             }
    1668           0 :             (*(ptr_SurfaceDescriptorX11())) = (aRhs).get_SurfaceDescriptorX11();
    1669           0 :             break;
    1670             :         }
    1671             :     case TSurfaceTextureDescriptor:
    1672             :         {
    1673           0 :             if (MaybeDestroy(t)) {
    1674           0 :                 new (mozilla::KnownNotNull, ptr_SurfaceTextureDescriptor()) SurfaceTextureDescriptor;
    1675             :             }
    1676           0 :             (*(ptr_SurfaceTextureDescriptor())) = (aRhs).get_SurfaceTextureDescriptor();
    1677           0 :             break;
    1678             :         }
    1679             :     case TEGLImageDescriptor:
    1680             :         {
    1681           0 :             if (MaybeDestroy(t)) {
    1682           0 :                 new (mozilla::KnownNotNull, ptr_EGLImageDescriptor()) EGLImageDescriptor;
    1683             :             }
    1684           0 :             (*(ptr_EGLImageDescriptor())) = (aRhs).get_EGLImageDescriptor();
    1685           0 :             break;
    1686             :         }
    1687             :     case TSurfaceDescriptorMacIOSurface:
    1688             :         {
    1689           0 :             if (MaybeDestroy(t)) {
    1690           0 :                 new (mozilla::KnownNotNull, ptr_SurfaceDescriptorMacIOSurface()) SurfaceDescriptorMacIOSurface;
    1691             :             }
    1692           0 :             (*(ptr_SurfaceDescriptorMacIOSurface())) = (aRhs).get_SurfaceDescriptorMacIOSurface();
    1693           0 :             break;
    1694             :         }
    1695             :     case TSurfaceDescriptorSharedGLTexture:
    1696             :         {
    1697           0 :             if (MaybeDestroy(t)) {
    1698           0 :                 new (mozilla::KnownNotNull, ptr_SurfaceDescriptorSharedGLTexture()) SurfaceDescriptorSharedGLTexture;
    1699             :             }
    1700           0 :             (*(ptr_SurfaceDescriptorSharedGLTexture())) = (aRhs).get_SurfaceDescriptorSharedGLTexture();
    1701           0 :             break;
    1702             :         }
    1703             :     case TSurfaceDescriptorGPUVideo:
    1704             :         {
    1705           0 :             if (MaybeDestroy(t)) {
    1706           0 :                 new (mozilla::KnownNotNull, ptr_SurfaceDescriptorGPUVideo()) SurfaceDescriptorGPUVideo;
    1707             :             }
    1708           0 :             (*(ptr_SurfaceDescriptorGPUVideo())) = (aRhs).get_SurfaceDescriptorGPUVideo();
    1709           0 :             break;
    1710             :         }
    1711             :     case Tnull_t:
    1712             :         {
    1713           0 :             if (MaybeDestroy(t)) {
    1714           0 :                 new (mozilla::KnownNotNull, ptr_null_t()) null_t;
    1715             :             }
    1716           0 :             (*(ptr_null_t())) = (aRhs).get_null_t();
    1717           0 :             break;
    1718             :         }
    1719             :     case T__None:
    1720             :         {
    1721           0 :             static_cast<void>(MaybeDestroy(t));
    1722           0 :             break;
    1723             :         }
    1724             :     default:
    1725             :         {
    1726           0 :             mozilla::ipc::LogicError("unreached");
    1727           0 :             break;
    1728             :         }
    1729             :     }
    1730           0 :     mType = t;
    1731           0 :     return (*(this));
    1732             : }
    1733             : 
    1734           0 : auto SurfaceDescriptor::operator==(const SurfaceDescriptorBuffer& aRhs) const -> bool
    1735             : {
    1736           0 :     return (get_SurfaceDescriptorBuffer()) == (aRhs);
    1737             : }
    1738             : 
    1739           0 : auto SurfaceDescriptor::operator==(const SurfaceDescriptorDIB& aRhs) const -> bool
    1740             : {
    1741           0 :     return (get_SurfaceDescriptorDIB()) == (aRhs);
    1742             : }
    1743             : 
    1744           0 : auto SurfaceDescriptor::operator==(const SurfaceDescriptorD3D10& aRhs) const -> bool
    1745             : {
    1746           0 :     return (get_SurfaceDescriptorD3D10()) == (aRhs);
    1747             : }
    1748             : 
    1749           0 : auto SurfaceDescriptor::operator==(const SurfaceDescriptorFileMapping& aRhs) const -> bool
    1750             : {
    1751           0 :     return (get_SurfaceDescriptorFileMapping()) == (aRhs);
    1752             : }
    1753             : 
    1754           0 : auto SurfaceDescriptor::operator==(const SurfaceDescriptorDXGIYCbCr& aRhs) const -> bool
    1755             : {
    1756           0 :     return (get_SurfaceDescriptorDXGIYCbCr()) == (aRhs);
    1757             : }
    1758             : 
    1759           0 : auto SurfaceDescriptor::operator==(const SurfaceDescriptorX11& aRhs) const -> bool
    1760             : {
    1761           0 :     return (get_SurfaceDescriptorX11()) == (aRhs);
    1762             : }
    1763             : 
    1764           0 : auto SurfaceDescriptor::operator==(const SurfaceTextureDescriptor& aRhs) const -> bool
    1765             : {
    1766           0 :     return (get_SurfaceTextureDescriptor()) == (aRhs);
    1767             : }
    1768             : 
    1769           0 : auto SurfaceDescriptor::operator==(const EGLImageDescriptor& aRhs) const -> bool
    1770             : {
    1771           0 :     return (get_EGLImageDescriptor()) == (aRhs);
    1772             : }
    1773             : 
    1774           0 : auto SurfaceDescriptor::operator==(const SurfaceDescriptorMacIOSurface& aRhs) const -> bool
    1775             : {
    1776           0 :     return (get_SurfaceDescriptorMacIOSurface()) == (aRhs);
    1777             : }
    1778             : 
    1779           0 : auto SurfaceDescriptor::operator==(const SurfaceDescriptorSharedGLTexture& aRhs) const -> bool
    1780             : {
    1781           0 :     return (get_SurfaceDescriptorSharedGLTexture()) == (aRhs);
    1782             : }
    1783             : 
    1784           0 : auto SurfaceDescriptor::operator==(const SurfaceDescriptorGPUVideo& aRhs) const -> bool
    1785             : {
    1786           0 :     return (get_SurfaceDescriptorGPUVideo()) == (aRhs);
    1787             : }
    1788             : 
    1789           0 : auto SurfaceDescriptor::operator==(const null_t& aRhs) const -> bool
    1790             : {
    1791           0 :     return (get_null_t()) == (aRhs);
    1792             : }
    1793             : 
    1794           0 : auto SurfaceDescriptor::operator==(const SurfaceDescriptor& aRhs) const -> bool
    1795             : {
    1796           0 :     if ((type()) != ((aRhs).type())) {
    1797           0 :         return false;
    1798             :     }
    1799             : 
    1800           0 :     switch (type()) {
    1801             :     case TSurfaceDescriptorBuffer:
    1802             :         {
    1803           0 :             return (get_SurfaceDescriptorBuffer()) == ((aRhs).get_SurfaceDescriptorBuffer());
    1804             :         }
    1805             :     case TSurfaceDescriptorDIB:
    1806             :         {
    1807           0 :             return (get_SurfaceDescriptorDIB()) == ((aRhs).get_SurfaceDescriptorDIB());
    1808             :         }
    1809             :     case TSurfaceDescriptorD3D10:
    1810             :         {
    1811           0 :             return (get_SurfaceDescriptorD3D10()) == ((aRhs).get_SurfaceDescriptorD3D10());
    1812             :         }
    1813             :     case TSurfaceDescriptorFileMapping:
    1814             :         {
    1815           0 :             return (get_SurfaceDescriptorFileMapping()) == ((aRhs).get_SurfaceDescriptorFileMapping());
    1816             :         }
    1817             :     case TSurfaceDescriptorDXGIYCbCr:
    1818             :         {
    1819           0 :             return (get_SurfaceDescriptorDXGIYCbCr()) == ((aRhs).get_SurfaceDescriptorDXGIYCbCr());
    1820             :         }
    1821             :     case TSurfaceDescriptorX11:
    1822             :         {
    1823           0 :             return (get_SurfaceDescriptorX11()) == ((aRhs).get_SurfaceDescriptorX11());
    1824             :         }
    1825             :     case TSurfaceTextureDescriptor:
    1826             :         {
    1827           0 :             return (get_SurfaceTextureDescriptor()) == ((aRhs).get_SurfaceTextureDescriptor());
    1828             :         }
    1829             :     case TEGLImageDescriptor:
    1830             :         {
    1831           0 :             return (get_EGLImageDescriptor()) == ((aRhs).get_EGLImageDescriptor());
    1832             :         }
    1833             :     case TSurfaceDescriptorMacIOSurface:
    1834             :         {
    1835           0 :             return (get_SurfaceDescriptorMacIOSurface()) == ((aRhs).get_SurfaceDescriptorMacIOSurface());
    1836             :         }
    1837             :     case TSurfaceDescriptorSharedGLTexture:
    1838             :         {
    1839           0 :             return (get_SurfaceDescriptorSharedGLTexture()) == ((aRhs).get_SurfaceDescriptorSharedGLTexture());
    1840             :         }
    1841             :     case TSurfaceDescriptorGPUVideo:
    1842             :         {
    1843           0 :             return (get_SurfaceDescriptorGPUVideo()) == ((aRhs).get_SurfaceDescriptorGPUVideo());
    1844             :         }
    1845             :     case Tnull_t:
    1846             :         {
    1847           0 :             return (get_null_t()) == ((aRhs).get_null_t());
    1848             :         }
    1849             :     default:
    1850             :         {
    1851           0 :             mozilla::ipc::LogicError("unreached");
    1852           0 :             return false;
    1853             :         }
    1854             :     }
    1855             : }
    1856             : 
    1857           0 : auto SurfaceDescriptor::get(SurfaceDescriptorBuffer* aOutValue) const -> void
    1858             : {
    1859           0 :     (*(aOutValue)) = get_SurfaceDescriptorBuffer();
    1860           0 : }
    1861             : 
    1862           0 : auto SurfaceDescriptor::get(SurfaceDescriptorDIB* aOutValue) const -> void
    1863             : {
    1864           0 :     (*(aOutValue)) = get_SurfaceDescriptorDIB();
    1865           0 : }
    1866             : 
    1867           0 : auto SurfaceDescriptor::get(SurfaceDescriptorD3D10* aOutValue) const -> void
    1868             : {
    1869           0 :     (*(aOutValue)) = get_SurfaceDescriptorD3D10();
    1870           0 : }
    1871             : 
    1872           0 : auto SurfaceDescriptor::get(SurfaceDescriptorFileMapping* aOutValue) const -> void
    1873             : {
    1874           0 :     (*(aOutValue)) = get_SurfaceDescriptorFileMapping();
    1875           0 : }
    1876             : 
    1877           0 : auto SurfaceDescriptor::get(SurfaceDescriptorDXGIYCbCr* aOutValue) const -> void
    1878             : {
    1879           0 :     (*(aOutValue)) = get_SurfaceDescriptorDXGIYCbCr();
    1880           0 : }
    1881             : 
    1882           0 : auto SurfaceDescriptor::get(SurfaceDescriptorX11* aOutValue) const -> void
    1883             : {
    1884           0 :     (*(aOutValue)) = get_SurfaceDescriptorX11();
    1885           0 : }
    1886             : 
    1887           0 : auto SurfaceDescriptor::get(SurfaceTextureDescriptor* aOutValue) const -> void
    1888             : {
    1889           0 :     (*(aOutValue)) = get_SurfaceTextureDescriptor();
    1890           0 : }
    1891             : 
    1892           0 : auto SurfaceDescriptor::get(EGLImageDescriptor* aOutValue) const -> void
    1893             : {
    1894           0 :     (*(aOutValue)) = get_EGLImageDescriptor();
    1895           0 : }
    1896             : 
    1897           0 : auto SurfaceDescriptor::get(SurfaceDescriptorMacIOSurface* aOutValue) const -> void
    1898             : {
    1899           0 :     (*(aOutValue)) = get_SurfaceDescriptorMacIOSurface();
    1900           0 : }
    1901             : 
    1902           0 : auto SurfaceDescriptor::get(SurfaceDescriptorSharedGLTexture* aOutValue) const -> void
    1903             : {
    1904           0 :     (*(aOutValue)) = get_SurfaceDescriptorSharedGLTexture();
    1905           0 : }
    1906             : 
    1907           0 : auto SurfaceDescriptor::get(SurfaceDescriptorGPUVideo* aOutValue) const -> void
    1908             : {
    1909           0 :     (*(aOutValue)) = get_SurfaceDescriptorGPUVideo();
    1910           0 : }
    1911             : 
    1912           0 : auto SurfaceDescriptor::get(null_t* aOutValue) const -> void
    1913             : {
    1914           0 :     (*(aOutValue)) = get_null_t();
    1915           0 : }
    1916             : 
    1917             : } // namespace layers
    1918             : } // namespace mozilla

Generated by: LCOV version 1.13