Bug 1227706 - Implement nsWindow::GLControllerSupport; r=snorp

This patch adds native method implementations in GLControllerSupport to
manage compositor creation/pause/resume.
This commit is contained in:
Jim Chen
2015-12-23 22:03:34 -05:00
parent 37c52714f3
commit 97742ebb77
3 changed files with 184 additions and 33 deletions

View File

@@ -685,21 +685,7 @@ AndroidBridge::GetIconForExtension(const nsACString& aFileExt, uint32_t aIconSiz
void
AndroidBridge::SetLayerClient(GeckoLayerClient::Param jobj)
{
// if resetting is true, that means Android destroyed our GeckoApp activity
// and we had to recreate it, but all the Gecko-side things were not destroyed.
// We therefore need to link up the new java objects to Gecko, and that's what
// we do here.
bool resetting = (mLayerClient != nullptr);
__android_log_print(ANDROID_LOG_INFO, "GeckoBug1151102", "Reseting layer client: %d", resetting);
mLayerClient = jobj;
if (resetting) {
// since we are re-linking the new java objects to Gecko, we need to get
// the viewport from the compositor (since the Java copy was thrown away)
// and we do that by setting the first-paint flag.
nsWindow::ForceIsFirstPaint();
}
}
void