Bug 1318283: UpdateFilter can sometimes invalidate the draw target. Back out the previous speculative patch. r=mstange

MozReview-Commit-ID: 8u2sjS9dyLu

--HG--
extra : rebase_source : 876ec3d4d2cd47d76fe57db645764eba281209d9
This commit is contained in:
Milan Sreckovic 2017-01-03 12:01:11 -05:00
Родитель 9141469edf
Коммит e46c16114f
2 изменённых файлов: 4 добавлений и 4 удалений

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

@ -1874,10 +1874,9 @@ NS_IMETHODIMP
CanvasRenderingContext2D::SetDimensions(int32_t aWidth, int32_t aHeight)
{
bool retainBuffer = false;
// See bug 1318283 as to why we are disabling this optimization.
// Based on the results of the investigation, this may go away
// completely or come back.
// retainBuffer = (aWidth == mWidth && aHeight == mHeight);
if (aWidth == mWidth && aHeight == mHeight) {
retainBuffer = true;
}
ClearTarget(retainBuffer);
// Zero sized surfaces can cause problems.

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

@ -999,6 +999,7 @@ protected:
bool isWriteOnly = mCanvasElement && mCanvasElement->IsWriteOnly();
if (CurrentState().filterSourceGraphicTainted != isWriteOnly) {
UpdateFilter();
EnsureTarget();
}
MOZ_ASSERT(CurrentState().filterSourceGraphicTainted == isWriteOnly);
return CurrentState().filter;