Bug 1390748 - Pre-declare MediaDecoder in HTMLMediaElement. r=jwwang

I noticed that touching MediaDecoder rebuilds a lot of seemingly unrelated
code. This is because HTMLMediaElement includes MediaDecoder.h, and
HTMLMediaElement is included in a number of places. Having HTMLMediaElement.h
predeclare rather than include fixes it.

MozReview-Commit-ID: I0vrPgqvvge
This commit is contained in:
Chris Pearce
2017-08-15 17:09:06 +12:00
parent 2e1d7486d9
commit a90b42435d
5 changed files with 21 additions and 10 deletions

View File

@@ -7153,6 +7153,17 @@ HTMLMediaElement::NextFrameStatus()
return NEXT_FRAME_UNINITIALIZED;
}
void
HTMLMediaElement::SetDecoder(MediaDecoder* aDecoder)
{
MOZ_ASSERT(aDecoder); // Use ShutdownDecoder() to clear.
if (mDecoder) {
ShutdownDecoder();
}
mDecoder = aDecoder;
}
float
HTMLMediaElement::ComputedVolume() const
{