зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1471583: Don't record a successful draw result if the image is not complete yet. r=tnikkel
I've tried to unsuccessfully reproduce the same kind of failures locally under rr with this patch applied, so that's a good sign. This should fix the case where we don't invalidate from AttemptPartialUpdate while trying to sync-decode. This is a clear part of the problem, though not sure yet if it'll fix all the issues we see in these tests. In any case I want to investigate those separately. Differential Revision: https://phabricator.services.mozilla.com/D2068 MozReview-Commit-ID: H7OEvbQUues
This commit is contained in:
Родитель
53f4bd4fab
Коммит
b00499528d
|
@ -123,13 +123,13 @@ nsImageRenderer::PrepareImage()
|
|||
|
||||
if (!mImage->IsComplete()) {
|
||||
// Make sure the image is actually decoding.
|
||||
bool frameComplete = mImage->StartDecoding();
|
||||
mImage->StartDecoding();
|
||||
|
||||
// Check again to see if we finished.
|
||||
// We cannot prepare the image for rendering if it is not fully loaded.
|
||||
// Special case: If we requested a sync decode and the image has loaded, push
|
||||
// on through because the Draw() will do a sync decode then.
|
||||
if (!(frameComplete || mImage->IsComplete()) &&
|
||||
// Special case: If we requested a sync decode and the image has loaded,
|
||||
// push on through because the Draw() will do a sync decode then.
|
||||
if (!mImage->IsComplete() &&
|
||||
!ShouldTreatAsCompleteDueToSyncDecode(mImage, mFlags)) {
|
||||
mPrepareResult = ImgDrawResult::NOT_READY;
|
||||
return false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче