LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/ipc/ipdl - GraphicsMessages.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 145 486 29.8 %
Date: 2017-07-14 16:53:18 Functions: 31 91 34.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/gfx/GraphicsMessages.h"
       8             : 
       9             : 
      10             : //-----------------------------------------------------------------------------
      11             : // Method definitions for the IPDL type |struct D3D11DeviceStatus|
      12             : //
      13             : namespace mozilla {
      14             : namespace gfx {
      15           4 : MOZ_IMPLICIT D3D11DeviceStatus::D3D11DeviceStatus() :
      16             :     isWARP_(),
      17             :     textureSharingWorks_(),
      18             :     featureLevel_(),
      19           4 :     adapter_()
      20             : {
      21           4 :     Init();
      22           4 : }
      23             : 
      24           4 : D3D11DeviceStatus::~D3D11DeviceStatus()
      25             : {
      26           4 : }
      27             : 
      28           0 : auto D3D11DeviceStatus::operator==(const D3D11DeviceStatus& _o) const -> bool
      29             : {
      30           0 :     if ((!((isWARP()) == ((_o).isWARP())))) {
      31           0 :         return false;
      32             :     }
      33           0 :     if ((!((textureSharingWorks()) == ((_o).textureSharingWorks())))) {
      34           0 :         return false;
      35             :     }
      36           0 :     if ((!((featureLevel()) == ((_o).featureLevel())))) {
      37           0 :         return false;
      38             :     }
      39           0 :     if ((!((adapter()) == ((_o).adapter())))) {
      40           0 :         return false;
      41             :     }
      42           0 :     return true;
      43             : }
      44             : 
      45           0 : auto D3D11DeviceStatus::operator!=(const D3D11DeviceStatus& _o) const -> bool
      46             : {
      47           0 :     return (!(operator==(_o)));
      48             : }
      49             : 
      50           4 : auto D3D11DeviceStatus::Init() -> void
      51             : {
      52           4 : }
      53             : 
      54           0 : auto D3D11DeviceStatus::Assign(
      55             :         const bool& _isWARP,
      56             :         const bool& _textureSharingWorks,
      57             :         const uint32_t& _featureLevel,
      58             :         const DxgiAdapterDesc& _adapter) -> void
      59             : {
      60           0 :     isWARP_ = _isWARP;
      61           0 :     textureSharingWorks_ = _textureSharingWorks;
      62           0 :     featureLevel_ = _featureLevel;
      63             :     adapter_ = _adapter;
      64           0 : }
      65             : 
      66             : } // namespace gfx
      67             : } // namespace mozilla
      68             : 
      69             : //-----------------------------------------------------------------------------
      70             : // Method definitions for the IPDL type |struct DevicePrefs|
      71             : //
      72             : namespace mozilla {
      73             : namespace gfx {
      74           4 : MOZ_IMPLICIT DevicePrefs::DevicePrefs() :
      75             :     hwCompositing_(),
      76             :     d3d11Compositing_(),
      77             :     oglCompositing_(),
      78             :     advancedLayers_(),
      79           4 :     useD2D1_()
      80             : {
      81           4 :     Init();
      82           4 : }
      83             : 
      84           4 : DevicePrefs::~DevicePrefs()
      85             : {
      86           4 : }
      87             : 
      88           0 : auto DevicePrefs::operator==(const DevicePrefs& _o) const -> bool
      89             : {
      90           0 :     if ((!((hwCompositing()) == ((_o).hwCompositing())))) {
      91           0 :         return false;
      92             :     }
      93           0 :     if ((!((d3d11Compositing()) == ((_o).d3d11Compositing())))) {
      94           0 :         return false;
      95             :     }
      96           0 :     if ((!((oglCompositing()) == ((_o).oglCompositing())))) {
      97           0 :         return false;
      98             :     }
      99           0 :     if ((!((advancedLayers()) == ((_o).advancedLayers())))) {
     100           0 :         return false;
     101             :     }
     102           0 :     if ((!((useD2D1()) == ((_o).useD2D1())))) {
     103           0 :         return false;
     104             :     }
     105           0 :     return true;
     106             : }
     107             : 
     108           0 : auto DevicePrefs::operator!=(const DevicePrefs& _o) const -> bool
     109             : {
     110           0 :     return (!(operator==(_o)));
     111             : }
     112             : 
     113           4 : auto DevicePrefs::Init() -> void
     114             : {
     115           4 : }
     116             : 
     117           0 : auto DevicePrefs::Assign(
     118             :         const FeatureStatus& _hwCompositing,
     119             :         const FeatureStatus& _d3d11Compositing,
     120             :         const FeatureStatus& _oglCompositing,
     121             :         const FeatureStatus& _advancedLayers,
     122             :         const FeatureStatus& _useD2D1) -> void
     123             : {
     124           0 :     hwCompositing_ = _hwCompositing;
     125           0 :     d3d11Compositing_ = _d3d11Compositing;
     126           0 :     oglCompositing_ = _oglCompositing;
     127           0 :     advancedLayers_ = _advancedLayers;
     128           0 :     useD2D1_ = _useD2D1;
     129           0 : }
     130             : 
     131             : } // namespace gfx
     132             : } // namespace mozilla
     133             : 
     134             : //-----------------------------------------------------------------------------
     135             : // Method definitions for the IPDL type |struct ContentDeviceData|
     136             : //
     137             : namespace mozilla {
     138             : namespace gfx {
     139           4 : MOZ_IMPLICIT ContentDeviceData::ContentDeviceData()
     140             : {
     141           4 :     Init();
     142           4 : }
     143             : 
     144           4 : ContentDeviceData::~ContentDeviceData()
     145             : {
     146           4 : }
     147             : 
     148           0 : auto ContentDeviceData::operator==(const ContentDeviceData& _o) const -> bool
     149             : {
     150           0 :     if ((!((prefs()) == ((_o).prefs())))) {
     151           0 :         return false;
     152             :     }
     153           0 :     if ((!((d3d11()) == ((_o).d3d11())))) {
     154           0 :         return false;
     155             :     }
     156           0 :     return true;
     157             : }
     158             : 
     159           0 : auto ContentDeviceData::operator!=(const ContentDeviceData& _o) const -> bool
     160             : {
     161           0 :     return (!(operator==(_o)));
     162             : }
     163             : 
     164           4 : auto ContentDeviceData::Init() -> void
     165             : {
     166           4 : }
     167             : 
     168           0 : auto ContentDeviceData::Assign(
     169             :         const DevicePrefs& _prefs,
     170             :         const D3D11DeviceStatus& _d3d11) -> void
     171             : {
     172           0 :     prefs_ = _prefs;
     173           0 :     d3d11_ = _d3d11;
     174           0 : }
     175             : 
     176             : } // namespace gfx
     177             : } // namespace mozilla
     178             : 
     179             : //-----------------------------------------------------------------------------
     180             : // Method definitions for the IPDL type |struct FeatureFailure|
     181             : //
     182             : namespace mozilla {
     183             : namespace gfx {
     184           0 : MOZ_IMPLICIT FeatureFailure::FeatureFailure() :
     185             :     status_(),
     186             :     message_(),
     187           0 :     failureId_()
     188             : {
     189           0 :     Init();
     190           0 : }
     191             : 
     192           0 : FeatureFailure::~FeatureFailure()
     193             : {
     194           0 : }
     195             : 
     196           0 : auto FeatureFailure::operator==(const FeatureFailure& _o) const -> bool
     197             : {
     198           0 :     if ((!((status()) == ((_o).status())))) {
     199           0 :         return false;
     200             :     }
     201           0 :     if ((!((message()) == ((_o).message())))) {
     202           0 :         return false;
     203             :     }
     204           0 :     if ((!((failureId()) == ((_o).failureId())))) {
     205           0 :         return false;
     206             :     }
     207           0 :     return true;
     208             : }
     209             : 
     210           0 : auto FeatureFailure::operator!=(const FeatureFailure& _o) const -> bool
     211             : {
     212           0 :     return (!(operator==(_o)));
     213             : }
     214             : 
     215           0 : auto FeatureFailure::Init() -> void
     216             : {
     217           0 : }
     218             : 
     219           0 : auto FeatureFailure::Assign(
     220             :         const FeatureStatus& _status,
     221             :         const nsCString& _message,
     222             :         const nsCString& _failureId) -> void
     223             : {
     224           0 :     status_ = _status;
     225           0 :     message_ = _message;
     226           0 :     failureId_ = _failureId;
     227           0 : }
     228             : 
     229             : } // namespace gfx
     230             : } // namespace mozilla
     231             : 
     232             : //-----------------------------------------------------------------------------
     233             : // Method definitions for the IPDL type |union FeatureChange|
     234             : //
     235             : namespace mozilla {
     236             : namespace gfx {
     237           0 : auto FeatureChange::MaybeDestroy(Type aNewType) -> bool
     238             : {
     239           0 :     if ((mType) == (T__None)) {
     240           0 :         return true;
     241             :     }
     242           0 :     if ((mType) == (aNewType)) {
     243           0 :         return false;
     244             :     }
     245           0 :     switch (mType) {
     246             :     case Tnull_t:
     247             :         {
     248           0 :             (ptr_null_t())->~null_t__tdef();
     249           0 :             break;
     250             :         }
     251             :     case TFeatureFailure:
     252             :         {
     253           0 :             (ptr_FeatureFailure())->~FeatureFailure__tdef();
     254           0 :             break;
     255             :         }
     256             :     default:
     257             :         {
     258           0 :             mozilla::ipc::LogicError("not reached");
     259           0 :             break;
     260             :         }
     261             :     }
     262           0 :     return true;
     263             : }
     264             : 
     265           0 : MOZ_IMPLICIT FeatureChange::FeatureChange(const null_t& aOther)
     266             : {
     267           0 :     new (mozilla::KnownNotNull, ptr_null_t()) null_t(aOther);
     268           0 :     mType = Tnull_t;
     269           0 : }
     270             : 
     271           0 : MOZ_IMPLICIT FeatureChange::FeatureChange(const FeatureFailure& aOther)
     272             : {
     273           0 :     new (mozilla::KnownNotNull, ptr_FeatureFailure()) FeatureFailure(aOther);
     274           0 :     mType = TFeatureFailure;
     275           0 : }
     276             : 
     277           0 : MOZ_IMPLICIT FeatureChange::FeatureChange(const FeatureChange& aOther)
     278             : {
     279           0 :     (aOther).AssertSanity();
     280           0 :     switch ((aOther).type()) {
     281             :     case Tnull_t:
     282             :         {
     283           0 :             new (mozilla::KnownNotNull, ptr_null_t()) null_t((aOther).get_null_t());
     284           0 :             break;
     285             :         }
     286             :     case TFeatureFailure:
     287             :         {
     288           0 :             new (mozilla::KnownNotNull, ptr_FeatureFailure()) FeatureFailure((aOther).get_FeatureFailure());
     289           0 :             break;
     290             :         }
     291             :     case T__None:
     292             :         {
     293           0 :             break;
     294             :         }
     295             :     default:
     296             :         {
     297           0 :             mozilla::ipc::LogicError("unreached");
     298           0 :             return;
     299             :         }
     300             :     }
     301           0 :     mType = (aOther).type();
     302             : }
     303             : 
     304           0 : FeatureChange::~FeatureChange()
     305             : {
     306           0 :     static_cast<void>(MaybeDestroy(T__None));
     307           0 : }
     308             : 
     309           0 : auto FeatureChange::operator=(const null_t& aRhs) -> FeatureChange&
     310             : {
     311           0 :     if (MaybeDestroy(Tnull_t)) {
     312           0 :         new (mozilla::KnownNotNull, ptr_null_t()) null_t;
     313             :     }
     314           0 :     (*(ptr_null_t())) = aRhs;
     315           0 :     mType = Tnull_t;
     316           0 :     return (*(this));
     317             : }
     318             : 
     319           0 : auto FeatureChange::operator=(const FeatureFailure& aRhs) -> FeatureChange&
     320             : {
     321           0 :     if (MaybeDestroy(TFeatureFailure)) {
     322           0 :         new (mozilla::KnownNotNull, ptr_FeatureFailure()) FeatureFailure;
     323             :     }
     324           0 :     (*(ptr_FeatureFailure())) = aRhs;
     325           0 :     mType = TFeatureFailure;
     326           0 :     return (*(this));
     327             : }
     328             : 
     329           0 : auto FeatureChange::operator=(const FeatureChange& aRhs) -> FeatureChange&
     330             : {
     331           0 :     (aRhs).AssertSanity();
     332           0 :     Type t = (aRhs).type();
     333           0 :     switch (t) {
     334             :     case Tnull_t:
     335             :         {
     336           0 :             if (MaybeDestroy(t)) {
     337           0 :                 new (mozilla::KnownNotNull, ptr_null_t()) null_t;
     338             :             }
     339           0 :             (*(ptr_null_t())) = (aRhs).get_null_t();
     340           0 :             break;
     341             :         }
     342             :     case TFeatureFailure:
     343             :         {
     344           0 :             if (MaybeDestroy(t)) {
     345           0 :                 new (mozilla::KnownNotNull, ptr_FeatureFailure()) FeatureFailure;
     346             :             }
     347           0 :             (*(ptr_FeatureFailure())) = (aRhs).get_FeatureFailure();
     348           0 :             break;
     349             :         }
     350             :     case T__None:
     351             :         {
     352           0 :             static_cast<void>(MaybeDestroy(t));
     353           0 :             break;
     354             :         }
     355             :     default:
     356             :         {
     357           0 :             mozilla::ipc::LogicError("unreached");
     358           0 :             break;
     359             :         }
     360             :     }
     361           0 :     mType = t;
     362           0 :     return (*(this));
     363             : }
     364             : 
     365           0 : auto FeatureChange::operator==(const null_t& aRhs) const -> bool
     366             : {
     367           0 :     return (get_null_t()) == (aRhs);
     368             : }
     369             : 
     370           0 : auto FeatureChange::operator==(const FeatureFailure& aRhs) const -> bool
     371             : {
     372           0 :     return (get_FeatureFailure()) == (aRhs);
     373             : }
     374             : 
     375           0 : auto FeatureChange::operator==(const FeatureChange& aRhs) const -> bool
     376             : {
     377           0 :     if ((type()) != ((aRhs).type())) {
     378           0 :         return false;
     379             :     }
     380             : 
     381           0 :     switch (type()) {
     382             :     case Tnull_t:
     383             :         {
     384           0 :             return (get_null_t()) == ((aRhs).get_null_t());
     385             :         }
     386             :     case TFeatureFailure:
     387             :         {
     388           0 :             return (get_FeatureFailure()) == ((aRhs).get_FeatureFailure());
     389             :         }
     390             :     default:
     391             :         {
     392           0 :             mozilla::ipc::LogicError("unreached");
     393           0 :             return false;
     394             :         }
     395             :     }
     396             : }
     397             : 
     398           0 : auto FeatureChange::get(null_t* aOutValue) const -> void
     399             : {
     400           0 :     (*(aOutValue)) = get_null_t();
     401           0 : }
     402             : 
     403           0 : auto FeatureChange::get(FeatureFailure* aOutValue) const -> void
     404             : {
     405           0 :     (*(aOutValue)) = get_FeatureFailure();
     406           0 : }
     407             : 
     408             : } // namespace gfx
     409             : } // namespace mozilla
     410             : 
     411             : //-----------------------------------------------------------------------------
     412             : // Method definitions for the IPDL type |union GPUDeviceStatus|
     413             : //
     414             : namespace mozilla {
     415             : namespace gfx {
     416           0 : auto GPUDeviceStatus::MaybeDestroy(Type aNewType) -> bool
     417             : {
     418           0 :     if ((mType) == (T__None)) {
     419           0 :         return true;
     420             :     }
     421           0 :     if ((mType) == (aNewType)) {
     422           0 :         return false;
     423             :     }
     424           0 :     switch (mType) {
     425             :     case Tnull_t:
     426             :         {
     427           0 :             (ptr_null_t())->~null_t__tdef();
     428           0 :             break;
     429             :         }
     430             :     case TD3D11DeviceStatus:
     431             :         {
     432           0 :             (ptr_D3D11DeviceStatus())->~D3D11DeviceStatus__tdef();
     433           0 :             break;
     434             :         }
     435             :     default:
     436             :         {
     437           0 :             mozilla::ipc::LogicError("not reached");
     438           0 :             break;
     439             :         }
     440             :     }
     441           0 :     return true;
     442             : }
     443             : 
     444           0 : MOZ_IMPLICIT GPUDeviceStatus::GPUDeviceStatus(const null_t& aOther)
     445             : {
     446           0 :     new (mozilla::KnownNotNull, ptr_null_t()) null_t(aOther);
     447           0 :     mType = Tnull_t;
     448           0 : }
     449             : 
     450           0 : MOZ_IMPLICIT GPUDeviceStatus::GPUDeviceStatus(const D3D11DeviceStatus& aOther)
     451             : {
     452           0 :     new (mozilla::KnownNotNull, ptr_D3D11DeviceStatus()) D3D11DeviceStatus(aOther);
     453           0 :     mType = TD3D11DeviceStatus;
     454           0 : }
     455             : 
     456           0 : MOZ_IMPLICIT GPUDeviceStatus::GPUDeviceStatus(const GPUDeviceStatus& aOther)
     457             : {
     458           0 :     (aOther).AssertSanity();
     459           0 :     switch ((aOther).type()) {
     460             :     case Tnull_t:
     461             :         {
     462           0 :             new (mozilla::KnownNotNull, ptr_null_t()) null_t((aOther).get_null_t());
     463           0 :             break;
     464             :         }
     465             :     case TD3D11DeviceStatus:
     466             :         {
     467           0 :             new (mozilla::KnownNotNull, ptr_D3D11DeviceStatus()) D3D11DeviceStatus((aOther).get_D3D11DeviceStatus());
     468           0 :             break;
     469             :         }
     470             :     case T__None:
     471             :         {
     472           0 :             break;
     473             :         }
     474             :     default:
     475             :         {
     476           0 :             mozilla::ipc::LogicError("unreached");
     477           0 :             return;
     478             :         }
     479             :     }
     480           0 :     mType = (aOther).type();
     481             : }
     482             : 
     483           0 : GPUDeviceStatus::~GPUDeviceStatus()
     484             : {
     485           0 :     static_cast<void>(MaybeDestroy(T__None));
     486           0 : }
     487             : 
     488           0 : auto GPUDeviceStatus::operator=(const null_t& aRhs) -> GPUDeviceStatus&
     489             : {
     490           0 :     if (MaybeDestroy(Tnull_t)) {
     491           0 :         new (mozilla::KnownNotNull, ptr_null_t()) null_t;
     492             :     }
     493           0 :     (*(ptr_null_t())) = aRhs;
     494           0 :     mType = Tnull_t;
     495           0 :     return (*(this));
     496             : }
     497             : 
     498           0 : auto GPUDeviceStatus::operator=(const D3D11DeviceStatus& aRhs) -> GPUDeviceStatus&
     499             : {
     500           0 :     if (MaybeDestroy(TD3D11DeviceStatus)) {
     501           0 :         new (mozilla::KnownNotNull, ptr_D3D11DeviceStatus()) D3D11DeviceStatus;
     502             :     }
     503           0 :     (*(ptr_D3D11DeviceStatus())) = aRhs;
     504           0 :     mType = TD3D11DeviceStatus;
     505           0 :     return (*(this));
     506             : }
     507             : 
     508           0 : auto GPUDeviceStatus::operator=(const GPUDeviceStatus& aRhs) -> GPUDeviceStatus&
     509             : {
     510           0 :     (aRhs).AssertSanity();
     511           0 :     Type t = (aRhs).type();
     512           0 :     switch (t) {
     513             :     case Tnull_t:
     514             :         {
     515           0 :             if (MaybeDestroy(t)) {
     516           0 :                 new (mozilla::KnownNotNull, ptr_null_t()) null_t;
     517             :             }
     518           0 :             (*(ptr_null_t())) = (aRhs).get_null_t();
     519           0 :             break;
     520             :         }
     521             :     case TD3D11DeviceStatus:
     522             :         {
     523           0 :             if (MaybeDestroy(t)) {
     524           0 :                 new (mozilla::KnownNotNull, ptr_D3D11DeviceStatus()) D3D11DeviceStatus;
     525             :             }
     526           0 :             (*(ptr_D3D11DeviceStatus())) = (aRhs).get_D3D11DeviceStatus();
     527           0 :             break;
     528             :         }
     529             :     case T__None:
     530             :         {
     531           0 :             static_cast<void>(MaybeDestroy(t));
     532           0 :             break;
     533             :         }
     534             :     default:
     535             :         {
     536           0 :             mozilla::ipc::LogicError("unreached");
     537           0 :             break;
     538             :         }
     539             :     }
     540           0 :     mType = t;
     541           0 :     return (*(this));
     542             : }
     543             : 
     544           0 : auto GPUDeviceStatus::operator==(const null_t& aRhs) const -> bool
     545             : {
     546           0 :     return (get_null_t()) == (aRhs);
     547             : }
     548             : 
     549           0 : auto GPUDeviceStatus::operator==(const D3D11DeviceStatus& aRhs) const -> bool
     550             : {
     551           0 :     return (get_D3D11DeviceStatus()) == (aRhs);
     552             : }
     553             : 
     554           0 : auto GPUDeviceStatus::operator==(const GPUDeviceStatus& aRhs) const -> bool
     555             : {
     556           0 :     if ((type()) != ((aRhs).type())) {
     557           0 :         return false;
     558             :     }
     559             : 
     560           0 :     switch (type()) {
     561             :     case Tnull_t:
     562             :         {
     563           0 :             return (get_null_t()) == ((aRhs).get_null_t());
     564             :         }
     565             :     case TD3D11DeviceStatus:
     566             :         {
     567           0 :             return (get_D3D11DeviceStatus()) == ((aRhs).get_D3D11DeviceStatus());
     568             :         }
     569             :     default:
     570             :         {
     571           0 :             mozilla::ipc::LogicError("unreached");
     572           0 :             return false;
     573             :         }
     574             :     }
     575             : }
     576             : 
     577           0 : auto GPUDeviceStatus::get(null_t* aOutValue) const -> void
     578             : {
     579           0 :     (*(aOutValue)) = get_null_t();
     580           0 : }
     581             : 
     582           0 : auto GPUDeviceStatus::get(D3D11DeviceStatus* aOutValue) const -> void
     583             : {
     584           0 :     (*(aOutValue)) = get_D3D11DeviceStatus();
     585           0 : }
     586             : 
     587             : } // namespace gfx
     588             : } // namespace mozilla
     589             : 
     590             : //-----------------------------------------------------------------------------
     591             : // Method definitions for the IPDL type |struct GPUDeviceData|
     592             : //
     593             : namespace mozilla {
     594             : namespace gfx {
     595           0 : MOZ_IMPLICIT GPUDeviceData::GPUDeviceData()
     596             : {
     597           0 :     Init();
     598           0 : }
     599             : 
     600           0 : GPUDeviceData::~GPUDeviceData()
     601             : {
     602           0 : }
     603             : 
     604           0 : auto GPUDeviceData::operator==(const GPUDeviceData& _o) const -> bool
     605             : {
     606           0 :     if ((!((d3d11Compositing()) == ((_o).d3d11Compositing())))) {
     607           0 :         return false;
     608             :     }
     609           0 :     if ((!((oglCompositing()) == ((_o).oglCompositing())))) {
     610           0 :         return false;
     611             :     }
     612           0 :     if ((!((advancedLayers()) == ((_o).advancedLayers())))) {
     613           0 :         return false;
     614             :     }
     615           0 :     if ((!((gpuDevice()) == ((_o).gpuDevice())))) {
     616           0 :         return false;
     617             :     }
     618           0 :     return true;
     619             : }
     620             : 
     621           0 : auto GPUDeviceData::operator!=(const GPUDeviceData& _o) const -> bool
     622             : {
     623           0 :     return (!(operator==(_o)));
     624             : }
     625             : 
     626           0 : auto GPUDeviceData::Init() -> void
     627             : {
     628           0 : }
     629             : 
     630           0 : auto GPUDeviceData::Assign(
     631             :         const FeatureChange& _d3d11Compositing,
     632             :         const FeatureChange& _oglCompositing,
     633             :         const FeatureChange& _advancedLayers,
     634             :         const GPUDeviceStatus& _gpuDevice) -> void
     635             : {
     636           0 :     d3d11Compositing_ = _d3d11Compositing;
     637           0 :     oglCompositing_ = _oglCompositing;
     638           0 :     advancedLayers_ = _advancedLayers;
     639           0 :     gpuDevice_ = _gpuDevice;
     640           0 : }
     641             : 
     642             : } // namespace gfx
     643             : } // namespace mozilla
     644             : 
     645             : //-----------------------------------------------------------------------------
     646             : // Method definitions for the IPDL type |union GfxVarValue|
     647             : //
     648             : namespace mozilla {
     649             : namespace gfx {
     650         189 : auto GfxVarValue::MaybeDestroy(Type aNewType) -> bool
     651             : {
     652         189 :     if ((mType) == (T__None)) {
     653          84 :         return true;
     654             :     }
     655         105 :     if ((mType) == (aNewType)) {
     656           0 :         return false;
     657             :     }
     658         105 :     switch (mType) {
     659             :     case TBackendType:
     660             :         {
     661          30 :             (ptr_BackendType())->~BackendType__tdef();
     662          30 :             break;
     663             :         }
     664             :     case Tbool:
     665             :         {
     666          30 :             (ptr_bool())->~bool__tdef();
     667          30 :             break;
     668             :         }
     669             :     case TgfxImageFormat:
     670             :         {
     671           0 :             (ptr_gfxImageFormat())->~gfxImageFormat__tdef();
     672           0 :             break;
     673             :         }
     674             :     case TIntSize:
     675             :         {
     676          15 :             (ptr_IntSize())->~IntSize__tdef();
     677          15 :             break;
     678             :         }
     679             :     case TnsCString:
     680             :         {
     681          15 :             (ptr_nsCString())->~nsCString__tdef();
     682          15 :             break;
     683             :         }
     684             :     case Tint32_t:
     685             :         {
     686          15 :             (ptr_int32_t())->~int32_t__tdef();
     687          15 :             break;
     688             :         }
     689             :     default:
     690             :         {
     691           0 :             mozilla::ipc::LogicError("not reached");
     692           0 :             break;
     693             :         }
     694             :     }
     695         105 :     return true;
     696             : }
     697             : 
     698           6 : MOZ_IMPLICIT GfxVarValue::GfxVarValue(const BackendType& aOther)
     699             : {
     700           6 :     new (mozilla::KnownNotNull, ptr_BackendType()) BackendType(aOther);
     701           6 :     mType = TBackendType;
     702           6 : }
     703             : 
     704           6 : MOZ_IMPLICIT GfxVarValue::GfxVarValue(const bool& aOther)
     705             : {
     706           6 :     new (mozilla::KnownNotNull, ptr_bool()) bool(aOther);
     707           6 :     mType = Tbool;
     708           6 : }
     709             : 
     710           0 : MOZ_IMPLICIT GfxVarValue::GfxVarValue(const gfxImageFormat& aOther)
     711             : {
     712           0 :     new (mozilla::KnownNotNull, ptr_gfxImageFormat()) gfxImageFormat(aOther);
     713           0 :     mType = TgfxImageFormat;
     714           0 : }
     715             : 
     716           3 : MOZ_IMPLICIT GfxVarValue::GfxVarValue(const IntSize& aOther)
     717             : {
     718           3 :     new (mozilla::KnownNotNull, ptr_IntSize()) IntSize(aOther);
     719           3 :     mType = TIntSize;
     720           3 : }
     721             : 
     722           3 : MOZ_IMPLICIT GfxVarValue::GfxVarValue(const nsCString& aOther)
     723             : {
     724           3 :     new (mozilla::KnownNotNull, ptr_nsCString()) nsCString(aOther);
     725           3 :     mType = TnsCString;
     726           3 : }
     727             : 
     728           3 : MOZ_IMPLICIT GfxVarValue::GfxVarValue(const int32_t& aOther)
     729             : {
     730           3 :     new (mozilla::KnownNotNull, ptr_int32_t()) int32_t(aOther);
     731           3 :     mType = Tint32_t;
     732           3 : }
     733             : 
     734           0 : MOZ_IMPLICIT GfxVarValue::GfxVarValue(const GfxVarValue& aOther)
     735             : {
     736           0 :     (aOther).AssertSanity();
     737           0 :     switch ((aOther).type()) {
     738             :     case TBackendType:
     739             :         {
     740           0 :             new (mozilla::KnownNotNull, ptr_BackendType()) BackendType((aOther).get_BackendType());
     741           0 :             break;
     742             :         }
     743             :     case Tbool:
     744             :         {
     745           0 :             new (mozilla::KnownNotNull, ptr_bool()) bool((aOther).get_bool());
     746           0 :             break;
     747             :         }
     748             :     case TgfxImageFormat:
     749             :         {
     750           0 :             new (mozilla::KnownNotNull, ptr_gfxImageFormat()) gfxImageFormat((aOther).get_gfxImageFormat());
     751           0 :             break;
     752             :         }
     753             :     case TIntSize:
     754             :         {
     755           0 :             new (mozilla::KnownNotNull, ptr_IntSize()) IntSize((aOther).get_IntSize());
     756           0 :             break;
     757             :         }
     758             :     case TnsCString:
     759             :         {
     760           0 :             new (mozilla::KnownNotNull, ptr_nsCString()) nsCString((aOther).get_nsCString());
     761           0 :             break;
     762             :         }
     763             :     case Tint32_t:
     764             :         {
     765           0 :             new (mozilla::KnownNotNull, ptr_int32_t()) int32_t((aOther).get_int32_t());
     766           0 :             break;
     767             :         }
     768             :     case T__None:
     769             :         {
     770           0 :             break;
     771             :         }
     772             :     default:
     773             :         {
     774           0 :             mozilla::ipc::LogicError("unreached");
     775           0 :             return;
     776             :         }
     777             :     }
     778           0 :     mType = (aOther).type();
     779             : }
     780             : 
     781         210 : GfxVarValue::~GfxVarValue()
     782             : {
     783         105 :     static_cast<void>(MaybeDestroy(T__None));
     784         105 : }
     785             : 
     786           4 : auto GfxVarValue::operator=(const BackendType& aRhs) -> GfxVarValue&
     787             : {
     788           4 :     if (MaybeDestroy(TBackendType)) {
     789           4 :         new (mozilla::KnownNotNull, ptr_BackendType()) BackendType;
     790             :     }
     791           4 :     (*(ptr_BackendType())) = aRhs;
     792           4 :     mType = TBackendType;
     793           4 :     return (*(this));
     794             : }
     795             : 
     796           4 : auto GfxVarValue::operator=(const bool& aRhs) -> GfxVarValue&
     797             : {
     798           4 :     if (MaybeDestroy(Tbool)) {
     799           4 :         new (mozilla::KnownNotNull, ptr_bool()) bool;
     800             :     }
     801           4 :     (*(ptr_bool())) = aRhs;
     802           4 :     mType = Tbool;
     803           4 :     return (*(this));
     804             : }
     805             : 
     806           0 : auto GfxVarValue::operator=(const gfxImageFormat& aRhs) -> GfxVarValue&
     807             : {
     808           0 :     if (MaybeDestroy(TgfxImageFormat)) {
     809           0 :         new (mozilla::KnownNotNull, ptr_gfxImageFormat()) gfxImageFormat;
     810             :     }
     811           0 :     (*(ptr_gfxImageFormat())) = aRhs;
     812           0 :     mType = TgfxImageFormat;
     813           0 :     return (*(this));
     814             : }
     815             : 
     816           2 : auto GfxVarValue::operator=(const IntSize& aRhs) -> GfxVarValue&
     817             : {
     818           2 :     if (MaybeDestroy(TIntSize)) {
     819           2 :         new (mozilla::KnownNotNull, ptr_IntSize()) IntSize;
     820             :     }
     821           2 :     (*(ptr_IntSize())) = aRhs;
     822           2 :     mType = TIntSize;
     823           2 :     return (*(this));
     824             : }
     825             : 
     826           2 : auto GfxVarValue::operator=(const nsCString& aRhs) -> GfxVarValue&
     827             : {
     828           2 :     if (MaybeDestroy(TnsCString)) {
     829           2 :         new (mozilla::KnownNotNull, ptr_nsCString()) nsCString;
     830             :     }
     831           2 :     (*(ptr_nsCString())) = aRhs;
     832           2 :     mType = TnsCString;
     833           2 :     return (*(this));
     834             : }
     835             : 
     836           2 : auto GfxVarValue::operator=(const int32_t& aRhs) -> GfxVarValue&
     837             : {
     838           2 :     if (MaybeDestroy(Tint32_t)) {
     839           2 :         new (mozilla::KnownNotNull, ptr_int32_t()) int32_t;
     840             :     }
     841           2 :     (*(ptr_int32_t())) = aRhs;
     842           2 :     mType = Tint32_t;
     843           2 :     return (*(this));
     844             : }
     845             : 
     846          70 : auto GfxVarValue::operator=(const GfxVarValue& aRhs) -> GfxVarValue&
     847             : {
     848          70 :     (aRhs).AssertSanity();
     849          70 :     Type t = (aRhs).type();
     850          70 :     switch (t) {
     851             :     case TBackendType:
     852             :         {
     853          20 :             if (MaybeDestroy(t)) {
     854          20 :                 new (mozilla::KnownNotNull, ptr_BackendType()) BackendType;
     855             :             }
     856          20 :             (*(ptr_BackendType())) = (aRhs).get_BackendType();
     857          20 :             break;
     858             :         }
     859             :     case Tbool:
     860             :         {
     861          20 :             if (MaybeDestroy(t)) {
     862          20 :                 new (mozilla::KnownNotNull, ptr_bool()) bool;
     863             :             }
     864          20 :             (*(ptr_bool())) = (aRhs).get_bool();
     865          20 :             break;
     866             :         }
     867             :     case TgfxImageFormat:
     868             :         {
     869           0 :             if (MaybeDestroy(t)) {
     870           0 :                 new (mozilla::KnownNotNull, ptr_gfxImageFormat()) gfxImageFormat;
     871             :             }
     872           0 :             (*(ptr_gfxImageFormat())) = (aRhs).get_gfxImageFormat();
     873           0 :             break;
     874             :         }
     875             :     case TIntSize:
     876             :         {
     877          10 :             if (MaybeDestroy(t)) {
     878          10 :                 new (mozilla::KnownNotNull, ptr_IntSize()) IntSize;
     879             :             }
     880          10 :             (*(ptr_IntSize())) = (aRhs).get_IntSize();
     881          10 :             break;
     882             :         }
     883             :     case TnsCString:
     884             :         {
     885          10 :             if (MaybeDestroy(t)) {
     886          10 :                 new (mozilla::KnownNotNull, ptr_nsCString()) nsCString;
     887             :             }
     888          10 :             (*(ptr_nsCString())) = (aRhs).get_nsCString();
     889          10 :             break;
     890             :         }
     891             :     case Tint32_t:
     892             :         {
     893          10 :             if (MaybeDestroy(t)) {
     894          10 :                 new (mozilla::KnownNotNull, ptr_int32_t()) int32_t;
     895             :             }
     896          10 :             (*(ptr_int32_t())) = (aRhs).get_int32_t();
     897          10 :             break;
     898             :         }
     899             :     case T__None:
     900             :         {
     901           0 :             static_cast<void>(MaybeDestroy(t));
     902           0 :             break;
     903             :         }
     904             :     default:
     905             :         {
     906           0 :             mozilla::ipc::LogicError("unreached");
     907           0 :             break;
     908             :         }
     909             :     }
     910          70 :     mType = t;
     911          70 :     return (*(this));
     912             : }
     913             : 
     914           0 : auto GfxVarValue::operator==(const BackendType& aRhs) const -> bool
     915             : {
     916           0 :     return (get_BackendType()) == (aRhs);
     917             : }
     918             : 
     919           0 : auto GfxVarValue::operator==(const bool& aRhs) const -> bool
     920             : {
     921           0 :     return (get_bool()) == (aRhs);
     922             : }
     923             : 
     924           0 : auto GfxVarValue::operator==(const gfxImageFormat& aRhs) const -> bool
     925             : {
     926           0 :     return (get_gfxImageFormat()) == (aRhs);
     927             : }
     928             : 
     929           0 : auto GfxVarValue::operator==(const IntSize& aRhs) const -> bool
     930             : {
     931           0 :     return (get_IntSize()) == (aRhs);
     932             : }
     933             : 
     934           0 : auto GfxVarValue::operator==(const nsCString& aRhs) const -> bool
     935             : {
     936           0 :     return (get_nsCString()) == (aRhs);
     937             : }
     938             : 
     939           0 : auto GfxVarValue::operator==(const int32_t& aRhs) const -> bool
     940             : {
     941           0 :     return (get_int32_t()) == (aRhs);
     942             : }
     943             : 
     944           0 : auto GfxVarValue::operator==(const GfxVarValue& aRhs) const -> bool
     945             : {
     946           0 :     if ((type()) != ((aRhs).type())) {
     947           0 :         return false;
     948             :     }
     949             : 
     950           0 :     switch (type()) {
     951             :     case TBackendType:
     952             :         {
     953           0 :             return (get_BackendType()) == ((aRhs).get_BackendType());
     954             :         }
     955             :     case Tbool:
     956             :         {
     957           0 :             return (get_bool()) == ((aRhs).get_bool());
     958             :         }
     959             :     case TgfxImageFormat:
     960             :         {
     961           0 :             return (get_gfxImageFormat()) == ((aRhs).get_gfxImageFormat());
     962             :         }
     963             :     case TIntSize:
     964             :         {
     965           0 :             return (get_IntSize()) == ((aRhs).get_IntSize());
     966             :         }
     967             :     case TnsCString:
     968             :         {
     969           0 :             return (get_nsCString()) == ((aRhs).get_nsCString());
     970             :         }
     971             :     case Tint32_t:
     972             :         {
     973           0 :             return (get_int32_t()) == ((aRhs).get_int32_t());
     974             :         }
     975             :     default:
     976             :         {
     977           0 :             mozilla::ipc::LogicError("unreached");
     978           0 :             return false;
     979             :         }
     980             :     }
     981             : }
     982             : 
     983           4 : auto GfxVarValue::get(BackendType* aOutValue) const -> void
     984             : {
     985           4 :     (*(aOutValue)) = get_BackendType();
     986           4 : }
     987             : 
     988           4 : auto GfxVarValue::get(bool* aOutValue) const -> void
     989             : {
     990           4 :     (*(aOutValue)) = get_bool();
     991           4 : }
     992             : 
     993           0 : auto GfxVarValue::get(gfxImageFormat* aOutValue) const -> void
     994             : {
     995           0 :     (*(aOutValue)) = get_gfxImageFormat();
     996           0 : }
     997             : 
     998           2 : auto GfxVarValue::get(IntSize* aOutValue) const -> void
     999             : {
    1000           2 :     (*(aOutValue)) = get_IntSize();
    1001           2 : }
    1002             : 
    1003           2 : auto GfxVarValue::get(nsCString* aOutValue) const -> void
    1004             : {
    1005           2 :     (*(aOutValue)) = get_nsCString();
    1006           2 : }
    1007             : 
    1008           2 : auto GfxVarValue::get(int32_t* aOutValue) const -> void
    1009             : {
    1010           2 :     (*(aOutValue)) = get_int32_t();
    1011           2 : }
    1012             : 
    1013             : } // namespace gfx
    1014             : } // namespace mozilla
    1015             : 
    1016             : //-----------------------------------------------------------------------------
    1017             : // Method definitions for the IPDL type |struct GfxVarUpdate|
    1018             : //
    1019             : namespace mozilla {
    1020             : namespace gfx {
    1021          14 : MOZ_IMPLICIT GfxVarUpdate::GfxVarUpdate() :
    1022          14 :     index_()
    1023             : {
    1024          14 :     Init();
    1025          14 : }
    1026             : 
    1027          63 : GfxVarUpdate::~GfxVarUpdate()
    1028             : {
    1029          63 : }
    1030             : 
    1031           0 : auto GfxVarUpdate::operator==(const GfxVarUpdate& _o) const -> bool
    1032             : {
    1033           0 :     if ((!((index()) == ((_o).index())))) {
    1034           0 :         return false;
    1035             :     }
    1036           0 :     if ((!((value()) == ((_o).value())))) {
    1037           0 :         return false;
    1038             :     }
    1039           0 :     return true;
    1040             : }
    1041             : 
    1042           0 : auto GfxVarUpdate::operator!=(const GfxVarUpdate& _o) const -> bool
    1043             : {
    1044           0 :     return (!(operator==(_o)));
    1045             : }
    1046             : 
    1047          63 : auto GfxVarUpdate::Init() -> void
    1048             : {
    1049          63 : }
    1050             : 
    1051          49 : auto GfxVarUpdate::Assign(
    1052             :         const size_t& _index,
    1053             :         const GfxVarValue& _value) -> void
    1054             : {
    1055          49 :     index_ = _index;
    1056          49 :     value_ = _value;
    1057          49 : }
    1058             : 
    1059             : } // namespace gfx
    1060             : } // namespace mozilla

Generated by: LCOV version 1.13