зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1355577 - Make the pointer in WrByteSlice const on the C++ side to match the Rust side. r=jrmuizel
MozReview-Commit-ID: FWCzZt8RAMj
This commit is contained in:
Родитель
aa20d100c1
Коммит
1880bd37a5
|
@ -11,10 +11,10 @@
|
|||
namespace mozilla {
|
||||
namespace wr {
|
||||
|
||||
static bool Moz2DRenderCallback(const Range<uint8_t> aBlob,
|
||||
static bool Moz2DRenderCallback(const Range<const uint8_t> aBlob,
|
||||
gfx::IntSize aSize,
|
||||
gfx::SurfaceFormat aFormat,
|
||||
Range<uint8_t> output)
|
||||
Range<const uint8_t> output)
|
||||
{
|
||||
return false; // TODO(nical)
|
||||
}
|
||||
|
|
|
@ -488,8 +488,8 @@ inline WrByteSlice RangeToByteSlice(mozilla::Range<uint8_t> aRange) {
|
|||
return WrByteSlice { aRange.begin().get(), aRange.length() };
|
||||
}
|
||||
|
||||
inline mozilla::Range<uint8_t> ByteSliceToRange(WrByteSlice aWrSlice) {
|
||||
return mozilla::Range<uint8_t>(aWrSlice.buffer, aWrSlice.len);
|
||||
inline mozilla::Range<const uint8_t> ByteSliceToRange(WrByteSlice aWrSlice) {
|
||||
return mozilla::Range<const uint8_t>(aWrSlice.buffer, aWrSlice.len);
|
||||
}
|
||||
|
||||
struct BuiltDisplayList {
|
||||
|
|
|
@ -66,7 +66,7 @@ WR_DECL_FFI_2(WrFontKey, uint32_t, uint32_t)
|
|||
// view of a buffer of bytes.
|
||||
// The canonical gecko equivalent is mozilla::Range<uint8_t>.
|
||||
struct WrByteSlice {
|
||||
uint8_t* buffer;
|
||||
const uint8_t* buffer;
|
||||
size_t len;
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче