Bug 1273314 - Let mPrincipalHandle decide uniqueness of a VideoFrame. r?jesup
If the principal handle is updated but not the image we want the changes to
propagate through. Without this, VideoFrameContainer will guard off such
principal-only changes.
MozReview-Commit-ID: LnWUTM1mLa7
--- a/dom/media/VideoSegment.h
+++ b/dom/media/VideoSegment.h
@@ -24,17 +24,18 @@ public:
VideoFrame(already_AddRefed<Image>& aImage, const gfx::IntSize& aIntrinsicSize);
VideoFrame();
~VideoFrame();
bool operator==(const VideoFrame& aFrame) const
{
return mIntrinsicSize == aFrame.mIntrinsicSize &&
mForceBlack == aFrame.mForceBlack &&
- ((mForceBlack && aFrame.mForceBlack) || mImage == aFrame.mImage);
+ ((mForceBlack && aFrame.mForceBlack) || mImage == aFrame.mImage) &&
+ mPrincipalHandle == aFrame.mPrincipalHandle;
}
bool operator!=(const VideoFrame& aFrame) const
{
return !operator==(aFrame);
}
Image* GetImage() const { return mImage; }
void SetForceBlack(bool aForceBlack) { mForceBlack = aForceBlack; }