зеркало из https://github.com/mozilla/gecko-dev.git
Deduplicate unneeded SetTransform and SetPermitSubpixelAA calls from DrawTargetCapture (bug 1431813, r=bas)
--HG-- extra : rebase_source : 30b2051494aa247df922e87779a1f866e1b45e97
This commit is contained in:
Родитель
6250b4ca48
Коммит
b502551a00
|
@ -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.ExactlyEquals(aTransform)) {
|
||||
return;
|
||||
}
|
||||
|
||||
AppendCommand(SetTransformCommand)(aTransform);
|
||||
|
||||
// Have to update the transform for this DT
|
||||
|
|
Загрузка…
Ссылка в новой задаче