Bug 1488808 Part 14 - Parent side graphics changes for repainting, r=mccr8.

--HG--
extra : rebase_source : aa68fe199bc53c534cfc0f58fe31c18000f53320
This commit is contained in:
Brian Hackett 2018-10-17 10:07:13 -06:00
Родитель 7813dce05c
Коммит c5c1973218
3 изменённых файлов: 6 добавлений и 7 удалений

Просмотреть файл

@ -77,11 +77,6 @@ HandleMessageInMiddleman(ipc::Side aSide, const IPC::Message& aMessage)
// Preferences are initialized via the SetXPCOMProcessAttributes message.
PreferencesLoaded();
}
if (type == dom::PBrowser::Msg_RenderLayers__ID) {
// Graphics are being loaded or unloaded for a tab, so update what we are
// showing to the UI process according to the last paint performed.
UpdateGraphicsInUIProcess(nullptr);
}
return false;
}

Просмотреть файл

@ -120,6 +120,8 @@ UpdateGraphicsInUIProcess(const PaintMessage* aMsg)
return;
}
bool hadFailure = !aMsg;
// Make sure there is a sandbox which is running the graphics JS module.
if (!gGraphicsSandbox) {
InitGraphicsSandbox();
@ -160,10 +162,11 @@ UpdateGraphicsInUIProcess(const PaintMessage* aMsg)
JS_NewArrayBufferWithExternalContents(cx, width * height * 4, memory);
MOZ_RELEASE_ASSERT(bufferObject);
JS::AutoValueArray<3> args(cx);
JS::AutoValueArray<4> args(cx);
args[0].setObject(*bufferObject);
args[1].setInt32(width);
args[2].setInt32(height);
args[3].setBoolean(hadFailure);
// Call into the graphics module to update the canvas it manages.
RootedValue rval(cx);

Просмотреть файл

@ -86,7 +86,8 @@ void InitializeGraphicsMemory();
void SendGraphicsMemoryToChild();
// Update the graphics painted in the UI process, per painting data received
// from a child process, or null for the last paint performed.
// from a child process, or null if a repaint was triggered and failed due to
// an unhandled recording divergence.
void UpdateGraphicsInUIProcess(const PaintMessage* aMsg);
// ID for the mach message sent from a child process to the middleman to