Backed out changeset 774ff21aecb3 (bug 1120128) for build bustage

This commit is contained in:
Wes Kocher 2015-01-27 17:48:43 -08:00
parent 95c94079c9
commit 50351b0c8d
12 changed files with 17 additions and 87 deletions

View File

@ -154,8 +154,7 @@ WMFVideoMFTManager::InitializeDXVA()
return false;
}
if (gfxWindowsPlatform::GetPlatform()->IsWARP() ||
!gfxPlatform::CanUseDXVA()) {
if (gfxWindowsPlatform::GetPlatform()->IsWARP()) {
return false;
}

View File

@ -9,7 +9,6 @@ EXPORTS += [
'AsyncEventRunner.h',
'MediaSourceDecoder.h',
'MediaSourceReader.h',
'ResourceQueue.h',
]
EXPORTS.mozilla.dom += [

View File

@ -111,8 +111,7 @@ WMFReader::InitializeDXVA()
return false;
}
if (gfxWindowsPlatform::GetPlatform()->IsWARP() ||
!gfxPlatform::CanUseDXVA()) {
if (gfxWindowsPlatform::GetPlatform()->IsWARP()) {
return false;
}

View File

@ -2164,7 +2164,6 @@ gfxPlatform::OptimalFormatForContent(gfxContentType aContent)
*/
static bool sLayersSupportsD3D9 = false;
static bool sLayersSupportsD3D11 = false;
static bool sLayersSupportsDXVA = false;
static bool sBufferRotationCheckPref = true;
static bool sPrefBrowserTabsRemoteAutostart = false;
@ -2206,11 +2205,6 @@ InitLayersAccelerationPrefs()
// Always support D3D11 when WARP is allowed.
sLayersSupportsD3D11 = true;
}
if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DXVA, &status))) {
if (status == nsIGfxInfo::FEATURE_STATUS_OK) {
sLayersSupportsDXVA = true;
}
}
}
}
#endif
@ -2237,15 +2231,6 @@ gfxPlatform::CanUseDirect3D11()
return sLayersSupportsD3D11;
}
bool
gfxPlatform::CanUseDXVA()
{
// this function is called from the compositor thread, so it is not
// safe to init the prefs etc. from here.
MOZ_ASSERT(sLayersAccelerationPrefsInitialized);
return sLayersSupportsDXVA;
}
bool
gfxPlatform::BufferRotationEnabled()
{

View File

@ -481,7 +481,6 @@ public:
static bool CanUseDirect3D9();
static bool CanUseDirect3D11();
static bool CanUseDXVA();
/**
* Is it possible to use buffer rotation. Note that these

View File

@ -12,8 +12,6 @@ namespace mp4_demuxer {
BufferStream::BufferStream()
: mStartOffset(0)
, mLogicalLength(0)
, mStartIndex(0)
{
}
@ -21,33 +19,12 @@ BufferStream::BufferStream()
BufferStream::ReadAt(int64_t aOffset, void* aData, size_t aLength,
size_t* aBytesRead)
{
if (aOffset < (mStartOffset + mStartIndex) ||
mData.IsEmpty() ||
aOffset > mStartOffset + mData.LastElement()->Length()) {
if (aOffset < mStartOffset || aOffset > mStartOffset + mData.Length()) {
return false;
}
*aBytesRead =
std::min(aLength, size_t(mStartOffset + mData.Length() - aOffset));
memcpy(aData, &mData[aOffset - mStartOffset], *aBytesRead);
aOffset -= mStartOffset;
size_t index = mStartIndex;
*aBytesRead = 0;
uint8_t* dest = (uint8_t*)aData;
for (uint32_t i = 0; i < mData.Length() && aLength; i++) {
ResourceItem* item = mData[i];
if (aOffset >= index && aOffset < item->Length()) {
size_t count = std::min(item->Length() - aOffset, (uint64_t)aLength);
*aBytesRead += count;
memcpy(dest, &item->mData[aOffset], count);
dest += count;
aLength -= count;
}
aOffset -= item->Length();
index = 0;
}
return true;
}
@ -61,36 +38,28 @@ BufferStream::CachedReadAt(int64_t aOffset, void* aData, size_t aLength,
/*virtual*/ bool
BufferStream::Length(int64_t* aLength)
{
*aLength = mLogicalLength;
*aLength = mStartOffset + mData.Length();
return true;
}
/* virtual */ void
BufferStream::DiscardBefore(int64_t aOffset)
{
while (!mData.IsEmpty() &&
mStartOffset + mData[0]->mData.Length() <= aOffset) {
mStartOffset += mData[0]->mData.Length();
mData.RemoveElementAt(0);
if (aOffset > mStartOffset) {
mData.RemoveElementsAt(0, aOffset - mStartOffset);
mStartOffset = aOffset;
}
mStartIndex = aOffset - mStartOffset;
}
void
BufferStream::AppendBytes(const uint8_t* aData, size_t aLength)
{
mData.AppendElement(new ResourceItem(aData, aLength));
}
void
BufferStream::AppendData(ResourceItem* aItem)
{
mData.AppendElement(aItem);
mData.AppendElements(aData, aLength);
}
MediaByteRange
BufferStream::GetByteRange()
{
return MediaByteRange(mStartOffset + mStartIndex, mLogicalLength);
return MediaByteRange(mStartOffset, mStartOffset + mData.Length());
}
}

View File

@ -7,7 +7,6 @@
#include "mp4_demuxer/mp4_demuxer.h"
#include "nsTArray.h"
#include "ResourceQueue.h"
namespace mp4_demuxer {
@ -19,23 +18,21 @@ public:
*/
BufferStream();
bool ReadAt(int64_t aOffset, void* aData, size_t aLength,
size_t* aBytesRead);
bool CachedReadAt(int64_t aOffset, void* aData, size_t aLength,
size_t* aBytesRead);
bool Length(int64_t* aLength);
virtual bool ReadAt(int64_t aOffset, void* aData, size_t aLength,
size_t* aBytesRead) MOZ_OVERRIDE;
virtual bool CachedReadAt(int64_t aOffset, void* aData, size_t aLength,
size_t* aBytesRead) MOZ_OVERRIDE;
virtual bool Length(int64_t* aLength) MOZ_OVERRIDE;
void DiscardBefore(int64_t aOffset);
virtual void DiscardBefore(int64_t aOffset) MOZ_OVERRIDE;
void AppendBytes(const uint8_t* aData, size_t aLength);
void AppendData(mozilla::ResourceItem* aItem);
mozilla::MediaByteRange GetByteRange();
private:
int64_t mStartOffset;
int64_t mLogicalLength;
int64_t mStartIndex;
nsTArray<nsRefPtr<mozilla::ResourceItem>> mData;
nsTArray<uint8_t> mData;
};
}

View File

@ -214,9 +214,6 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id)
case Nvidia310M:
APPEND_DEVICE(0x0A70);
break;
case AMDRadeonHD5800:
APPEND_DEVICE(0x6899);
break;
// This should never happen, but we get a warning if we don't handle this.
case DeviceFamilyMax:
NS_WARNING("Invalid DeviceFamily id");

View File

@ -73,7 +73,6 @@ enum DeviceFamily {
RadeonX1000,
Geforce7300GT,
Nvidia310M,
AMDRadeonHD5800,
DeviceFamilyMax
};

View File

@ -123,9 +123,6 @@ GetPrefNameForFeature(int32_t aFeature)
case nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS:
name = BLACKLIST_PREF_BRANCH "layers.direct3d11";
break;
case nsIGfxInfo::FEATURE_DXVA:
name = BLACKLIST_PREF_BRANCH "dxva";
break;
case nsIGfxInfo::FEATURE_OPENGL_LAYERS:
name = BLACKLIST_PREF_BRANCH "layers.opengl";
break;
@ -290,8 +287,6 @@ BlacklistFeatureToGfxFeature(const nsAString& aFeature)
return nsIGfxInfo::FEATURE_DIRECT3D_10_1_LAYERS;
else if (aFeature.EqualsLiteral("DIRECT3D_11_LAYERS"))
return nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS;
else if (aFeature.EqualsLiteral("DXVA"))
return nsIGfxInfo::FEATURE_DXVA;
else if (aFeature.EqualsLiteral("OPENGL_LAYERS"))
return nsIGfxInfo::FEATURE_OPENGL_LAYERS;
else if (aFeature.EqualsLiteral("WEBGL_OPENGL"))
@ -847,7 +842,6 @@ GfxInfoBase::EvaluateDownloadedBlacklist(nsTArray<GfxDriverInfo>& aDriverInfo)
nsIGfxInfo::FEATURE_DIRECT3D_10_LAYERS,
nsIGfxInfo::FEATURE_DIRECT3D_10_1_LAYERS,
nsIGfxInfo::FEATURE_DIRECT3D_11_LAYERS,
nsIGfxInfo::FEATURE_DXVA,
nsIGfxInfo::FEATURE_OPENGL_LAYERS,
nsIGfxInfo::FEATURE_WEBGL_OPENGL,
nsIGfxInfo::FEATURE_WEBGL_ANGLE,

View File

@ -87,8 +87,6 @@ interface nsIGfxInfo : nsISupports
const long FEATURE_WEBRTC_HW_ACCELERATION = 10;
/* Whether Direct3D 11 is supported for layers. */
const long FEATURE_DIRECT3D_11_LAYERS = 11;
/* Whether DXVA is supported for video decoding. */
const long FEATURE_DXVA = 12;
/*
* A set of return values from GetFeatureStatus

View File

@ -1034,11 +1034,6 @@ GfxInfo::GetGfxDriverInfo()
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), (GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(Nvidia310M),
nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions);
APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_ALL,
(nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI), (GfxDeviceFamily*)GfxDriverInfo::GetDeviceFamily(AMDRadeonHD5800),
nsIGfxInfo::FEATURE_DXVA, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
DRIVER_LESS_THAN, GfxDriverInfo::allDriverVersions);
}
return *mDriverInfo;
}