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 356053 ddd12c3b046c823313f913adf52b03b39b5f9011
parent 356052 e2714cdbc9db4c51d2548a0a2539601c5b6dae17
child 356054 6031d730c46ae3b3db353a8d35c99e82117f6479
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup, ritu
bugs1273314
milestone51.0a2
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; }