Bug 1832479 use types for decoder owner Invalidate() boolean parameters r=pehrsons
for safety and readability. Differential Revision: https://phabricator.services.mozilla.com/D177983
This commit is contained in:
@@ -2336,7 +2336,7 @@ void HTMLMediaElement::AbortExistingLoads() {
|
||||
if (IsVideo() && hadVideo) {
|
||||
// Ensure we render transparent black after resetting video resolution.
|
||||
Maybe<nsIntSize> size = Some(nsIntSize(0, 0));
|
||||
Invalidate(true, size, false);
|
||||
Invalidate(ImageSizeChanged::Yes, size, ForceInvalidate::No);
|
||||
}
|
||||
|
||||
// As aborting current load would stop current playback, so we have no need to
|
||||
@@ -6339,9 +6339,9 @@ void HTMLMediaElement::NotifyDecoderPrincipalChanged() {
|
||||
mDecoder->SetOutputTracksPrincipal(principal);
|
||||
}
|
||||
|
||||
void HTMLMediaElement::Invalidate(bool aImageSizeChanged,
|
||||
void HTMLMediaElement::Invalidate(ImageSizeChanged aImageSizeChanged,
|
||||
const Maybe<nsIntSize>& aNewIntrinsicSize,
|
||||
bool aForceInvalidate) {
|
||||
ForceInvalidate aForceInvalidate) {
|
||||
nsIFrame* frame = GetPrimaryFrame();
|
||||
if (aNewIntrinsicSize) {
|
||||
UpdateMediaSize(aNewIntrinsicSize.value());
|
||||
@@ -6355,10 +6355,10 @@ void HTMLMediaElement::Invalidate(bool aImageSizeChanged,
|
||||
}
|
||||
|
||||
RefPtr<ImageContainer> imageContainer = GetImageContainer();
|
||||
bool asyncInvalidate =
|
||||
imageContainer && imageContainer->IsAsync() && !aForceInvalidate;
|
||||
bool asyncInvalidate = imageContainer && imageContainer->IsAsync() &&
|
||||
aForceInvalidate == ForceInvalidate::No;
|
||||
if (frame) {
|
||||
if (aImageSizeChanged) {
|
||||
if (aImageSizeChanged == ImageSizeChanged::Yes) {
|
||||
frame->InvalidateFrame();
|
||||
} else {
|
||||
frame->InvalidateLayer(DisplayItemType::TYPE_VIDEO, nullptr, nullptr,
|
||||
|
||||
Reference in New Issue
Block a user