зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1631476 - Don't let CanvasRenderingContext2D::EnsureTarget lead to frame capture. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D93066
This commit is contained in:
Родитель
7449686f82
Коммит
9501bbf843
|
@ -1316,9 +1316,12 @@ bool CanvasRenderingContext2D::EnsureTarget(const gfx::Rect* aCoveredRect,
|
|||
if (mCanvasElement) {
|
||||
mCanvasElement->InvalidateCanvas();
|
||||
}
|
||||
// EnsureTarget hasn't drawn anything. Preserve mIsCapturedFrameInvalid.
|
||||
bool capturedFrameInvalid = mIsCapturedFrameInvalid;
|
||||
// Calling Redraw() tells our invalidation machinery that the entire
|
||||
// canvas is already invalid, which can speed up future drawing.
|
||||
Redraw();
|
||||
mIsCapturedFrameInvalid = capturedFrameInvalid;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче