Try and reduce the size of draw target captures. (bug 1431813, r=bas)

This commit is contained in:
Ryan Hunt 2018-01-26 14:20:07 -06:00
Родитель f3cc4b74af
Коммит a94ca8b3d3
1 изменённых файлов: 10 добавлений и 0 удалений

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

@ -119,6 +119,11 @@ DrawTargetCaptureImpl::DetachAllSnapshots()
void
DrawTargetCaptureImpl::SetPermitSubpixelAA(bool aPermitSubpixelAA)
{
// Save memory by eliminating state changes with no effect
if (mPermitSubpixelAA == aPermitSubpixelAA) {
return;
}
AppendCommand(SetPermitSubpixelAACommand)(aPermitSubpixelAA);
// Have to update mPermitSubpixelAA for this DT
@ -310,6 +315,11 @@ DrawTargetCaptureImpl::PopClip()
void
DrawTargetCaptureImpl::SetTransform(const Matrix& aTransform)
{
// Save memory by eliminating state changes with no effect
if (mTransform == aTransform) {
return;
}
AppendCommand(SetTransformCommand)(aTransform);
// Have to update the transform for this DT