Bug 1273314 - Let mPrincipalHandle decide uniqueness of a VideoFrame. r?jesup draft
authorAndreas Pehrson <pehrsons@gmail.com>
Thu, 06 Oct 2016 11:39:50 +0200
changeset 421534 50cb1fa9c51631f8feb3cf7a411b8ae852b46408
parent 421533 222fceefde5a03cc14c3a1078431919004de0460
child 421535 f2ba809b2578650a0ba4b5643a1f1196100dabb7
child 422093 5bc2b6e56d6f71700dcf7c0be0289aad2f6bb6ad
push id31542
push userbmo:pehrson@telenordigital.com
push dateThu, 06 Oct 2016 12:07:08 +0000
reviewersjesup
bugs1273314
milestone52.0a1
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
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; }