зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1757929 - Remove a bunch of IPC headers from gfxFont and co. r=jfkthame,layout-reviewers
Removing the whole chromium IPC config is not possible because gfxPlatformFontList uses base::*, but this should speed up builds a little so seems worth landing regardless. Differential Revision: https://phabricator.services.mozilla.com/D143371
This commit is contained in:
Родитель
dc4180987f
Коммит
335ea6af87
|
@ -7,6 +7,7 @@
|
|||
#include "AccessCheck.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "ipc/IPCMessageUtils.h"
|
||||
#include "ipc/IPCMessageUtilsSpecializations.h"
|
||||
#include "mozilla/EventDispatcher.h"
|
||||
#include "mozilla/BasePrincipal.h"
|
||||
#include "mozilla/ContentEvents.h"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "base/basictypes.h"
|
||||
#include "ipc/IPCMessageUtils.h"
|
||||
#include "ipc/IPCMessageUtilsSpecializations.h"
|
||||
#include "mozilla/dom/DOMRect.h"
|
||||
#include "mozilla/dom/ScrollAreaEvent.h"
|
||||
#include "mozilla/ContentEvents.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include "mozilla/TouchEvents.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsExceptionHandler.h"
|
||||
|
||||
namespace mozilla::dom {
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "base/basictypes.h"
|
||||
#include "ipc/IPCMessageUtils.h"
|
||||
#include "ipc/IPCMessageUtilsSpecializations.h"
|
||||
#include "mozilla/dom/UIEvent.h"
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "RegionBuilder.h"
|
||||
#include "chrome/common/ipc_message_utils.h"
|
||||
#include "gfxFeature.h"
|
||||
#include "gfxFontUtils.h"
|
||||
#include "gfxFallback.h"
|
||||
#include "gfxPoint.h"
|
||||
#include "gfxRect.h"
|
||||
|
@ -23,6 +24,7 @@
|
|||
#include "mozilla/gfx/Matrix.h"
|
||||
#include "mozilla/gfx/ScaleFactor.h"
|
||||
#include "mozilla/gfx/ScaleFactors2D.h"
|
||||
#include "SharedFontList.h"
|
||||
#include "nsRect.h"
|
||||
#include "nsRegion.h"
|
||||
#include "mozilla/Array.h"
|
||||
|
@ -1136,7 +1138,54 @@ struct ParamTraits<mozilla::SideBits>
|
|||
: public BitFlagsEnumSerializer<mozilla::SideBits,
|
||||
mozilla::SideBits::eAll> {};
|
||||
|
||||
} /* namespace IPC */
|
||||
template <>
|
||||
struct ParamTraits<gfxSparseBitSet> {
|
||||
typedef gfxSparseBitSet paramType;
|
||||
static void Write(MessageWriter* aWriter, const paramType& aParam) {
|
||||
WriteParam(aWriter, aParam.mBlockIndex);
|
||||
WriteParam(aWriter, aParam.mBlocks);
|
||||
}
|
||||
static bool Read(MessageReader* aReader, paramType* aResult) {
|
||||
return ReadParam(aReader, &aResult->mBlockIndex) &&
|
||||
ReadParam(aReader, &aResult->mBlocks);
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ParamTraits<gfxSparseBitSet::Block> {
|
||||
typedef gfxSparseBitSet::Block paramType;
|
||||
static void Write(MessageWriter* aWriter, const paramType& aParam) {
|
||||
aWriter->WriteBytes(&aParam, sizeof(aParam));
|
||||
}
|
||||
static bool Read(MessageReader* aReader, paramType* aResult) {
|
||||
return aReader->ReadBytesInto(aResult, sizeof(*aResult));
|
||||
}
|
||||
};
|
||||
|
||||
// The actual FontVisibility enum is defined in gfxTypes.h
|
||||
template <>
|
||||
struct ParamTraits<FontVisibility>
|
||||
: public ContiguousEnumSerializer<FontVisibility, FontVisibility::Unknown,
|
||||
FontVisibility::Count> {};
|
||||
|
||||
template <>
|
||||
struct ParamTraits<mozilla::fontlist::Pointer> {
|
||||
typedef mozilla::fontlist::Pointer paramType;
|
||||
static void Write(MessageWriter* aWriter, const paramType& aParam) {
|
||||
uint32_t v = aParam.mBlockAndOffset;
|
||||
WriteParam(aWriter, v);
|
||||
}
|
||||
static bool Read(MessageReader* aReader, paramType* aResult) {
|
||||
uint32_t v;
|
||||
if (ReadParam(aReader, &v)) {
|
||||
aResult->mBlockAndOffset.store(v);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace IPC
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
|
|
@ -378,29 +378,6 @@ struct LocalFaceRec {
|
|||
} // namespace fontlist
|
||||
} // namespace mozilla
|
||||
|
||||
#include "ipc/IPCMessageUtils.h"
|
||||
|
||||
namespace IPC {
|
||||
|
||||
template <>
|
||||
struct ParamTraits<mozilla::fontlist::Pointer> {
|
||||
typedef mozilla::fontlist::Pointer paramType;
|
||||
static void Write(MessageWriter* aWriter, const paramType& aParam) {
|
||||
uint32_t v = aParam.mBlockAndOffset;
|
||||
WriteParam(aWriter, v);
|
||||
}
|
||||
static bool Read(MessageReader* aReader, paramType* aResult) {
|
||||
uint32_t v;
|
||||
if (ReadParam(aReader, &v)) {
|
||||
aResult->mBlockAndOffset.store(v);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace IPC
|
||||
|
||||
#undef ERROR // This is defined via Windows.h, but conflicts with some bindings
|
||||
// code when this gets included in the same compilation unit.
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
#include "mozilla/Mutex.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/RWLock.h"
|
||||
#include "mozilla/ServoStyleConsts.h"
|
||||
#include "mozilla/TypedEnumBits.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
#include "mozilla/gfx/MatrixFwd.h"
|
||||
#include "mozilla/gfx/Point.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/intl/UnicodeScriptCodes.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsColor.h"
|
||||
|
@ -43,21 +43,9 @@
|
|||
#include "nscore.h"
|
||||
#include "DrawMode.h"
|
||||
|
||||
// Only required for function bodys
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/HashFunctions.h"
|
||||
#include "mozilla/ServoUtils.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
// Only required for function bodies
|
||||
#include "gfxFontEntry.h"
|
||||
#include "gfxFontFeatures.h"
|
||||
#include "gfxFontUtils.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsDebug.h"
|
||||
#include "nsMathUtils.h"
|
||||
|
||||
class gfxContext;
|
||||
class gfxGraphiteShaper;
|
||||
|
@ -527,6 +515,9 @@ class gfxTextPerfMetrics {
|
|||
|
||||
namespace mozilla {
|
||||
namespace gfx {
|
||||
|
||||
class UnscaledFont;
|
||||
|
||||
// Flags that live in the gfxShapedText::mFlags field.
|
||||
// (Note that gfxTextRun has an additional mFlags2 field for use
|
||||
// by textrun clients like nsTextFrame.)
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "gfxRect.h"
|
||||
#include "gfxTypes.h"
|
||||
#include "harfbuzz/hb.h"
|
||||
#include "ipc/EnumSerializer.h"
|
||||
#include "mozilla/AlreadyAddRefed.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/FontPropertyTypes.h"
|
||||
|
@ -834,14 +833,6 @@ struct GlobalFontMatch {
|
|||
double mMatchDistance = INFINITY; // metric indicating closest match
|
||||
};
|
||||
|
||||
// The actual FontVisibility enum is defined in gfxTypes.h
|
||||
namespace IPC {
|
||||
template <>
|
||||
struct ParamTraits<FontVisibility>
|
||||
: public ContiguousEnumSerializer<FontVisibility, FontVisibility::Unknown,
|
||||
FontVisibility::Count> {};
|
||||
} // namespace IPC
|
||||
|
||||
class gfxFontFamily {
|
||||
public:
|
||||
// Used by stylo
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
#include <new>
|
||||
#include <utility>
|
||||
#include "gfxPlatform.h"
|
||||
#include "ipc/IPCMessageUtils.h"
|
||||
#include "ipc/IPCMessageUtilsSpecializations.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Casting.h"
|
||||
|
@ -51,6 +49,11 @@ typedef struct hb_blob_t hb_blob_t;
|
|||
|
||||
class SharedBitSet;
|
||||
|
||||
namespace IPC {
|
||||
template <typename T>
|
||||
struct ParamTraits;
|
||||
}
|
||||
|
||||
class gfxSparseBitSet {
|
||||
private:
|
||||
friend class SharedBitSet;
|
||||
|
@ -66,6 +69,9 @@ class gfxSparseBitSet {
|
|||
uint8_t mBits[BLOCK_SIZE];
|
||||
};
|
||||
|
||||
friend struct IPC::ParamTraits<gfxSparseBitSet>;
|
||||
friend struct IPC::ParamTraits<Block>;
|
||||
|
||||
public:
|
||||
gfxSparseBitSet() = default;
|
||||
|
||||
|
@ -331,38 +337,10 @@ class gfxSparseBitSet {
|
|||
}
|
||||
|
||||
private:
|
||||
friend struct IPC::ParamTraits<gfxSparseBitSet>;
|
||||
friend struct IPC::ParamTraits<gfxSparseBitSet::Block>;
|
||||
CopyableTArray<uint16_t> mBlockIndex;
|
||||
CopyableTArray<Block> mBlocks;
|
||||
};
|
||||
|
||||
namespace IPC {
|
||||
template <>
|
||||
struct ParamTraits<gfxSparseBitSet> {
|
||||
typedef gfxSparseBitSet paramType;
|
||||
static void Write(MessageWriter* aWriter, const paramType& aParam) {
|
||||
WriteParam(aWriter, aParam.mBlockIndex);
|
||||
WriteParam(aWriter, aParam.mBlocks);
|
||||
}
|
||||
static bool Read(MessageReader* aReader, paramType* aResult) {
|
||||
return ReadParam(aReader, &aResult->mBlockIndex) &&
|
||||
ReadParam(aReader, &aResult->mBlocks);
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ParamTraits<gfxSparseBitSet::Block> {
|
||||
typedef gfxSparseBitSet::Block paramType;
|
||||
static void Write(MessageWriter* aWriter, const paramType& aParam) {
|
||||
aWriter->WriteBytes(&aParam, sizeof(aParam));
|
||||
}
|
||||
static bool Read(MessageReader* aReader, paramType* aResult) {
|
||||
return aReader->ReadBytesInto(aResult, sizeof(*aResult));
|
||||
}
|
||||
};
|
||||
} // namespace IPC
|
||||
|
||||
/**
|
||||
* SharedBitSet is a version of gfxSparseBitSet that is intended to be used
|
||||
* in a shared-memory block, and can be used regardless of the address at which
|
||||
|
|
Загрузка…
Ссылка в новой задаче