зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1464032 Part 13: Make the recording of surface data more efficient. r=rhunt
This commit is contained in:
Родитель
387477fb68
Коммит
3cec9dbf00
|
@ -2803,9 +2803,10 @@ void RecordedSourceSurfaceCreation::Record(S& aStream) const {
|
|||
WriteElement(aStream, mSize);
|
||||
WriteElement(aStream, mFormat);
|
||||
MOZ_ASSERT(mData);
|
||||
for (int y = 0; y < mSize.height; y++) {
|
||||
aStream.write((const char*)mData + y * mStride,
|
||||
BytesPerPixel(mFormat) * mSize.width);
|
||||
size_t dataFormatWidth = BytesPerPixel(mFormat) * mSize.width;
|
||||
const char* endSrc = (const char*)(mData + (mSize.height * mStride));
|
||||
for (const char* src = (const char*)mData; src < endSrc; src += mStride) {
|
||||
aStream.write(src, dataFormatWidth);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче