mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
Merge remote-tracking branch 'origin/media-works' into master
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include "ClientLayerManager.h"
|
||||
#include "nsQueryObject.h"
|
||||
#ifdef MOZ_FMP4
|
||||
#include "MP4Reader.h"
|
||||
#include "MP4Decoder.h"
|
||||
#endif
|
||||
|
||||
#include "nsIScrollableFrame.h"
|
||||
@@ -2252,7 +2252,7 @@ nsDOMWindowUtils::GetLayerManagerRemote(bool* retval)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::GetSupportsHardwareH264Decoding(bool* retval)
|
||||
nsDOMWindowUtils::GetSupportsHardwareH264Decoding(nsAString& aRetval)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(nsContentUtils::IsCallerChrome());
|
||||
|
||||
@@ -2265,9 +2265,15 @@ nsDOMWindowUtils::GetSupportsHardwareH264Decoding(bool* retval)
|
||||
if (!mgr)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*retval = MP4Reader::IsVideoAccelerated(mgr->GetCompositorBackendType());
|
||||
nsCString failureReason;
|
||||
if (MP4Decoder::IsVideoAccelerated(mgr->GetCompositorBackendType(), failureReason)) {
|
||||
aRetval.AssignLiteral("Yes");
|
||||
} else {
|
||||
aRetval.AssignLiteral("No; ");
|
||||
AppendUTF8toUTF16(failureReason, aRetval);
|
||||
}
|
||||
#else
|
||||
*retval = false;
|
||||
aRetval.AssignLiteral("No; Compiled without MP4 support.");
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user