Closed Bug 1371527 Opened 3 years ago Closed 3 years ago
Create a Layers
Message Utils from Gfx Message Utils
For bug 1351783, I want to include nsGUIEventIPC.h from within GfxMessageUtils.h so I can serialize a KeyboardShortcut (with ParamsTrait in GfxMessageUtils) which contains a KeyboardEventType (with ParamTraits in nsGUIEventIPC.h). Unfortunately nsGUIEventIPC.h already includes GfxMessageUtils.h so it's a circular reference. Looking at it more, I see that nsGUIEventIPC.h really only needs ParamTraits for gfx types, not ParamTraits for layers types. So I think it makes sense to split the files apart and have a new LayersMessageUtils.h that includes GfxMessageUtils.h. We can then include nsGUIEventIPC.h in LayerMessageUtils.h without a problem.
Comment on attachment 8876006 [details] Bug 1371527 - Add LayersMessageUtils https://reviewboard.mozilla.org/r/147442/#review152488 ::: gfx/ipc/LayersMessageUtils.h:8 (Diff revision 1) > /* This Source Code Form is subject to the terms of the Mozilla Public > * License, v. 2.0. If a copy of the MPL was not distributed with this > * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ > > -#ifndef __GFXMESSAGEUTILS_H__ > -#define __GFXMESSAGEUTILS_H__ > +#ifndef __LAYERSMESSAGEUTILS_H__ > +#define __LAYERSMESSAGEUTILS_H__ nit: I think this is supposed to look like mozilla_gfx_ipc_LayersMessageUtils_h ::: gfx/ipc/moz.build:13 (Diff revision 1) > BUG_COMPONENT = ('Core', 'Graphics: Layers') > > EXPORTS.mozilla += [ > 'D3DMessageUtils.h', > - 'GfxMessageUtils.h' > + 'GfxMessageUtils.h', > + 'LayersMessageUtils.h' Should LayersMessageUtils.h be in gfx/layers/ipc, and be exported into mozilla/layers? (We're pretty inconsistent so it doesn't bother me either way.)
Attachment #8876006 - Flags: review?(dvander) → review+
https://treeherder.mozilla.org/#/jobs?repo=try&revision=75a11fd1da226edc08380c3d1c63298d7ea0b13e I moved it to gfx/layers/ipc/ as that makes more sense, and updated the include guard.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/e5bdf44cd717 Add LayersMessageUtils for IPC serialization of mozilla::layers structs. r=dvander
You need to log in before you can comment on or make changes to this bug.