Bug 1273314 - Let mPrincipalHandle decide uniqueness of a VideoFrame. r=jesup a=ritu
authorAndreas Pehrson <pehrsons@gmail.com>
Thu, 06 Oct 2016 11:39:50 +0200
changeset 428785 52e6d3f9993db0aa688bdb91ea37e03a07d3d068
parent 428784 35517b0212e4f1d2993c59b527f9e363e2518acb
child 428786 0c41036b9e63facf1beb52b8ced744d525ca77d1
push id33416
push userpaul@paul.cx
push dateMon, 24 Oct 2016 16:26:20 +0000
reviewersjesup, ritu
bugs1273314
milestone50.0
Bug 1273314 - Let mPrincipalHandle decide uniqueness of a VideoFrame. r=jesup a=ritu 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
dom/media/VideoSegment.h
--- 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; }