diff options
Diffstat (limited to 'gfx/layers/ipc/SharedSurfacesMemoryReport.h')
-rw-r--r-- | gfx/layers/ipc/SharedSurfacesMemoryReport.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gfx/layers/ipc/SharedSurfacesMemoryReport.h b/gfx/layers/ipc/SharedSurfacesMemoryReport.h index 81baf1349f..31e27bccad 100644 --- a/gfx/layers/ipc/SharedSurfacesMemoryReport.h +++ b/gfx/layers/ipc/SharedSurfacesMemoryReport.h @@ -12,6 +12,7 @@ #include "base/process.h" #include "ipc/IPCMessageUtils.h" #include "ipc/IPCMessageUtilsSpecializations.h" +#include "mozilla/dom/WebGLIpdl.h" #include "mozilla/gfx/Point.h" // for IntSize namespace mozilla { @@ -26,8 +27,16 @@ class SharedSurfacesMemoryReport final { int32_t mStride; uint32_t mConsumers; bool mCreatorRef; + PaddingField<bool, 3> _padding; + + auto MutTiedFields() { + return std::tie(mCreatorPid, mSize, mStride, mConsumers, mCreatorRef, + _padding); + } }; + auto MutTiedFields() { return std::tie(mSurfaces); } + std::unordered_map<uint64_t, SurfaceEntry> mSurfaces; }; @@ -37,21 +46,13 @@ class SharedSurfacesMemoryReport final { namespace IPC { template <> -struct ParamTraits<mozilla::layers::SharedSurfacesMemoryReport> { - typedef mozilla::layers::SharedSurfacesMemoryReport paramType; - - static void Write(MessageWriter* aWriter, const paramType& aParam) { - WriteParam(aWriter, aParam.mSurfaces); - } - - static bool Read(MessageReader* aReader, paramType* aResult) { - return ReadParam(aReader, &aResult->mSurfaces); - } -}; +struct ParamTraits<mozilla::layers::SharedSurfacesMemoryReport> + : public ParamTraits_TiedFields< + mozilla::layers::SharedSurfacesMemoryReport> {}; template <> struct ParamTraits<mozilla::layers::SharedSurfacesMemoryReport::SurfaceEntry> - : public PlainOldDataSerializer< + : public ParamTraits_TiedFields< mozilla::layers::SharedSurfacesMemoryReport::SurfaceEntry> {}; } // namespace IPC |