зеркало из https://github.com/mozilla/gecko-dev.git
Don't call MarkChanged for commands that don't affect pixels. (bug 1395478 part 8, r=rhunt)
--HG-- extra : rebase_source : fe6c36991e36f6ba23682604fa84bc87634fccd2
This commit is contained in:
Родитель
74657c11e8
Коммит
9956a762ef
|
@ -180,6 +180,8 @@ public:
|
|||
aDT->DrawSurface(mSurface, mDest, mSource, mSurfOptions, mOptions);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
RefPtr<SourceSurface> mSurface;
|
||||
Rect mDest;
|
||||
|
@ -216,6 +218,8 @@ public:
|
|||
aDT->DrawSurfaceWithShadow(mSurface, mDest, mColor, mOffset, mSigma, mOperator);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
RefPtr<SourceSurface> mSurface;
|
||||
Point mDest;
|
||||
|
@ -245,6 +249,8 @@ public:
|
|||
aDT->DrawFilter(mFilter, mSourceRect, mDestPoint, mOptions);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
RefPtr<FilterNode> mFilter;
|
||||
Rect mSourceRect;
|
||||
|
@ -270,6 +276,8 @@ public:
|
|||
aDT->ClearRect(mRect);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
Rect mRect;
|
||||
};
|
||||
|
@ -301,6 +309,8 @@ public:
|
|||
aDT->CopySurface(mSurface, mSourceRect, IntPoint(uint32_t(dest.x), uint32_t(dest.y)));
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
RefPtr<SourceSurface> mSurface;
|
||||
IntRect mSourceRect;
|
||||
|
@ -335,6 +345,8 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
Rect mRect;
|
||||
StoredPattern mPattern;
|
||||
|
@ -364,6 +376,8 @@ public:
|
|||
aDT->StrokeRect(mRect, mPattern, mStrokeOptions, mOptions);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
Rect mRect;
|
||||
StoredPattern mPattern;
|
||||
|
@ -395,6 +409,8 @@ public:
|
|||
aDT->StrokeLine(mStart, mEnd, mPattern, mStrokeOptions, mOptions);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
Point mStart;
|
||||
Point mEnd;
|
||||
|
@ -430,6 +446,8 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
RefPtr<Path> mPath;
|
||||
StoredPattern mPattern;
|
||||
|
@ -506,6 +524,8 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
RefPtr<Path> mPath;
|
||||
StoredPattern mPattern;
|
||||
|
@ -547,6 +567,8 @@ public:
|
|||
aDT->FillGlyphs(mFont, buf, mPattern, mOptions, mRenderingOptions);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
RefPtr<ScaledFont> mFont;
|
||||
std::vector<Glyph> mGlyphs;
|
||||
|
@ -591,6 +613,8 @@ public:
|
|||
aDT->StrokeGlyphs(mFont, buf, mPattern, mStrokeOptions, mOptions, mRenderingOptions);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
RefPtr<ScaledFont> mFont;
|
||||
std::vector<Glyph> mGlyphs;
|
||||
|
@ -621,6 +645,8 @@ public:
|
|||
aDT->Mask(mSource, mMask, mOptions);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
StoredPattern mSource;
|
||||
StoredPattern mMask;
|
||||
|
@ -651,6 +677,8 @@ public:
|
|||
aDT->MaskSurface(mSource, mMask, mOffset, mOptions);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
StoredPattern mSource;
|
||||
RefPtr<SourceSurface> mMask;
|
||||
|
@ -676,6 +704,8 @@ public:
|
|||
aDT->PushClip(mPath);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = false;
|
||||
|
||||
private:
|
||||
RefPtr<Path> mPath;
|
||||
};
|
||||
|
@ -698,6 +728,8 @@ public:
|
|||
aDT->PushClipRect(mRect);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = false;
|
||||
|
||||
private:
|
||||
Rect mRect;
|
||||
};
|
||||
|
@ -731,6 +763,8 @@ public:
|
|||
mMaskTransform, mBounds, mCopyBackground);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = false;
|
||||
|
||||
private:
|
||||
bool mOpaque;
|
||||
float mOpacity;
|
||||
|
@ -756,6 +790,8 @@ public:
|
|||
{
|
||||
aDT->PopClip();
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = false;
|
||||
};
|
||||
|
||||
class PopLayerCommand : public DrawingCommand
|
||||
|
@ -774,6 +810,8 @@ public:
|
|||
{
|
||||
aDT->PopLayer();
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
};
|
||||
|
||||
class SetTransformCommand : public DrawingCommand
|
||||
|
@ -799,6 +837,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = false;
|
||||
|
||||
private:
|
||||
Matrix mTransform;
|
||||
};
|
||||
|
@ -822,6 +862,8 @@ public:
|
|||
aDT->SetPermitSubpixelAA(mPermitSubpixelAA);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = false;
|
||||
|
||||
private:
|
||||
bool mPermitSubpixelAA;
|
||||
};
|
||||
|
@ -842,6 +884,8 @@ public:
|
|||
{
|
||||
aDT->Flush();
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = false;
|
||||
};
|
||||
|
||||
class BlurCommand : public DrawingCommand
|
||||
|
@ -860,6 +904,8 @@ public:
|
|||
aDT->Blur(mBlur);
|
||||
}
|
||||
|
||||
static const bool AffectsSnapshot = true;
|
||||
|
||||
private:
|
||||
AlphaBoxBlur mBlur;
|
||||
};
|
||||
|
|
|
@ -164,7 +164,9 @@ private:
|
|||
// guarantees on the alignments of DrawingCommands allocated in this array.
|
||||
template<typename T>
|
||||
T* AppendToCommandList() {
|
||||
MarkChanged();
|
||||
if (T::AffectsSnapshot) {
|
||||
MarkChanged();
|
||||
}
|
||||
return mCommands.Append<T>();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче