зеркало из https://github.com/mozilla/gecko-dev.git
Bug 715894 - Only draw dirty rect when using gralloc textures r=clord
--HG-- extra : rebase_source : 432da0c53ce697b6bbc8009c615e9bfb81f0778f
This commit is contained in:
Родитель
8cf829b9d9
Коммит
caa76a7c3f
|
@ -1203,7 +1203,7 @@ nsWindow::OnDraw(AndroidGeckoEvent *ae)
|
||||||
sDirectTexture->Reallocate(gAndroidBounds.width, gAndroidBounds.height);
|
sDirectTexture->Reallocate(gAndroidBounds.width, gAndroidBounds.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
sDirectTexture->Lock(AndroidGraphicBuffer::UsageSoftwareWrite, &bits);
|
sDirectTexture->Lock(AndroidGraphicBuffer::UsageSoftwareWrite, ae->Rect(), &bits);
|
||||||
} else {
|
} else {
|
||||||
bits = client.LockBufferBits();
|
bits = client.LockBufferBits();
|
||||||
}
|
}
|
||||||
|
@ -1234,17 +1234,12 @@ nsWindow::OnDraw(AndroidGeckoEvent *ae)
|
||||||
ALOG("### Failed to create a valid surface from the bitmap");
|
ALOG("### Failed to create a valid surface from the bitmap");
|
||||||
drawSuccess = false;
|
drawSuccess = false;
|
||||||
break;
|
break;
|
||||||
} else {
|
|
||||||
if (sHasDirectTexture) {
|
|
||||||
// XXX: lock only the dirty rect above and pass it in here
|
|
||||||
DrawTo(targetSurface);
|
|
||||||
} else {
|
} else {
|
||||||
targetSurface->SetDeviceOffset(gfxPoint(-x, -y));
|
targetSurface->SetDeviceOffset(gfxPoint(-x, -y));
|
||||||
DrawTo(targetSurface, ae->Rect());
|
DrawTo(targetSurface, ae->Rect());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Don't fill in the draw metadata on an unsuccessful draw
|
// Don't fill in the draw metadata on an unsuccessful draw
|
||||||
if (drawSuccess && metadataProvider) {
|
if (drawSuccess && metadataProvider) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче