Merge remote-tracking branch 'origin/master' into custom

This commit is contained in:
roytam1 2021-01-01 10:04:05 +08:00
commit a9f63c3e7d
573 changed files with 608 additions and 26006 deletions

View file

@ -187,28 +187,6 @@ devtools/client/framework/test/code_ugly*
devtools/server/tests/unit/babel_and_browserify_script_with_source_map.js
devtools/server/tests/unit/setBreakpoint*
# mobile/android/ exclusions
mobile/android/tests/
# Uses `#filter substitution`
mobile/android/b2gdroid/app/b2gdroid.js
mobile/android/app/mobile.js
mobile/android/chrome/content/healthreport-prefs.js
# Uses `#expand`
mobile/android/chrome/content/about.js
# Not much JS to lint and non-standard at that
mobile/android/installer/
mobile/android/locales/
# Non-standard `(catch ex if ...)`
mobile/android/chrome/content/browser.js
mobile/android/components/Snippets.js
# Bug 1178739: Ignore this file as a quick fix for "Illegal yield expression"
mobile/android/modules/HomeProvider.jsm
# services/ exclusions
# Uses `#filter substitution`

3
.gitignore vendored
View file

@ -91,9 +91,6 @@ GPATH
# Git clone directory for updating web-platform-tests
testing/web-platform/sync/
# Android Gradle artifacts.
mobile/android/gradle/.gradle
# XCode project cruft
embedding/ios/GoannaEmbed/GoannaEmbed.xcodeproj/project.xcworkspace/xcuserdata
embedding/ios/GoannaEmbed/GoannaEmbed.xcodeproj/xcuserdata

View file

@ -64,9 +64,7 @@ this.AccessFu = { // jshint ignore:line
if (this._enabled) {
this._disable();
}
if (Utils.MozBuildApp === 'mobile/android') {
Services.obs.removeObserver(this, 'Accessibility:Settings');
} else if (Utils.win.navigator.mozSettings) {
if (Utils.win.navigator.mozSettings) {
Utils.win.navigator.mozSettings.removeObserver(
SCREENREADER_SETTING, this.handleEvent);
}
@ -585,11 +583,7 @@ var Output = {
get androidBridge() {
delete this.androidBridge;
if (Utils.MozBuildApp === 'mobile/android') {
this.androidBridge = Services.androidBridge;
} else {
this.androidBridge = null;
}
this.androidBridge = null;
return this.androidBridge;
},
@ -815,12 +809,6 @@ var Input = {
target.blur();
}
}
if (Utils.MozBuildApp == 'mobile/android') {
// Return focus to native Android browser chrome.
Services.androidBridge.handleGeckoMessage(
{ type: 'ToggleChrome:Focus' });
}
break;
case aEvent.DOM_VK_RETURN:
if (this.editState.editing) {
@ -837,18 +825,9 @@ var Input = {
},
moveToPoint: function moveToPoint(aRule, aX, aY) {
// XXX: Bug 1013408 - There is no alignment between the chrome window's
// viewport size and the content viewport size in Android. This makes
// sending mouse events beyond its bounds impossible.
if (Utils.MozBuildApp === 'mobile/android') {
let mm = Utils.getMessageManager(Utils.CurrentBrowser);
mm.sendAsyncMessage('AccessFu:MoveToPoint',
{rule: aRule, x: aX, y: aY, origin: 'top'});
} else {
let win = Utils.win;
Utils.winUtils.sendMouseEvent('mousemove',
aX - win.mozInnerScreenX, aY - win.mozInnerScreenY, 0, 0, 0);
}
let win = Utils.win;
Utils.winUtils.sendMouseEvent('mousemove',
aX - win.mozInnerScreenX, aY - win.mozInnerScreenY, 0, 0, 0);
},
moveCursor: function moveCursor(aAction, aRule, aInputType, aAdjustRange) {

View file

@ -76,8 +76,6 @@ const EDGE = 0.1;
const TIMEOUT_MULTIPLIER = 1;
// A single pointer down/up sequence periodically precedes the tripple swipe
// gesture on Android. This delay acounts for that.
const IS_ANDROID = Utils.MozBuildApp === 'mobile/android' &&
Utils.AndroidSdkVersion >= 14;
/**
* A point object containing distance travelled data.
@ -206,7 +204,7 @@ this.GestureTracker = { // jshint ignore:line
if (aDetail.type !== 'pointerdown') {
return;
}
let GestureConstructor = aGesture || (IS_ANDROID ? DoubleTap : Tap);
let GestureConstructor = aGesture || Tap;
this._create(GestureConstructor);
this._update(aDetail, aTimeStamp);
},

View file

@ -680,7 +680,6 @@ this.Presentation = { // jshint ignore:line
get presenters() {
delete this.presenters;
let presenterMap = {
'mobile/android': [VisualPresenter, AndroidPresenter],
'b2g': [VisualPresenter, B2GPresenter],
'browser': [VisualPresenter, B2GPresenter, AndroidPresenter]
};

View file

@ -33,9 +33,7 @@ this.Utils = { // jshint ignore:line
_buildAppMap: {
'{3c2e2abc-06d4-11e1-ac3b-374f68613e61}': 'b2g',
'{d1bfe7d9-c01e-4237-998b-7b5f960a4314}': 'graphene',
'{ec8030f7-c20a-464f-9b0e-13a3a9e97384}': 'browser',
'{aa3c5121-dab2-40e2-81ca-7ea25febc110}': 'mobile/android',
'{a23983c0-fd0e-11dc-95ff-0800200c9a66}': 'mobile/xul'
'{ec8030f7-c20a-464f-9b0e-13a3a9e97384}': 'browser'
},
init: function Utils_init(aWindow) {

View file

@ -28,6 +28,7 @@ pref("@GUAO_PREF@.googlevideos.com","Mozilla/5.0 (%OS_SLICE% rv:38.9) @GK_SLICE@
pref("@GUAO_PREF@.gstatic.com","Mozilla/5.0 (%OS_SLICE% rv:71.0) @GK_SLICE@ Firefox/71.0 @PM_SLICE@");
pref("@GUAO_PREF@.live.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Pale Moon)");
pref("@GUAO_PREF@.msn.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Pale Moon)");
pref("@GUAO_PREF@.netteller.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@");
pref("@GUAO_PREF@.patientaccess.com","Mozilla/5.0 (%OS_SLICE% rv:60.0) @GK_SLICE@ Firefox/60.0 @PM_SLICE@");
pref("@GUAO_PREF@.outlook.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Pale Moon)");
pref("@GUAO_PREF@.web.de","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Pale Moon)");

View file

@ -16,8 +16,6 @@ namespace mozilla {
namespace dom {
class Promise;
// Make sure that any change to ScreenOrientationInternal values are
// also made in mobile/android/base/GeckoScreenOrientation.java
typedef uint32_t ScreenOrientationInternal;
static const ScreenOrientationInternal eScreenOrientation_None = 0;

View file

@ -1,227 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "AndroidDecoderModule.h"
#include "AndroidBridge.h"
#include "MediaCodecDataDecoder.h"
#include "RemoteDataDecoder.h"
#include "MediaInfo.h"
#include "VPXDecoder.h"
#include "MediaPrefs.h"
#include "OpusDecoder.h"
#include "VorbisDecoder.h"
#include "nsPromiseFlatString.h"
#include "nsIGfxInfo.h"
#include "prlog.h"
#include <jni.h>
#undef LOG
#define LOG(arg, ...) MOZ_LOG(sAndroidDecoderModuleLog, \
mozilla::LogLevel::Debug, ("AndroidDecoderModule(%p)::%s: " arg, \
this, __func__, ##__VA_ARGS__))
using namespace mozilla;
using namespace mozilla::gl;
using namespace mozilla::java::sdk;
using media::TimeUnit;
namespace mozilla {
mozilla::LazyLogModule sAndroidDecoderModuleLog("AndroidDecoderModule");
static const char*
TranslateMimeType(const nsACString& aMimeType)
{
if (VPXDecoder::IsVPX(aMimeType, VPXDecoder::VP8)) {
return "video/x-vnd.on2.vp8";
} else if (VPXDecoder::IsVPX(aMimeType, VPXDecoder::VP9)) {
return "video/x-vnd.on2.vp9";
}
return PromiseFlatCString(aMimeType).get();
}
static bool
GetFeatureStatus(int32_t aFeature)
{
nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
int32_t status = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
nsCString discardFailureId;
if (!gfxInfo || NS_FAILED(gfxInfo->GetFeatureStatus(aFeature, discardFailureId, &status))) {
return false;
}
return status == nsIGfxInfo::FEATURE_STATUS_OK;
};
CryptoInfo::LocalRef
GetCryptoInfoFromSample(const MediaRawData* aSample)
{
auto& cryptoObj = aSample->mCrypto;
if (!cryptoObj.mValid) {
return nullptr;
}
CryptoInfo::LocalRef cryptoInfo;
nsresult rv = CryptoInfo::New(&cryptoInfo);
NS_ENSURE_SUCCESS(rv, nullptr);
uint32_t numSubSamples =
std::min<uint32_t>(cryptoObj.mPlainSizes.Length(), cryptoObj.mEncryptedSizes.Length());
uint32_t totalSubSamplesSize = 0;
for (auto& size : cryptoObj.mEncryptedSizes) {
totalSubSamplesSize += size;
}
// mPlainSizes is uint16_t, need to transform to uint32_t first.
nsTArray<uint32_t> plainSizes;
for (auto& size : cryptoObj.mPlainSizes) {
totalSubSamplesSize += size;
plainSizes.AppendElement(size);
}
uint32_t codecSpecificDataSize = aSample->Size() - totalSubSamplesSize;
// Size of codec specific data("CSD") for Android MediaCodec usage should be
// included in the 1st plain size.
plainSizes[0] += codecSpecificDataSize;
static const int kExpectedIVLength = 16;
auto tempIV(cryptoObj.mIV);
auto tempIVLength = tempIV.Length();
MOZ_ASSERT(tempIVLength <= kExpectedIVLength);
for (size_t i = tempIVLength; i < kExpectedIVLength; i++) {
// Padding with 0
tempIV.AppendElement(0);
}
auto numBytesOfPlainData = mozilla::jni::IntArray::New(
reinterpret_cast<int32_t*>(&plainSizes[0]),
plainSizes.Length());
auto numBytesOfEncryptedData =
mozilla::jni::IntArray::New(reinterpret_cast<const int32_t*>(&cryptoObj.mEncryptedSizes[0]),
cryptoObj.mEncryptedSizes.Length());
auto iv = mozilla::jni::ByteArray::New(reinterpret_cast<int8_t*>(&tempIV[0]),
tempIV.Length());
auto keyId = mozilla::jni::ByteArray::New(reinterpret_cast<const int8_t*>(&cryptoObj.mKeyId[0]),
cryptoObj.mKeyId.Length());
cryptoInfo->Set(numSubSamples,
numBytesOfPlainData,
numBytesOfEncryptedData,
keyId,
iv,
MediaCodec::CRYPTO_MODE_AES_CTR);
return cryptoInfo;
}
bool
AndroidDecoderModule::SupportsMimeType(const nsACString& aMimeType,
DecoderDoctorDiagnostics* aDiagnostics) const
{
if (!AndroidBridge::Bridge() ||
AndroidBridge::Bridge()->GetAPIVersion() < 16) {
return false;
}
if (aMimeType.EqualsLiteral("video/mp4") ||
aMimeType.EqualsLiteral("video/avc")) {
return true;
}
// When checking "audio/x-wav", CreateDecoder can cause a JNI ERROR by
// Accessing a stale local reference leading to a SIGSEGV crash.
// To avoid this we check for wav types here.
if (aMimeType.EqualsLiteral("audio/x-wav") ||
aMimeType.EqualsLiteral("audio/wave; codecs=1") ||
aMimeType.EqualsLiteral("audio/wave; codecs=6") ||
aMimeType.EqualsLiteral("audio/wave; codecs=7") ||
aMimeType.EqualsLiteral("audio/wave; codecs=65534")) {
return false;
}
if ((VPXDecoder::IsVPX(aMimeType, VPXDecoder::VP8) &&
!GetFeatureStatus(nsIGfxInfo::FEATURE_VP8_HW_DECODE)) ||
(VPXDecoder::IsVPX(aMimeType, VPXDecoder::VP9) &&
!GetFeatureStatus(nsIGfxInfo::FEATURE_VP9_HW_DECODE))) {
return false;
}
// Prefer the gecko decoder for opus and vorbis; stagefright crashes
// on content demuxed from mp4.
if (OpusDataDecoder::IsOpus(aMimeType) ||
VorbisDataDecoder::IsVorbis(aMimeType)) {
LOG("Rejecting audio of type %s", aMimeType.Data());
return false;
}
return java::HardwareCodecCapabilityUtils::FindDecoderCodecInfoForMimeType(
nsCString(TranslateMimeType(aMimeType)));
}
already_AddRefed<MediaDataDecoder>
AndroidDecoderModule::CreateVideoDecoder(const CreateDecoderParams& aParams)
{
MediaFormat::LocalRef format;
const VideoInfo& config = aParams.VideoConfig();
NS_ENSURE_SUCCESS(MediaFormat::CreateVideoFormat(
TranslateMimeType(config.mMimeType),
config.mDisplay.width,
config.mDisplay.height,
&format), nullptr);
RefPtr<MediaDataDecoder> decoder = MediaPrefs::PDMAndroidRemoteCodecEnabled() ?
RemoteDataDecoder::CreateVideoDecoder(config,
format,
aParams.mCallback,
aParams.mImageContainer) :
MediaCodecDataDecoder::CreateVideoDecoder(config,
format,
aParams.mCallback,
aParams.mImageContainer);
return decoder.forget();
}
already_AddRefed<MediaDataDecoder>
AndroidDecoderModule::CreateAudioDecoder(const CreateDecoderParams& aParams)
{
const AudioInfo& config = aParams.AudioConfig();
MOZ_ASSERT(config.mBitDepth == 16, "We only handle 16-bit audio!");
MediaFormat::LocalRef format;
LOG("CreateAudioFormat with mimeType=%s, mRate=%d, channels=%d",
config.mMimeType.Data(), config.mRate, config.mChannels);
NS_ENSURE_SUCCESS(MediaFormat::CreateAudioFormat(
config.mMimeType,
config.mRate,
config.mChannels,
&format), nullptr);
RefPtr<MediaDataDecoder> decoder = MediaPrefs::PDMAndroidRemoteCodecEnabled() ?
RemoteDataDecoder::CreateAudioDecoder(config, format, aParams.mCallback) :
MediaCodecDataDecoder::CreateAudioDecoder(config, format, aParams.mCallback);
return decoder.forget();
}
PlatformDecoderModule::ConversionRequired
AndroidDecoderModule::DecoderNeedsConversion(const TrackInfo& aConfig) const
{
if (aConfig.IsVideo()) {
return ConversionRequired::kNeedAnnexB;
}
return ConversionRequired::kNeedNone;
}
} // mozilla

View file

@ -1,34 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef AndroidDecoderModule_h_
#define AndroidDecoderModule_h_
#include "PlatformDecoderModule.h"
namespace mozilla {
class AndroidDecoderModule : public PlatformDecoderModule {
public:
already_AddRefed<MediaDataDecoder>
CreateVideoDecoder(const CreateDecoderParams& aParams) override;
already_AddRefed<MediaDataDecoder>
CreateAudioDecoder(const CreateDecoderParams& aParams) override;
AndroidDecoderModule() {}
virtual ~AndroidDecoderModule() {}
bool SupportsMimeType(const nsACString& aMimeType,
DecoderDoctorDiagnostics* aDiagnostics) const override;
ConversionRequired
DecoderNeedsConversion(const TrackInfo& aConfig) const override;
};
extern LazyLogModule sAndroidDecoderModuleLog;
} // namespace mozilla
#endif

View file

@ -1,698 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "MediaCodecDataDecoder.h"
#include "AndroidBridge.h"
#include "AndroidSurfaceTexture.h"
#include "GeneratedJNINatives.h"
#include "GLImages.h"
#include "MediaData.h"
#include "MediaInfo.h"
#include "VPXDecoder.h"
#include "nsThreadUtils.h"
#include "nsPromiseFlatString.h"
#include "nsIGfxInfo.h"
#include "prlog.h"
#include <jni.h>
#undef LOG
#define LOG(arg, ...) MOZ_LOG(sAndroidDecoderModuleLog, \
mozilla::LogLevel::Debug, ("MediaCodecDataDecoder(%p)::%s: " arg, \
this, __func__, ##__VA_ARGS__))
using namespace mozilla;
using namespace mozilla::gl;
using namespace mozilla::java;
using namespace mozilla::java::sdk;
using media::TimeUnit;
namespace mozilla {
#define INVOKE_CALLBACK(Func, ...) \
if (mCallback) { \
mCallback->Func(__VA_ARGS__); \
} else { \
NS_WARNING("Callback not set"); \
}
static MediaCodec::LocalRef
CreateDecoder(const nsACString& aMimeType)
{
MediaCodec::LocalRef codec;
NS_ENSURE_SUCCESS(MediaCodec::CreateDecoderByType(TranslateMimeType(aMimeType),
&codec), nullptr);
return codec;
}
class VideoDataDecoder : public MediaCodecDataDecoder
{
public:
VideoDataDecoder(const VideoInfo& aConfig,
MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback,
layers::ImageContainer* aImageContainer)
: MediaCodecDataDecoder(MediaData::Type::VIDEO_DATA, aConfig.mMimeType,
aFormat, aCallback)
, mImageContainer(aImageContainer)
, mConfig(aConfig)
{
}
const char* GetDescriptionName() const override
{
return "Android MediaCodec video decoder";
}
RefPtr<InitPromise> Init() override
{
mSurfaceTexture = AndroidSurfaceTexture::Create();
if (!mSurfaceTexture) {
NS_WARNING("Failed to create SurfaceTexture for video decode\n");
return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__);
}
if (NS_FAILED(InitDecoder(mSurfaceTexture->JavaSurface()))) {
return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__);
}
return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack, __func__);
}
void Cleanup() override
{
}
nsresult PostOutput(BufferInfo::Param aInfo, MediaFormat::Param aFormat,
const TimeUnit& aDuration) override
{
RefPtr<layers::Image> img =
new SurfaceTextureImage(mSurfaceTexture.get(), mConfig.mDisplay,
gl::OriginPos::BottomLeft);
nsresult rv;
int32_t flags;
NS_ENSURE_SUCCESS(rv = aInfo->Flags(&flags), rv);
bool isSync = !!(flags & MediaCodec::BUFFER_FLAG_SYNC_FRAME);
int32_t offset;
NS_ENSURE_SUCCESS(rv = aInfo->Offset(&offset), rv);
int64_t presentationTimeUs;
NS_ENSURE_SUCCESS(rv = aInfo->PresentationTimeUs(&presentationTimeUs), rv);
RefPtr<VideoData> v =
VideoData::CreateFromImage(mConfig,
offset,
presentationTimeUs,
aDuration.ToMicroseconds(),
img,
isSync,
presentationTimeUs,
gfx::IntRect(0, 0,
mConfig.mDisplay.width,
mConfig.mDisplay.height));
INVOKE_CALLBACK(Output, v);
return NS_OK;
}
protected:
layers::ImageContainer* mImageContainer;
const VideoInfo& mConfig;
RefPtr<AndroidSurfaceTexture> mSurfaceTexture;
};
class AudioDataDecoder : public MediaCodecDataDecoder
{
public:
AudioDataDecoder(const AudioInfo& aConfig, MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback)
: MediaCodecDataDecoder(MediaData::Type::AUDIO_DATA, aConfig.mMimeType,
aFormat, aCallback)
{
JNIEnv* const env = jni::GetEnvForThread();
jni::ByteBuffer::LocalRef buffer(env);
NS_ENSURE_SUCCESS_VOID(aFormat->GetByteBuffer(NS_LITERAL_STRING("csd-0"),
&buffer));
if (!buffer && aConfig.mCodecSpecificConfig->Length() >= 2) {
buffer = jni::ByteBuffer::New(
aConfig.mCodecSpecificConfig->Elements(),
aConfig.mCodecSpecificConfig->Length());
NS_ENSURE_SUCCESS_VOID(aFormat->SetByteBuffer(NS_LITERAL_STRING("csd-0"),
buffer));
}
}
const char* GetDescriptionName() const override
{
return "android audio decoder";
}
nsresult Output(BufferInfo::Param aInfo, void* aBuffer,
MediaFormat::Param aFormat, const TimeUnit& aDuration)
{
// The output on Android is always 16-bit signed
nsresult rv;
int32_t numChannels;
NS_ENSURE_SUCCESS(rv =
aFormat->GetInteger(NS_LITERAL_STRING("channel-count"), &numChannels), rv);
AudioConfig::ChannelLayout layout(numChannels);
if (!layout.IsValid()) {
return NS_ERROR_FAILURE;
}
int32_t sampleRate;
NS_ENSURE_SUCCESS(rv =
aFormat->GetInteger(NS_LITERAL_STRING("sample-rate"), &sampleRate), rv);
int32_t size;
NS_ENSURE_SUCCESS(rv = aInfo->Size(&size), rv);
int32_t offset;
NS_ENSURE_SUCCESS(rv = aInfo->Offset(&offset), rv);
#ifdef MOZ_SAMPLE_TYPE_S16
const int32_t numSamples = size / 2;
#else
#error We only support 16-bit integer PCM
#endif
const int32_t numFrames = numSamples / numChannels;
AlignedAudioBuffer audio(numSamples);
if (!audio) {
return NS_ERROR_OUT_OF_MEMORY;
}
const uint8_t* bufferStart = static_cast<uint8_t*>(aBuffer) + offset;
PodCopy(audio.get(), reinterpret_cast<const AudioDataValue*>(bufferStart),
numSamples);
int64_t presentationTimeUs;
NS_ENSURE_SUCCESS(rv = aInfo->PresentationTimeUs(&presentationTimeUs), rv);
RefPtr<AudioData> data = new AudioData(0, presentationTimeUs,
aDuration.ToMicroseconds(),
numFrames,
Move(audio),
numChannels,
sampleRate);
INVOKE_CALLBACK(Output, data);
return NS_OK;
}
};
MediaDataDecoder*
MediaCodecDataDecoder::CreateAudioDecoder(const AudioInfo& aConfig,
MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback)
{
return new AudioDataDecoder(aConfig, aFormat, aCallback);
}
MediaDataDecoder*
MediaCodecDataDecoder::CreateVideoDecoder(const VideoInfo& aConfig,
MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback,
layers::ImageContainer* aImageContainer)
{
return new VideoDataDecoder(aConfig, aFormat, aCallback, aImageContainer);
}
MediaCodecDataDecoder::MediaCodecDataDecoder(MediaData::Type aType,
const nsACString& aMimeType,
MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback)
: mType(aType)
, mMimeType(aMimeType)
, mFormat(aFormat)
, mCallback(aCallback)
, mInputBuffers(nullptr)
, mOutputBuffers(nullptr)
, mMonitor("MediaCodecDataDecoder::mMonitor")
, mState(ModuleState::kDecoding)
{
}
MediaCodecDataDecoder::~MediaCodecDataDecoder()
{
Shutdown();
}
RefPtr<MediaDataDecoder::InitPromise>
MediaCodecDataDecoder::Init()
{
nsresult rv = InitDecoder(nullptr);
TrackInfo::TrackType type =
(mType == MediaData::AUDIO_DATA ? TrackInfo::TrackType::kAudioTrack
: TrackInfo::TrackType::kVideoTrack);
return NS_SUCCEEDED(rv) ?
InitPromise::CreateAndResolve(type, __func__) :
InitPromise::CreateAndReject(
NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__);
}
nsresult
MediaCodecDataDecoder::InitDecoder(Surface::Param aSurface)
{
mDecoder = CreateDecoder(mMimeType);
if (!mDecoder) {
INVOKE_CALLBACK(Error,
MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__));
return NS_ERROR_FAILURE;
}
nsresult rv;
NS_ENSURE_SUCCESS(rv = mDecoder->Configure(mFormat, aSurface, nullptr, 0), rv);
NS_ENSURE_SUCCESS(rv = mDecoder->Start(), rv);
NS_ENSURE_SUCCESS(rv = ResetInputBuffers(), rv);
NS_ENSURE_SUCCESS(rv = ResetOutputBuffers(), rv);
nsCOMPtr<nsIRunnable> r = NewRunnableMethod(this, &MediaCodecDataDecoder::DecoderLoop);
rv = NS_NewNamedThread("MC Decoder", getter_AddRefs(mThread), r);
return rv;
}
// This is in usec, so that's 10ms.
static const int64_t kDecoderTimeout = 10000;
#define BREAK_ON_DECODER_ERROR() \
if (NS_FAILED(res)) { \
NS_WARNING("Exiting decoder loop due to exception"); \
if (mState == ModuleState::kDrainDecoder) { \
INVOKE_CALLBACK(DrainComplete); \
SetState(ModuleState::kDecoding); \
} \
INVOKE_CALLBACK(Error, MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__)); \
break; \
}
nsresult
MediaCodecDataDecoder::GetInputBuffer(
JNIEnv* aEnv, int aIndex, jni::Object::LocalRef* aBuffer)
{
MOZ_ASSERT(aEnv);
MOZ_ASSERT(!*aBuffer);
int numTries = 2;
while (numTries--) {
*aBuffer = jni::Object::LocalRef::Adopt(
aEnv->GetObjectArrayElement(mInputBuffers.Get(), aIndex));
if (*aBuffer) {
return NS_OK;
}
nsresult res = ResetInputBuffers();
if (NS_FAILED(res)) {
return res;
}
}
return NS_ERROR_FAILURE;
}
bool
MediaCodecDataDecoder::WaitForInput()
{
MonitorAutoLock lock(mMonitor);
while (mState == ModuleState::kDecoding && mQueue.empty()) {
// Signal that we require more input.
INVOKE_CALLBACK(InputExhausted);
lock.Wait();
}
return mState != ModuleState::kStopping;
}
already_AddRefed<MediaRawData>
MediaCodecDataDecoder::PeekNextSample()
{
MonitorAutoLock lock(mMonitor);
if (mState == ModuleState::kFlushing) {
mDecoder->Flush();
ClearQueue();
SetState(ModuleState::kDecoding);
lock.Notify();
return nullptr;
}
if (mQueue.empty()) {
if (mState == ModuleState::kDrainQueue) {
SetState(ModuleState::kDrainDecoder);
}
return nullptr;
}
// We're not stopping or flushing, so try to get a sample.
return RefPtr<MediaRawData>(mQueue.front()).forget();
}
nsresult
MediaCodecDataDecoder::QueueSample(const MediaRawData* aSample)
{
MOZ_ASSERT(aSample);
AutoLocalJNIFrame frame(jni::GetEnvForThread(), 1);
// We have a sample, try to feed it to the decoder.
int32_t inputIndex = -1;
nsresult res = mDecoder->DequeueInputBuffer(kDecoderTimeout, &inputIndex);
if (NS_FAILED(res)) {
return res;
}
if (inputIndex < 0) {
// There is no valid input buffer available.
return NS_ERROR_FAILURE;
}
jni::Object::LocalRef buffer(frame.GetEnv());
res = GetInputBuffer(frame.GetEnv(), inputIndex, &buffer);
if (NS_FAILED(res)) {
return res;
}
void* directBuffer = frame.GetEnv()->GetDirectBufferAddress(buffer.Get());
MOZ_ASSERT(frame.GetEnv()->GetDirectBufferCapacity(buffer.Get()) >=
aSample->Size(),
"Decoder buffer is not large enough for sample");
PodCopy(static_cast<uint8_t*>(directBuffer), aSample->Data(), aSample->Size());
CryptoInfo::LocalRef cryptoInfo = GetCryptoInfoFromSample(aSample);
if (cryptoInfo) {
res = mDecoder->QueueSecureInputBuffer(inputIndex, 0, cryptoInfo,
aSample->mTime, 0);
} else {
res = mDecoder->QueueInputBuffer(inputIndex, 0, aSample->Size(),
aSample->mTime, 0);
}
if (NS_FAILED(res)) {
return res;
}
mDurations.push_back(TimeUnit::FromMicroseconds(aSample->mDuration));
return NS_OK;
}
nsresult
MediaCodecDataDecoder::QueueEOS()
{
mMonitor.AssertCurrentThreadOwns();
nsresult res = NS_OK;
int32_t inputIndex = -1;
res = mDecoder->DequeueInputBuffer(kDecoderTimeout, &inputIndex);
if (NS_FAILED(res) || inputIndex < 0) {
return res;
}
res = mDecoder->QueueInputBuffer(inputIndex, 0, 0, 0,
MediaCodec::BUFFER_FLAG_END_OF_STREAM);
if (NS_SUCCEEDED(res)) {
SetState(ModuleState::kDrainWaitEOS);
mMonitor.Notify();
}
return res;
}
void
MediaCodecDataDecoder::HandleEOS(int32_t aOutputStatus)
{
MonitorAutoLock lock(mMonitor);
if (mState == ModuleState::kDrainWaitEOS) {
SetState(ModuleState::kDecoding);
mMonitor.Notify();
INVOKE_CALLBACK(DrainComplete);
}
mDecoder->ReleaseOutputBuffer(aOutputStatus, false);
}
Maybe<TimeUnit>
MediaCodecDataDecoder::GetOutputDuration()
{
if (mDurations.empty()) {
return Nothing();
}
const Maybe<TimeUnit> duration = Some(mDurations.front());
mDurations.pop_front();
return duration;
}
nsresult
MediaCodecDataDecoder::ProcessOutput(
BufferInfo::Param aInfo, MediaFormat::Param aFormat, int32_t aStatus)
{
AutoLocalJNIFrame frame(jni::GetEnvForThread(), 1);
const Maybe<TimeUnit> duration = GetOutputDuration();
if (!duration) {
// Some devices report failure in QueueSample while actually succeeding at
// it, in which case we get an output buffer without having a cached duration
// (bug 1273523).
return NS_OK;
}
const auto buffer = jni::Object::LocalRef::Adopt(
frame.GetEnv()->GetObjectArrayElement(mOutputBuffers.Get(), aStatus));
if (buffer) {
// The buffer will be null on Android L if we are decoding to a Surface.
void* directBuffer = frame.GetEnv()->GetDirectBufferAddress(buffer.Get());
Output(aInfo, directBuffer, aFormat, duration.value());
}
// The Surface will be updated at this point (for video).
mDecoder->ReleaseOutputBuffer(aStatus, true);
PostOutput(aInfo, aFormat, duration.value());
return NS_OK;
}
void
MediaCodecDataDecoder::DecoderLoop()
{
bool isOutputDone = false;
AutoLocalJNIFrame frame(jni::GetEnvForThread(), 1);
MediaFormat::LocalRef outputFormat(frame.GetEnv());
nsresult res = NS_OK;
while (WaitForInput()) {
RefPtr<MediaRawData> sample = PeekNextSample();
{
MonitorAutoLock lock(mMonitor);
if (mState == ModuleState::kDrainDecoder) {
MOZ_ASSERT(!sample, "Shouldn't have a sample when pushing EOF frame");
res = QueueEOS();
BREAK_ON_DECODER_ERROR();
}
}
if (sample) {
res = QueueSample(sample);
if (NS_SUCCEEDED(res)) {
// We've fed this into the decoder, so remove it from the queue.
MonitorAutoLock lock(mMonitor);
MOZ_RELEASE_ASSERT(mQueue.size(), "Queue may not be empty");
mQueue.pop_front();
isOutputDone = false;
}
}
if (isOutputDone) {
continue;
}
BufferInfo::LocalRef bufferInfo;
nsresult res = BufferInfo::New(&bufferInfo);
BREAK_ON_DECODER_ERROR();
int32_t outputStatus = -1;
res = mDecoder->DequeueOutputBuffer(bufferInfo, kDecoderTimeout,
&outputStatus);
BREAK_ON_DECODER_ERROR();
if (outputStatus == MediaCodec::INFO_TRY_AGAIN_LATER) {
// We might want to call mCallback->InputExhausted() here, but there seems
// to be some possible bad interactions here with the threading.
} else if (outputStatus == MediaCodec::INFO_OUTPUT_BUFFERS_CHANGED) {
res = ResetOutputBuffers();
BREAK_ON_DECODER_ERROR();
} else if (outputStatus == MediaCodec::INFO_OUTPUT_FORMAT_CHANGED) {
res = mDecoder->GetOutputFormat(ReturnTo(&outputFormat));
BREAK_ON_DECODER_ERROR();
} else if (outputStatus < 0) {
NS_WARNING("Unknown error from decoder!");
INVOKE_CALLBACK(Error,
MediaResult(NS_ERROR_DOM_MEDIA_DECODE_ERR,
__func__));
// Don't break here just in case it's recoverable. If it's not, other
// stuff will fail later and we'll bail out.
} else {
// We have a valid buffer index >= 0 here.
int32_t flags;
nsresult res = bufferInfo->Flags(&flags);
BREAK_ON_DECODER_ERROR();
if (flags & MediaCodec::BUFFER_FLAG_END_OF_STREAM) {
HandleEOS(outputStatus);
isOutputDone = true;
// We only queue empty EOF frames, so we're done for now.
continue;
}
res = ProcessOutput(bufferInfo, outputFormat, outputStatus);
BREAK_ON_DECODER_ERROR();
}
}
Cleanup();
// We're done.
MonitorAutoLock lock(mMonitor);
SetState(ModuleState::kShutdown);
mMonitor.Notify();
}
const char*
MediaCodecDataDecoder::ModuleStateStr(ModuleState aState) {
switch (aState) {
case ModuleState::kDecoding: return "Decoding";
case ModuleState::kFlushing: return "Flushing";
case ModuleState::kDrainQueue: return "DrainQueue";
case ModuleState::kDrainDecoder: return "DrainDecoder";
case ModuleState::kDrainWaitEOS: return "DrainWaitEOS";
case ModuleState::kStopping: return "Stopping";
case ModuleState::kShutdown: return "Shutdown";
default: MOZ_ASSERT_UNREACHABLE("Invalid state.");
}
return "Unknown";
}
bool
MediaCodecDataDecoder::SetState(ModuleState aState)
{
bool ok = true;
if (mState == ModuleState::kShutdown) {
ok = false;
} else if (mState == ModuleState::kStopping) {
ok = aState == ModuleState::kShutdown;
} else if (aState == ModuleState::kDrainDecoder) {
ok = mState == ModuleState::kDrainQueue;
} else if (aState == ModuleState::kDrainWaitEOS) {
ok = mState == ModuleState::kDrainDecoder;
}
if (ok) {
LOG("%s -> %s", ModuleStateStr(mState), ModuleStateStr(aState));
mState = aState;
} else {
LOG("Fail to transit from %s to %s state", ModuleStateStr(mState), ModuleStateStr(aState));
}
return ok;
}
void
MediaCodecDataDecoder::ClearQueue()
{
mMonitor.AssertCurrentThreadOwns();
mQueue.clear();
mDurations.clear();
}
void
MediaCodecDataDecoder::Input(MediaRawData* aSample)
{
MonitorAutoLock lock(mMonitor);
mQueue.push_back(aSample);
lock.NotifyAll();
}
nsresult
MediaCodecDataDecoder::ResetInputBuffers()
{
return mDecoder->GetInputBuffers(ReturnTo(&mInputBuffers));
}
nsresult
MediaCodecDataDecoder::ResetOutputBuffers()
{
return mDecoder->GetOutputBuffers(ReturnTo(&mOutputBuffers));
}
void
MediaCodecDataDecoder::Flush()
{
MonitorAutoLock lock(mMonitor);
if (!SetState(ModuleState::kFlushing)) {
return;
}
lock.Notify();
while (mState == ModuleState::kFlushing) {
lock.Wait();
}
}
void
MediaCodecDataDecoder::Drain()
{
MonitorAutoLock lock(mMonitor);
if (mState == ModuleState::kDrainDecoder ||
mState == ModuleState::kDrainQueue) {
return;
}
SetState(ModuleState::kDrainQueue);
lock.Notify();
}
void
MediaCodecDataDecoder::Shutdown()
{
MonitorAutoLock lock(mMonitor);
SetState(ModuleState::kStopping);
lock.Notify();
while (mThread && mState != ModuleState::kShutdown) {
lock.Wait();
}
if (mThread) {
mThread->Shutdown();
mThread = nullptr;
}
if (mDecoder) {
mDecoder->Stop();
mDecoder->Release();
mDecoder = nullptr;
}
}
} // mozilla

View file

@ -1,126 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef MediaCodecDataDecoder_h_
#define MediaCodecDataDecoder_h_
#include "AndroidDecoderModule.h"
#include "MediaCodec.h"
#include "SurfaceTexture.h"
#include "TimeUnits.h"
#include "mozilla/Monitor.h"
#include "mozilla/Maybe.h"
#include <deque>
namespace mozilla {
typedef std::deque<RefPtr<MediaRawData>> SampleQueue;
class MediaCodecDataDecoder : public MediaDataDecoder {
public:
static MediaDataDecoder* CreateAudioDecoder(const AudioInfo& aConfig,
java::sdk::MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback);
static MediaDataDecoder* CreateVideoDecoder(const VideoInfo& aConfig,
java::sdk::MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback,
layers::ImageContainer* aImageContainer);
virtual ~MediaCodecDataDecoder();
RefPtr<MediaDataDecoder::InitPromise> Init() override;
void Flush() override;
void Drain() override;
void Shutdown() override;
void Input(MediaRawData* aSample) override;
const char* GetDescriptionName() const override
{
return "Android MediaCodec decoder";
}
protected:
enum class ModuleState : uint8_t {
kDecoding = 0,
kFlushing,
kDrainQueue,
kDrainDecoder,
kDrainWaitEOS,
kStopping,
kShutdown
};
friend class AndroidDecoderModule;
MediaCodecDataDecoder(MediaData::Type aType,
const nsACString& aMimeType,
java::sdk::MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback);
static const char* ModuleStateStr(ModuleState aState);
virtual nsresult InitDecoder(java::sdk::Surface::Param aSurface);
virtual nsresult Output(java::sdk::BufferInfo::Param aInfo, void* aBuffer,
java::sdk::MediaFormat::Param aFormat, const media::TimeUnit& aDuration)
{
return NS_OK;
}
virtual nsresult PostOutput(java::sdk::BufferInfo::Param aInfo,
java::sdk::MediaFormat::Param aFormat, const media::TimeUnit& aDuration)
{
return NS_OK;
}
virtual void Cleanup() {};
nsresult ResetInputBuffers();
nsresult ResetOutputBuffers();
nsresult GetInputBuffer(JNIEnv* env, int index, jni::Object::LocalRef* buffer);
bool WaitForInput();
already_AddRefed<MediaRawData> PeekNextSample();
nsresult QueueSample(const MediaRawData* aSample);
nsresult QueueEOS();
void HandleEOS(int32_t aOutputStatus);
Maybe<media::TimeUnit> GetOutputDuration();
nsresult ProcessOutput(java::sdk::BufferInfo::Param aInfo,
java::sdk::MediaFormat::Param aFormat,
int32_t aStatus);
// Sets decoder state and returns whether the new state has become effective.
bool SetState(ModuleState aState);
void DecoderLoop();
virtual void ClearQueue();
MediaData::Type mType;
nsAutoCString mMimeType;
java::sdk::MediaFormat::GlobalRef mFormat;
MediaDataDecoderCallback* mCallback;
java::sdk::MediaCodec::GlobalRef mDecoder;
jni::ObjectArray::GlobalRef mInputBuffers;
jni::ObjectArray::GlobalRef mOutputBuffers;
nsCOMPtr<nsIThread> mThread;
// Only these members are protected by mMonitor.
Monitor mMonitor;
ModuleState mState;
SampleQueue mQueue;
// Durations are stored in microseconds.
std::deque<media::TimeUnit> mDurations;
};
} // namespace mozilla
#endif

View file

@ -1,489 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "AndroidDecoderModule.h"
#include "AndroidBridge.h"
#include "AndroidSurfaceTexture.h"
#include "FennecJNINatives.h"
#include "GLImages.h"
#include "MediaData.h"
#include "MediaInfo.h"
#include "VideoUtils.h"
#include "VPXDecoder.h"
#include "nsThreadUtils.h"
#include "nsPromiseFlatString.h"
#include "nsIGfxInfo.h"
#include "prlog.h"
#include <jni.h>
#include <deque>
#undef LOG
#define LOG(arg, ...) MOZ_LOG(sAndroidDecoderModuleLog, \
mozilla::LogLevel::Debug, ("RemoteDataDecoder(%p)::%s: " arg, \
this, __func__, ##__VA_ARGS__))
using namespace mozilla;
using namespace mozilla::gl;
using namespace mozilla::java;
using namespace mozilla::java::sdk;
using media::TimeUnit;
namespace mozilla {
class JavaCallbacksSupport
: public CodecProxy::NativeCallbacks::Natives<JavaCallbacksSupport>
{
public:
typedef CodecProxy::NativeCallbacks::Natives<JavaCallbacksSupport> Base;
using Base::AttachNative;
JavaCallbacksSupport(MediaDataDecoderCallback* aDecoderCallback)
: mDecoderCallback(aDecoderCallback)
{
MOZ_ASSERT(aDecoderCallback);
}
virtual ~JavaCallbacksSupport() {}
void OnInputExhausted()
{
if (mDecoderCallback) {
mDecoderCallback->InputExhausted();
}
}
virtual void HandleOutput(Sample::Param aSample) = 0;
void OnOutput(jni::Object::Param aSample)
{
if (mDecoderCallback) {
HandleOutput(Sample::Ref::From(aSample));
}
}
virtual void HandleOutputFormatChanged(MediaFormat::Param aFormat) {};
void OnOutputFormatChanged(jni::Object::Param aFormat)
{
if (mDecoderCallback) {
HandleOutputFormatChanged(MediaFormat::Ref::From(aFormat));
}
}
void OnError(bool aIsFatal)
{
if (mDecoderCallback) {
mDecoderCallback->Error(aIsFatal ?
MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__) :
MediaResult(NS_ERROR_DOM_MEDIA_DECODE_ERR, __func__));
}
}
void DisposeNative()
{
// TODO
}
void Cancel()
{
mDecoderCallback = nullptr;
}
protected:
MediaDataDecoderCallback* mDecoderCallback;
};
struct SampleTime final
{
SampleTime(int64_t aStart, int64_t aDuration)
: mStart(aStart)
, mDuration(aDuration)
{}
int64_t mStart;
int64_t mDuration;
};
class RemoteVideoDecoder final : public RemoteDataDecoder
{
public:
class CallbacksSupport final : public JavaCallbacksSupport
{
public:
CallbacksSupport(RemoteVideoDecoder* aDecoder, MediaDataDecoderCallback* aCallback)
: JavaCallbacksSupport(aCallback)
, mDecoder(aDecoder)
{}
virtual ~CallbacksSupport() {}
void HandleOutput(Sample::Param aSample) override
{
Maybe<int64_t> durationUs = mDecoder->mInputDurations.Get();
if (!durationUs) {
return;
}
BufferInfo::LocalRef info = aSample->Info();
int32_t flags;
bool ok = NS_SUCCEEDED(info->Flags(&flags));
MOZ_ASSERT(ok);
int32_t offset;
ok |= NS_SUCCEEDED(info->Offset(&offset));
MOZ_ASSERT(ok);
int64_t presentationTimeUs;
ok |= NS_SUCCEEDED(info->PresentationTimeUs(&presentationTimeUs));
MOZ_ASSERT(ok);
int32_t size;
ok |= NS_SUCCEEDED(info->Size(&size));
MOZ_ASSERT(ok);
NS_ENSURE_TRUE_VOID(ok);
if (size > 0) {
RefPtr<layers::Image> img =
new SurfaceTextureImage(mDecoder->mSurfaceTexture.get(), mDecoder->mConfig.mDisplay,
gl::OriginPos::BottomLeft);
RefPtr<VideoData> v =
VideoData::CreateFromImage(mDecoder->mConfig,
offset,
presentationTimeUs,
durationUs.value(),
img,
!!(flags & MediaCodec::BUFFER_FLAG_SYNC_FRAME),
presentationTimeUs,
gfx::IntRect(0, 0,
mDecoder->mConfig.mDisplay.width,
mDecoder->mConfig.mDisplay.height));
mDecoderCallback->Output(v);
}
if ((flags & MediaCodec::BUFFER_FLAG_END_OF_STREAM) != 0) {
mDecoderCallback->DrainComplete();
}
}
friend class RemoteDataDecoder;
private:
RemoteVideoDecoder* mDecoder;
};
RemoteVideoDecoder(const VideoInfo& aConfig,
MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback,
layers::ImageContainer* aImageContainer)
: RemoteDataDecoder(MediaData::Type::VIDEO_DATA, aConfig.mMimeType,
aFormat, aCallback)
, mImageContainer(aImageContainer)
, mConfig(aConfig)
{
}
RefPtr<InitPromise> Init() override
{
mSurfaceTexture = AndroidSurfaceTexture::Create();
if (!mSurfaceTexture) {
NS_WARNING("Failed to create SurfaceTexture for video decode\n");
return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__);
}
if (!jni::IsFennec()) {
NS_WARNING("Remote decoding not supported in non-Fennec environment\n");
return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__);
}
// Register native methods.
JavaCallbacksSupport::Init();
mJavaCallbacks = CodecProxy::NativeCallbacks::New();
JavaCallbacksSupport::AttachNative(mJavaCallbacks,
mozilla::MakeUnique<CallbacksSupport>(this, mCallback));
mJavaDecoder = CodecProxy::Create(mFormat, mSurfaceTexture->JavaSurface(), mJavaCallbacks);
if (mJavaDecoder == nullptr) {
return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__);
}
mInputDurations.Clear();
return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack, __func__);
}
void Flush() override
{
mInputDurations.Clear();
RemoteDataDecoder::Flush();
}
void Drain() override
{
RemoteDataDecoder::Drain();
mInputDurations.Put(0);
}
void Input(MediaRawData* aSample) override
{
RemoteDataDecoder::Input(aSample);
mInputDurations.Put(aSample->mDuration);
}
private:
class DurationQueue {
public:
void Clear()
{
mValues.clear();
}
void Put(int64_t aDurationUs)
{
mValues.emplace_back(aDurationUs);
}
Maybe<int64_t> Get()
{
if (mValues.empty()) {
return Nothing();
}
auto value = Some(mValues.front());
mValues.pop_front();
return value;
}
private:
std::deque<int64_t> mValues;
};
layers::ImageContainer* mImageContainer;
const VideoInfo& mConfig;
RefPtr<AndroidSurfaceTexture> mSurfaceTexture;
DurationQueue mInputDurations;
};
class RemoteAudioDecoder final : public RemoteDataDecoder
{
public:
RemoteAudioDecoder(const AudioInfo& aConfig,
MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback)
: RemoteDataDecoder(MediaData::Type::AUDIO_DATA, aConfig.mMimeType,
aFormat, aCallback)
, mConfig(aConfig)
{
JNIEnv* const env = jni::GetEnvForThread();
bool formatHasCSD = false;
NS_ENSURE_SUCCESS_VOID(aFormat->ContainsKey(NS_LITERAL_STRING("csd-0"), &formatHasCSD));
if (!formatHasCSD && aConfig.mCodecSpecificConfig->Length() >= 2) {
jni::ByteBuffer::LocalRef buffer(env);
buffer = jni::ByteBuffer::New(
aConfig.mCodecSpecificConfig->Elements(),
aConfig.mCodecSpecificConfig->Length());
NS_ENSURE_SUCCESS_VOID(aFormat->SetByteBuffer(NS_LITERAL_STRING("csd-0"),
buffer));
}
}
RefPtr<InitPromise> Init() override
{
// Register native methods.
JavaCallbacksSupport::Init();
mJavaCallbacks = CodecProxy::NativeCallbacks::New();
JavaCallbacksSupport::AttachNative(mJavaCallbacks,
mozilla::MakeUnique<CallbacksSupport>(this, mCallback));
mJavaDecoder = CodecProxy::Create(mFormat, nullptr, mJavaCallbacks);
if (mJavaDecoder == nullptr) {
return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__);
}
return InitPromise::CreateAndResolve(TrackInfo::kAudioTrack, __func__);
}
private:
class CallbacksSupport final : public JavaCallbacksSupport
{
public:
CallbacksSupport(RemoteAudioDecoder* aDecoder, MediaDataDecoderCallback* aCallback)
: JavaCallbacksSupport(aCallback)
, mDecoder(aDecoder)
{}
virtual ~CallbacksSupport() {}
void HandleOutput(Sample::Param aSample) override
{
BufferInfo::LocalRef info = aSample->Info();
int32_t flags;
bool ok = NS_SUCCEEDED(info->Flags(&flags));
MOZ_ASSERT(ok);
int32_t offset;
ok |= NS_SUCCEEDED(info->Offset(&offset));
MOZ_ASSERT(ok);
int64_t presentationTimeUs;
ok |= NS_SUCCEEDED(info->PresentationTimeUs(&presentationTimeUs));
MOZ_ASSERT(ok);
int32_t size;
ok |= NS_SUCCEEDED(info->Size(&size));
MOZ_ASSERT(ok);
NS_ENSURE_TRUE_VOID(ok);
if (size > 0) {
#ifdef MOZ_SAMPLE_TYPE_S16
const int32_t numSamples = size / 2;
#else
#error We only support 16-bit integer PCM
#endif
const int32_t numFrames = numSamples / mOutputChannels;
AlignedAudioBuffer audio(numSamples);
if (!audio) {
return;
}
jni::ByteBuffer::LocalRef dest = jni::ByteBuffer::New(audio.get(), size);
aSample->WriteToByteBuffer(dest);
RefPtr<AudioData> data = new AudioData(0, presentationTimeUs,
FramesToUsecs(numFrames, mOutputSampleRate).value(),
numFrames,
Move(audio),
mOutputChannels,
mOutputSampleRate);
mDecoderCallback->Output(data);
}
if ((flags & MediaCodec::BUFFER_FLAG_END_OF_STREAM) != 0) {
mDecoderCallback->DrainComplete();
return;
}
}
void HandleOutputFormatChanged(MediaFormat::Param aFormat) override
{
aFormat->GetInteger(NS_LITERAL_STRING("channel-count"), &mOutputChannels);
AudioConfig::ChannelLayout layout(mOutputChannels);
if (!layout.IsValid()) {
mDecoderCallback->Error(MediaResult(
NS_ERROR_DOM_MEDIA_FATAL_ERR,
RESULT_DETAIL("Invalid channel layout:%d", mOutputChannels)));
return;
}
aFormat->GetInteger(NS_LITERAL_STRING("sample-rate"), &mOutputSampleRate);
LOG("Audio output format changed: channels:%d sample rate:%d", mOutputChannels, mOutputSampleRate);
}
private:
RemoteAudioDecoder* mDecoder;
int32_t mOutputChannels;
int32_t mOutputSampleRate;
};
const AudioInfo& mConfig;
};
MediaDataDecoder*
RemoteDataDecoder::CreateAudioDecoder(const AudioInfo& aConfig,
MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback)
{
return new RemoteAudioDecoder(aConfig, aFormat, aCallback);
}
MediaDataDecoder*
RemoteDataDecoder::CreateVideoDecoder(const VideoInfo& aConfig,
MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback,
layers::ImageContainer* aImageContainer)
{
return new RemoteVideoDecoder(aConfig, aFormat, aCallback, aImageContainer);
}
RemoteDataDecoder::RemoteDataDecoder(MediaData::Type aType,
const nsACString& aMimeType,
MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback)
: mType(aType)
, mMimeType(aMimeType)
, mFormat(aFormat)
, mCallback(aCallback)
{
}
void
RemoteDataDecoder::Flush()
{
mJavaDecoder->Flush();
}
void
RemoteDataDecoder::Drain()
{
BufferInfo::LocalRef bufferInfo;
nsresult rv = BufferInfo::New(&bufferInfo);
NS_ENSURE_SUCCESS_VOID(rv);
bufferInfo->Set(0, 0, -1, MediaCodec::BUFFER_FLAG_END_OF_STREAM);
mJavaDecoder->Input(nullptr, bufferInfo, nullptr);
}
void
RemoteDataDecoder::Shutdown()
{
LOG("");
MOZ_ASSERT(mJavaDecoder && mJavaCallbacks);
mJavaDecoder->Release();
mJavaDecoder = nullptr;
JavaCallbacksSupport::GetNative(mJavaCallbacks)->Cancel();
mJavaCallbacks = nullptr;
mFormat = nullptr;
}
void
RemoteDataDecoder::Input(MediaRawData* aSample)
{
MOZ_ASSERT(aSample != nullptr);
jni::ByteBuffer::LocalRef bytes = jni::ByteBuffer::New(const_cast<uint8_t*>(aSample->Data()),
aSample->Size());
BufferInfo::LocalRef bufferInfo;
nsresult rv = BufferInfo::New(&bufferInfo);
if (NS_FAILED(rv)) {
mCallback->Error(MediaResult(NS_ERROR_OUT_OF_MEMORY, __func__));
return;
}
bufferInfo->Set(0, aSample->Size(), aSample->mTime, 0);
mJavaDecoder->Input(bytes, bufferInfo, GetCryptoInfoFromSample(aSample));
}
} // mozilla

View file

@ -1,62 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef RemoteDataDecoder_h_
#define RemoteDataDecoder_h_
#include "AndroidDecoderModule.h"
#include "FennecJNIWrappers.h"
#include "SurfaceTexture.h"
#include "TimeUnits.h"
#include "mozilla/Monitor.h"
#include "mozilla/Maybe.h"
#include <deque>
namespace mozilla {
class RemoteDataDecoder : public MediaDataDecoder {
public:
static MediaDataDecoder* CreateAudioDecoder(const AudioInfo& aConfig,
java::sdk::MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback);
static MediaDataDecoder* CreateVideoDecoder(const VideoInfo& aConfig,
java::sdk::MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback,
layers::ImageContainer* aImageContainer);
virtual ~RemoteDataDecoder() {}
void Flush() override;
void Drain() override;
void Shutdown() override;
void Input(MediaRawData* aSample) override;
const char* GetDescriptionName() const override
{
return "android remote decoder";
}
protected:
RemoteDataDecoder(MediaData::Type aType,
const nsACString& aMimeType,
java::sdk::MediaFormat::Param aFormat,
MediaDataDecoderCallback* aCallback);
MediaData::Type mType;
nsAutoCString mMimeType;
java::sdk::MediaFormat::GlobalRef mFormat;
MediaDataDecoderCallback* mCallback;
java::CodecProxy::GlobalRef mJavaDecoder;
java::CodecProxy::NativeCallbacks::GlobalRef mJavaCallbacks;
};
} // namespace mozilla
#endif

View file

@ -78,16 +78,6 @@ if CONFIG['MOZ_APPLEMEDIA']:
include('/ipc/chromium/chromium-config.mozbuild')
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
EXPORTS += [
'android/AndroidDecoderModule.h',
]
SOURCES += [
'android/AndroidDecoderModule.cpp',
'android/MediaCodecDataDecoder.cpp',
'android/RemoteDataDecoder.cpp',
]
FINAL_LIBRARY = 'xul'
if CONFIG['GNU_CXX']:

View file

@ -16,9 +16,6 @@
#endif
#include "mozilla/Tuple.h"
#if defined(MOZ_WIDGET_ANDROID)
#include "nsDebug.h"
#endif
#include "Point.h"
#include "BaseRect.h"
#include "Matrix.h"
@ -141,9 +138,6 @@ struct BasicLogger
// in the appropriate places in that method.
static bool ShouldOutputMessage(int aLevel) {
if (LoggingPrefs::sGfxLogLevel >= aLevel) {
#if defined(MOZ_WIDGET_ANDROID)
return true;
#else
#if defined(MOZ_LOGGING)
if (MOZ_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) {
return true;
@ -153,7 +147,6 @@ struct BasicLogger
(aLevel < LOG_DEBUG)) {
return true;
}
#endif
}
return false;
}
@ -174,9 +167,6 @@ struct BasicLogger
// make the corresponding change in the ShouldOutputMessage method
// above.
if (LoggingPrefs::sGfxLogLevel >= aLevel) {
#if defined(MOZ_WIDGET_ANDROID)
printf_stderr("%s%s", aString.c_str(), aNoNewline ? "" : "\n");
#else
#if defined(MOZ_LOGGING)
if (MOZ_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) {
PR_LogPrint("%s%s", aString.c_str(), aNoNewline ? "" : "\n");
@ -186,7 +176,6 @@ struct BasicLogger
(aLevel < LOG_DEBUG)) {
printf("%s%s", aString.c_str(), aNoNewline ? "" : "\n");
}
#endif
}
}
};

View file

@ -303,7 +303,7 @@ SkBitmap ImageOperations::ResizeSubpixel(const SkBitmap& source,
return result;
#else
return SkBitmap();
#endif // OS_POSIX && !OS_MACOSX && !defined(OS_ANDROID)
#endif // OS_POSIX && !OS_MACOSX
}
// static

View file

@ -201,12 +201,12 @@ FINAL_LIBRARY = 'xul'
for var in ('USE_CAIRO', 'MOZ2D_HAS_MOZ_CAIRO'):
DEFINES[var] = True
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3'):
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
DEFINES['MOZ_ENABLE_FREETYPE'] = True
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3'):
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'):
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']

View file

@ -242,11 +242,6 @@ if CONFIG['CLANG_CL']:
'-Wno-unused-variable',
]
# See bug 386897.
if CONFIG['GNU_CC'] and CONFIG['OS_TARGET'] == 'Android' and CONFIG['MOZ_OPTIMIZE']:
CFLAGS += ['-O2']
CXXFLAGS += ['-O2']
if CONFIG['MOZ_X11']:
CFLAGS += CONFIG['XCFLAGS']

View file

@ -156,7 +156,3 @@ if CONFIG['CLANG_CL']:
CFLAGS += [
'-Wno-unused-variable',
]
# See bug 386897.
if CONFIG['OS_TARGET'] == 'Android' and CONFIG['MOZ_OPTIMIZE']:
CFLAGS += ['-O2']

View file

@ -1,260 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
// vim:set ts=2 sts=2 sw=2 et cin:
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifdef MOZ_WIDGET_ANDROID
#include <map>
#include <android/native_window_jni.h>
#include <android/log.h>
#include "AndroidSurfaceTexture.h"
#include "gfxImageSurface.h"
#include "gfxPrefs.h"
#include "AndroidBridge.h"
#include "nsThreadUtils.h"
#include "mozilla/gfx/Matrix.h"
#include "GeneratedJNINatives.h"
#include "GLContext.h"
using namespace mozilla;
namespace mozilla {
namespace gl {
class AndroidSurfaceTexture::Listener
: public java::SurfaceTextureListener::Natives<Listener>
{
using Base = java::SurfaceTextureListener::Natives<Listener>;
const nsCOMPtr<nsIRunnable> mCallback;
public:
using Base::AttachNative;
using Base::DisposeNative;
Listener(nsIRunnable* aCallback) : mCallback(aCallback) {}
void OnFrameAvailable()
{
if (NS_IsMainThread()) {
mCallback->Run();
return;
}
NS_DispatchToMainThread(mCallback);
}
};
already_AddRefed<AndroidSurfaceTexture>
AndroidSurfaceTexture::Create()
{
return Create(nullptr, 0);
}
already_AddRefed<AndroidSurfaceTexture>
AndroidSurfaceTexture::Create(GLContext* aContext, GLuint aTexture)
{
RefPtr<AndroidSurfaceTexture> st = new AndroidSurfaceTexture();
if (!st->Init(aContext, aTexture)) {
printf_stderr("Failed to initialize AndroidSurfaceTexture");
st = nullptr;
}
return st.forget();
}
nsresult
AndroidSurfaceTexture::Attach(GLContext* aContext, PRIntervalTime aTimeout)
{
MonitorAutoLock lock(mMonitor);
if (mAttachedContext == aContext) {
NS_WARNING("Tried to attach same GLContext to AndroidSurfaceTexture");
return NS_OK;
}
if (!CanDetach()) {
return NS_ERROR_NOT_AVAILABLE;
}
while (mAttachedContext) {
// Wait until it's detached (or we time out)
if (NS_FAILED(lock.Wait(aTimeout))) {
return NS_ERROR_NOT_AVAILABLE;
}
}
MOZ_ASSERT(aContext->IsOwningThreadCurrent(), "Trying to attach GLContext from different thread");
aContext->fGenTextures(1, &mTexture);
if (NS_FAILED(mSurfaceTexture->AttachToGLContext(mTexture))) {
return NS_ERROR_NOT_AVAILABLE;
}
mAttachedContext = aContext;
mAttachedContext->MakeCurrent();
return NS_OK;
}
nsresult
AndroidSurfaceTexture::Detach()
{
MonitorAutoLock lock(mMonitor);
if (!CanDetach() ||
!mAttachedContext ||
!mAttachedContext->IsOwningThreadCurrent())
{
return NS_ERROR_FAILURE;
}
mAttachedContext->MakeCurrent();
mSurfaceTexture->DetachFromGLContext();
mTexture = 0;
mAttachedContext = nullptr;
lock.NotifyAll();
return NS_OK;
}
bool
AndroidSurfaceTexture::CanDetach() const
{
// The API for attach/detach only exists on 16+, and PowerVR has some sort of
// fencing issue. Additionally, attach/detach seems to be busted on at least
// some Mali adapters (400MP2 for sure, bug 1131793)
return AndroidBridge::Bridge()->GetAPIVersion() >= 16 &&
(!mAttachedContext || mAttachedContext->Vendor() != GLVendor::Imagination) &&
(!mAttachedContext || mAttachedContext->Vendor() != GLVendor::ARM /* Mali */) &&
gfxPrefs::SurfaceTextureDetachEnabled();
}
bool
AndroidSurfaceTexture::Init(GLContext* aContext, GLuint aTexture)
{
if (!aTexture && !CanDetach()) {
// We have no texture and cannot initialize detached, bail out
return false;
}
if (NS_WARN_IF(NS_FAILED(
java::sdk::SurfaceTexture::New(aTexture, ReturnTo(&mSurfaceTexture))))) {
return false;
}
if (!aTexture) {
mSurfaceTexture->DetachFromGLContext();
}
mAttachedContext = aContext;
if (NS_WARN_IF(NS_FAILED(
java::sdk::Surface::New(mSurfaceTexture, ReturnTo(&mSurface))))) {
return false;
}
mNativeWindow = ANativeWindow_fromSurface(jni::GetEnvForThread(),
mSurface.Get());
MOZ_ASSERT(mNativeWindow, "Failed to create native window from surface");
return true;
}
AndroidSurfaceTexture::AndroidSurfaceTexture()
: mTexture(0)
, mSurfaceTexture()
, mSurface()
, mAttachedContext(nullptr)
, mMonitor("AndroidSurfaceTexture")
{
}
AndroidSurfaceTexture::~AndroidSurfaceTexture()
{
if (mSurfaceTexture) {
SetFrameAvailableCallback(nullptr);
mSurfaceTexture = nullptr;
}
if (mNativeWindow) {
ANativeWindow_release(mNativeWindow);
mNativeWindow = nullptr;
}
}
void
AndroidSurfaceTexture::UpdateTexImage()
{
mSurfaceTexture->UpdateTexImage();
}
void
AndroidSurfaceTexture::GetTransformMatrix(gfx::Matrix4x4& aMatrix) const
{
JNIEnv* const env = jni::GetEnvForThread();
auto jarray = jni::FloatArray::LocalRef::Adopt(env, env->NewFloatArray(16));
mSurfaceTexture->GetTransformMatrix(jarray);
jfloat* array = env->GetFloatArrayElements(jarray.Get(), nullptr);
aMatrix._11 = array[0];
aMatrix._12 = array[1];
aMatrix._13 = array[2];
aMatrix._14 = array[3];
aMatrix._21 = array[4];
aMatrix._22 = array[5];
aMatrix._23 = array[6];
aMatrix._24 = array[7];
aMatrix._31 = array[8];
aMatrix._32 = array[9];
aMatrix._33 = array[10];
aMatrix._34 = array[11];
aMatrix._41 = array[12];
aMatrix._42 = array[13];
aMatrix._43 = array[14];
aMatrix._44 = array[15];
env->ReleaseFloatArrayElements(jarray.Get(), array, 0);
}
void
AndroidSurfaceTexture::SetFrameAvailableCallback(nsIRunnable* aRunnable)
{
java::SurfaceTextureListener::LocalRef newListener;
if (aRunnable) {
newListener = java::SurfaceTextureListener::New();
Listener::AttachNative(newListener, MakeUnique<Listener>(aRunnable));
}
if (aRunnable || mListener) {
MOZ_ALWAYS_TRUE(NS_SUCCEEDED(
mSurfaceTexture->SetOnFrameAvailableListener(newListener)));
}
if (mListener) {
Listener::DisposeNative(java::SurfaceTextureListener::LocalRef(
newListener.Env(), mListener));
}
mListener = newListener;
}
void
AndroidSurfaceTexture::SetDefaultSize(mozilla::gfx::IntSize size)
{
mSurfaceTexture->SetDefaultBufferSize(size.width, size.height);
}
} // gl
} // mozilla
#endif // MOZ_WIDGET_ANDROID

View file

@ -1,107 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
// vim:set ts=2 sts=2 sw=2 et cin:
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef AndroidSurfaceTexture_h__
#define AndroidSurfaceTexture_h__
#ifdef MOZ_WIDGET_ANDROID
#include <jni.h>
#include <android/native_window.h>
#include "nsIRunnable.h"
#include "gfxPlatform.h"
#include "GLDefs.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/gfx/MatrixFwd.h"
#include "mozilla/Monitor.h"
#include "GeneratedJNIWrappers.h"
#include "SurfaceTexture.h"
namespace mozilla {
namespace gl {
class GLContext;
/**
* This class is a wrapper around Android's SurfaceTexture class.
* Usage is pretty much exactly like the Java class, so see
* the Android documentation for details.
*/
class AndroidSurfaceTexture {
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AndroidSurfaceTexture)
public:
// The SurfaceTexture is created in an attached state. This method requires
// Android Ice Cream Sandwich.
static already_AddRefed<AndroidSurfaceTexture> Create(GLContext* aGLContext, GLuint aTexture);
// Here the SurfaceTexture will be created in a detached state. You must call
// Attach() with the GLContext you wish to composite with. It must be done
// on the thread where that GLContext is current. This method requires
// Android Jelly Bean.
static already_AddRefed<AndroidSurfaceTexture> Create();
// If we are on Jelly Bean, the SurfaceTexture can be detached and reattached
// to allow consumption from different GLContexts. It is recommended to only
// attach while you are consuming in order to allow this.
//
// Only one GLContext may be attached at any given time. If another is already
// attached, we try to wait for it to become detached.
nsresult Attach(GLContext* aContext, PRIntervalTime aTiemout = PR_INTERVAL_NO_TIMEOUT);
nsresult Detach();
// Ability to detach is based on API version (16+), and we also block PowerVR
// since it has some type of fencing problem. Bug 1100126.
bool CanDetach() const;
GLContext* AttachedContext() const { return mAttachedContext; }
ANativeWindow* NativeWindow() const {
return mNativeWindow;
}
// This attaches the updated data to the TEXTURE_EXTERNAL target
void UpdateTexImage();
void GetTransformMatrix(mozilla::gfx::Matrix4x4& aMatrix) const;
void SetDefaultSize(mozilla::gfx::IntSize size);
// The callback is guaranteed to be called on the main thread even
// if the upstream callback is received on a different thread
void SetFrameAvailableCallback(nsIRunnable* aRunnable);
GLuint Texture() const { return mTexture; }
const java::sdk::Surface::Ref& JavaSurface() const { return mSurface; }
private:
class Listener;
AndroidSurfaceTexture();
~AndroidSurfaceTexture();
bool Init(GLContext* aContext, GLuint aTexture);
GLuint mTexture;
java::sdk::SurfaceTexture::GlobalRef mSurfaceTexture;
java::sdk::Surface::GlobalRef mSurface;
java::SurfaceTextureListener::GlobalRef mListener;
GLContext* mAttachedContext;
ANativeWindow* mNativeWindow;
Monitor mMonitor;
};
}
}
#endif
#endif

View file

@ -14,12 +14,6 @@
#include "mozilla/gfx/Matrix.h"
#include "mozilla/UniquePtr.h"
#ifdef MOZ_WIDGET_ANDROID
#include "AndroidSurfaceTexture.h"
#include "GLImages.h"
#include "GLLibraryEGL.h"
#endif
#ifdef XP_MACOSX
#include "MacIOSurfaceImage.h"
#include "GLContextCGL.h"
@ -146,26 +140,6 @@ GLBlitHelper::InitTexQuadProgram(BlitType target)
vTexCoord * uTexCoordMult); \n\
} \n\
";
#ifdef ANDROID /* MOZ_WIDGET_ANDROID */
const char kTexExternalBlit_FragShaderSource[] = "\
#version 100 \n\
#extension GL_OES_EGL_image_external : require \n\
#ifdef GL_FRAGMENT_PRECISION_HIGH \n\
precision highp float; \n\
#else \n\
precision mediump float; \n\
#endif \n\
varying vec2 vTexCoord; \n\
uniform mat4 uTextureTransform; \n\
uniform samplerExternalOES uTexUnit; \n\
\n\
void main() \n\
{ \n\
gl_FragColor = texture2D(uTexUnit, \n\
(uTextureTransform * vec4(vTexCoord, 0.0, 1.0)).xy); \n\
} \n\
";
#endif
/* From Rec601:
[R] [1.1643835616438356, 0.0, 1.5960267857142858] [ Y - 16]
[G] = [1.1643835616438358, -0.3917622900949137, -0.8129676472377708] x [Cb - 128]
@ -257,14 +231,6 @@ GLBlitHelper::InitTexQuadProgram(BlitType target)
fragShaderPtr = &mTex2DRectBlit_FragShader;
fragShaderSource = kTex2DRectBlit_FragShaderSource;
break;
#ifdef ANDROID
case ConvertSurfaceTexture:
case ConvertGralloc:
programPtr = &mTexExternalBlit_Program;
fragShaderPtr = &mTexExternalBlit_FragShader;
fragShaderSource = kTexExternalBlit_FragShaderSource;
break;
#endif
case ConvertPlanarYCbCr:
programPtr = &mTexYUVPlanarBlit_Program;
fragShaderPtr = &mTexYUVPlanarBlit_FragShader;
@ -398,10 +364,6 @@ GLBlitHelper::InitTexQuadProgram(BlitType target)
// Cache and set attribute and uniform
mGL->fUseProgram(program);
switch (target) {
#ifdef ANDROID
case ConvertSurfaceTexture:
case ConvertGralloc:
#endif
case BlitTex2D:
case BlitTexRect:
case ConvertEGLImage: {
@ -678,67 +640,6 @@ GLBlitHelper::BindAndUploadEGLImage(EGLImage image, GLuint target)
mGL->fEGLImageTargetTexture2D(target, image);
}
#ifdef MOZ_WIDGET_ANDROID
#define ATTACH_WAIT_MS 50
bool
GLBlitHelper::BlitSurfaceTextureImage(layers::SurfaceTextureImage* stImage)
{
AndroidSurfaceTexture* surfaceTexture = stImage->GetSurfaceTexture();
ScopedBindTextureUnit boundTU(mGL, LOCAL_GL_TEXTURE0);
if (NS_FAILED(surfaceTexture->Attach(mGL, PR_MillisecondsToInterval(ATTACH_WAIT_MS))))
return false;
// UpdateTexImage() changes the EXTERNAL binding, so save it here
// so we can restore it after.
int oldBinding = 0;
mGL->fGetIntegerv(LOCAL_GL_TEXTURE_BINDING_EXTERNAL, &oldBinding);
surfaceTexture->UpdateTexImage();
gfx::Matrix4x4 transform;
surfaceTexture->GetTransformMatrix(transform);
mGL->fUniformMatrix4fv(mTextureTransformLoc, 1, false, &transform._11);
mGL->fDrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4);
surfaceTexture->Detach();
mGL->fBindTexture(LOCAL_GL_TEXTURE_EXTERNAL, oldBinding);
return true;
}
bool
GLBlitHelper::BlitEGLImageImage(layers::EGLImageImage* image)
{
EGLImage eglImage = image->GetImage();
EGLSync eglSync = image->GetSync();
if (eglSync) {
EGLint status = sEGLLibrary.fClientWaitSync(EGL_DISPLAY(), eglSync, 0, LOCAL_EGL_FOREVER);
if (status != LOCAL_EGL_CONDITION_SATISFIED) {
return false;
}
}
ScopedBindTextureUnit boundTU(mGL, LOCAL_GL_TEXTURE0);
int oldBinding = 0;
mGL->fGetIntegerv(LOCAL_GL_TEXTURE_BINDING_2D, &oldBinding);
BindAndUploadEGLImage(eglImage, LOCAL_GL_TEXTURE_2D);
mGL->fDrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4);
mGL->fBindTexture(LOCAL_GL_TEXTURE_2D, oldBinding);
return true;
}
#endif
bool
GLBlitHelper::BlitPlanarYCbCrImage(layers::PlanarYCbCrImage* yuvImage)
{
@ -835,16 +736,6 @@ GLBlitHelper::BlitImageToFramebuffer(layers::Image* srcImage,
srcOrigin = OriginPos::BottomLeft;
break;
#ifdef MOZ_WIDGET_ANDROID
case ImageFormat::SURFACE_TEXTURE:
type = ConvertSurfaceTexture;
srcOrigin = srcImage->AsSurfaceTextureImage()->GetOriginPos();
break;
case ImageFormat::EGLIMAGE:
type = ConvertEGLImage;
srcOrigin = srcImage->AsEGLImageImage()->GetOriginPos();
break;
#endif
#ifdef XP_MACOSX
case ImageFormat::MAC_IOSURFACE:
type = ConvertMacIOSurfaceImage;
@ -877,14 +768,6 @@ GLBlitHelper::BlitImageToFramebuffer(layers::Image* srcImage,
return ret;
}
#ifdef MOZ_WIDGET_ANDROID
case ConvertSurfaceTexture:
return BlitSurfaceTextureImage(static_cast<layers::SurfaceTextureImage*>(srcImage));
case ConvertEGLImage:
return BlitEGLImageImage(static_cast<layers::EGLImageImage*>(srcImage));
#endif
#ifdef XP_MACOSX
case ConvertMacIOSurfaceImage:
return BlitMacIOSurfaceImage(srcImage->AsMacIOSurfaceImage());
@ -983,8 +866,7 @@ GLBlitHelper::BlitFramebufferToTexture(GLuint srcFB, GLuint destTex,
GLenum destTarget,
bool internalFBs)
{
// On the Android 4.3 emulator, IsFramebuffer may return false incorrectly.
MOZ_ASSERT_IF(mGL->Renderer() != GLRenderer::AndroidEmulator, !srcFB || mGL->fIsFramebuffer(srcFB));
MOZ_ASSERT(!srcFB || mGL->fIsFramebuffer(srcFB));
MOZ_ASSERT(mGL->fIsTexture(destTex));
if (mGL->IsSupported(GLFeature::framebuffer_blit)) {

View file

@ -107,11 +107,6 @@ class GLBlitHelper final
void BindAndUploadEGLImage(EGLImage image, GLuint target);
bool BlitPlanarYCbCrImage(layers::PlanarYCbCrImage* yuvImage);
#ifdef MOZ_WIDGET_ANDROID
// Blit onto the current FB.
bool BlitSurfaceTextureImage(layers::SurfaceTextureImage* stImage);
bool BlitEGLImageImage(layers::EGLImageImage* eglImage);
#endif
#ifdef XP_MACOSX
bool BlitMacIOSurfaceImage(layers::MacIOSurfaceImage* ioImage);
#endif

View file

@ -10,9 +10,6 @@
#include <string.h>
#include <ctype.h>
#include <vector>
#ifdef MOZ_WIDGET_ANDROID
#include <sys/mman.h>
#endif
#include "GLBlitHelper.h"
#include "GLReadTexImageHelper.h"
@ -47,10 +44,6 @@
#include "nsCocoaFeatures.h"
#endif
#ifdef MOZ_WIDGET_ANDROID
#include "AndroidBridge.h"
#endif
namespace mozilla {
namespace gl {
@ -234,7 +227,7 @@ ParseGLSLVersion(GLContext* gl, uint32_t* out_version)
}
if (!versionString) {
// This happens on the Android emulators. We'll just return 100
MOZ_ASSERT(false, "LOCAL_GL_SHADING_LANGUAGE_VERSION undefined, returning 100");
*out_version = 100;
return true;
}
@ -1056,28 +1049,6 @@ GLContext::InitWithPrefixImpl(const char* prefix, bool trygl)
// prevents occasional driver crash.
mNeedsFlushBeforeDeleteFB = true;
}
#ifdef MOZ_WIDGET_ANDROID
if (mWorkAroundDriverBugs &&
(Renderer() == GLRenderer::AdrenoTM305 ||
Renderer() == GLRenderer::AdrenoTM320 ||
Renderer() == GLRenderer::AdrenoTM330) &&
AndroidBridge::Bridge()->GetAPIVersion() < 21) {
// Bug 1164027. Driver crashes when functions such as
// glTexImage2D fail due to virtual memory exhaustion.
mTextureAllocCrashesOnMapFailure = true;
}
#endif
#if MOZ_WIDGET_ANDROID
if (mWorkAroundDriverBugs &&
Renderer() == GLRenderer::SGX540 &&
AndroidBridge::Bridge()->GetAPIVersion() <= 15) {
// Bug 1288446. Driver sometimes crashes when uploading data to a
// texture if the render target has changed since the texture was
// rendered from. Calling glCheckFramebufferStatus after
// glFramebufferTexture2D prevents the crash.
mNeedsCheckAfterAttachTextureToFb = true;
}
#endif
mMaxTextureImageSize = mMaxTextureSize;
@ -1810,17 +1781,6 @@ GLContext::InitExtensions()
MarkExtensionUnsupported(OES_EGL_sync);
}
#ifdef MOZ_WIDGET_ANDROID
if (Vendor() == GLVendor::Imagination &&
Renderer() == GLRenderer::SGX544MP &&
AndroidBridge::Bridge()->GetAPIVersion() < 21)
{
// Bug 1026404
MarkExtensionUnsupported(OES_EGL_image);
MarkExtensionUnsupported(OES_EGL_image_external);
}
#endif
if (Vendor() == GLVendor::ARM &&
(Renderer() == GLRenderer::Mali400MP ||
Renderer() == GLRenderer::Mali450MP))
@ -1829,16 +1789,6 @@ GLContext::InitExtensions()
MarkExtensionUnsupported(OES_EGL_image_external);
}
if (Renderer() == GLRenderer::AndroidEmulator) {
// the Android emulator, which we use to run B2G reftests on,
// doesn't expose the OES_rgb8_rgba8 extension, but it seems to
// support it (tautologically, as it only runs on desktop GL).
MarkExtensionSupported(OES_rgb8_rgba8);
// there seems to be a similar issue for EXT_texture_format_BGRA8888
// on the Android 4.3 emulator
MarkExtensionSupported(EXT_texture_format_BGRA8888);
}
if (Vendor() == GLVendor::VMware &&
Renderer() == GLRenderer::GalliumLlvmpipe)
{
@ -2037,8 +1987,7 @@ GLContext::AttachBuffersToFB(GLuint colorTex, GLuint colorRB,
colorTex,
0);
} else if (colorRB) {
// On the Android 4.3 emulator, IsRenderbuffer may return false incorrectly.
MOZ_ASSERT_IF(Renderer() != GLRenderer::AndroidEmulator, fIsRenderbuffer(colorRB));
MOZ_ASSERT(fIsRenderbuffer(colorRB));
fFramebufferRenderbuffer(LOCAL_GL_FRAMEBUFFER,
LOCAL_GL_COLOR_ATTACHMENT0,
LOCAL_GL_RENDERBUFFER,
@ -2046,7 +1995,7 @@ GLContext::AttachBuffersToFB(GLuint colorTex, GLuint colorRB,
}
if (depthRB) {
MOZ_ASSERT_IF(Renderer() != GLRenderer::AndroidEmulator, fIsRenderbuffer(depthRB));
MOZ_ASSERT(fIsRenderbuffer(depthRB));
fFramebufferRenderbuffer(LOCAL_GL_FRAMEBUFFER,
LOCAL_GL_DEPTH_ATTACHMENT,
LOCAL_GL_RENDERBUFFER,
@ -2054,7 +2003,7 @@ GLContext::AttachBuffersToFB(GLuint colorTex, GLuint colorRB,
}
if (stencilRB) {
MOZ_ASSERT_IF(Renderer() != GLRenderer::AndroidEmulator, fIsRenderbuffer(stencilRB));
MOZ_ASSERT(fIsRenderbuffer(stencilRB));
fFramebufferRenderbuffer(LOCAL_GL_FRAMEBUFFER,
LOCAL_GL_STENCIL_ATTACHMENT,
LOCAL_GL_RENDERBUFFER,
@ -2934,29 +2883,6 @@ GLContext::fDeleteFramebuffers(GLsizei n, const GLuint* names)
TRACKING_CONTEXT(DeletedFramebuffers(this, n, names));
}
#ifdef MOZ_WIDGET_ANDROID
/**
* Conservatively estimate whether there is enough available
* contiguous virtual address space to map a newly allocated texture.
*/
static bool
WillTextureMapSucceed(GLsizei width, GLsizei height, GLenum format, GLenum type)
{
bool willSucceed = false;
// Some drivers leave large gaps between textures, so require
// there to be double the actual size of the texture available.
size_t size = width * height * GetBytesPerTexel(format, type) * 2;
void *p = mmap(nullptr, size, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (p != MAP_FAILED) {
willSucceed = true;
munmap(p, size);
}
return willSucceed;
}
#endif // MOZ_WIDGET_ANDROID
void
GLContext::fTexImage2D(GLenum target, GLint level, GLint internalformat,
GLsizei width, GLsizei height, GLint border,
@ -2969,17 +2895,6 @@ GLContext::fTexImage2D(GLenum target, GLint level, GLint internalformat,
height = -1;
border = -1;
}
#if MOZ_WIDGET_ANDROID
if (mTextureAllocCrashesOnMapFailure) {
// We have no way of knowing whether this texture already has
// storage allocated for it, and therefore whether this check
// is necessary. We must therefore assume it does not and
// always perform the check.
if (!WillTextureMapSucceed(width, height, internalformat, type)) {
return;
}
}
#endif
raw_fTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
}

View file

@ -788,18 +788,10 @@ private:
static void AssertNotPassingStackBufferToTheGL(const void* ptr);
#ifdef MOZ_WIDGET_ANDROID
// Record the name of the GL call for better hang stacks on Android.
#define BEFORE_GL_CALL \
PROFILER_LABEL_FUNC( \
js::ProfileEntry::Category::GRAPHICS);\
BeforeGLCall(MOZ_FUNCTION_NAME)
#else
#define BEFORE_GL_CALL \
do { \
BeforeGLCall(MOZ_FUNCTION_NAME); \
} while (0)
#endif
#define AFTER_GL_CALL \
do { \
@ -815,12 +807,7 @@ private:
#else // ifdef MOZ_GL_DEBUG
#ifdef MOZ_WIDGET_ANDROID
// Record the name of the GL call for better hang stacks on Android.
#define BEFORE_GL_CALL PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS)
#else
#define BEFORE_GL_CALL do { } while (0)
#endif
#define AFTER_GL_CALL do { } while (0)
#define TRACKING_CONTEXT(a) do {} while (0)
#define ASSERT_NOT_PASSING_STACK_BUFFER_TO_GL(ptr) do {} while (0)

View file

@ -11,20 +11,7 @@
#define GET_NATIVE_WINDOW(aWidget) ((EGLNativeWindowType)aWidget->GetNativeData(NS_NATIVE_WINDOW))
#endif
#ifdef MOZ_WIDGET_ANDROID
#define GET_JAVA_SURFACE(aWidget) (aWidget->GetNativeData(NS_JAVA_SURFACE))
#endif
#if defined(XP_UNIX)
#ifdef MOZ_WIDGET_ANDROID
#include <android/native_window.h>
#include <android/native_window_jni.h>
#endif
#ifdef ANDROID
#include <android/log.h>
#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "Android" , ## args)
#endif
#define GLES2_LIB "libGLESv2.so"
#define GLES2_LIB2 "libGLESv2.so.2"
@ -164,22 +151,8 @@ CreateSurfaceForWindow(nsIWidget* widget, const EGLConfig& config) {
EGLSurface newSurface = nullptr;
MOZ_ASSERT(widget);
#ifdef MOZ_WIDGET_ANDROID
void* javaSurface = GET_JAVA_SURFACE(widget);
if (!javaSurface) {
MOZ_CRASH("GFX: Failed to get Java surface.\n");
}
JNIEnv* const env = jni::GetEnvForThread();
ANativeWindow* const nativeWindow = ANativeWindow_fromSurface(
env, reinterpret_cast<jobject>(javaSurface));
newSurface = sEGLLibrary.fCreateWindowSurface(
sEGLLibrary.fGetDisplay(EGL_DEFAULT_DISPLAY),
config, nativeWindow, 0);
ANativeWindow_release(nativeWindow);
#else
newSurface = sEGLLibrary.fCreateWindowSurface(EGL_DISPLAY(), config,
GET_NATIVE_WINDOW(widget), 0);
#endif
return newSurface;
}
@ -229,11 +202,6 @@ GLContextEGL::~GLContextEGL()
bool
GLContextEGL::Init()
{
#if defined(ANDROID)
// We can't use LoadApitraceLibrary here because the GLContext
// expects its own handle to the GL library
if (!OpenLibrary(APITRACE_LIB))
#endif
if (!OpenLibrary(GLES2_LIB)) {
#if defined(XP_UNIX)
if (!OpenLibrary(GLES2_LIB2)) {
@ -432,10 +400,8 @@ GLContextEGL::GetWSIInfo(nsCString* const out) const
out->AppendLiteral("\nEGL_EXTENSIONS: ");
out->Append((const char*)sEGLLibrary.fQueryString(EGL_DISPLAY(), LOCAL_EGL_EXTENSIONS));
#ifndef ANDROID // This query will crash some old android.
out->AppendLiteral("\nEGL_EXTENSIONS(nullptr): ");
out->Append((const char*)sEGLLibrary.fQueryString(nullptr, LOCAL_EGL_EXTENSIONS));
#endif
}
// hold a reference to the given surface
@ -685,18 +651,6 @@ CreateConfig(EGLConfig* aConfig, nsIWidget* aWidget)
{
int32_t depth = gfxPlatform::GetPlatform()->GetScreenDepth();
if (!CreateConfig(aConfig, depth, aWidget)) {
#ifdef MOZ_WIDGET_ANDROID
// Bug 736005
// Android doesn't always support 16 bit so also try 24 bit
if (depth == 16) {
return CreateConfig(aConfig, 24, aWidget);
}
// Bug 970096
// Some devices that have 24 bit screens only support 16 bit OpenGL?
if (depth == 24) {
return CreateConfig(aConfig, 16, aWidget);
}
#endif
return false;
} else {
return true;
@ -771,43 +725,6 @@ GLContextProviderEGL::CreateForWindow(nsIWidget* aWidget, bool aForceAccelerated
return gl.forget();
}
#if defined(ANDROID)
EGLSurface
GLContextProviderEGL::CreateEGLSurface(void* aWindow)
{
nsCString discardFailureId;
if (!sEGLLibrary.EnsureInitialized(false, &discardFailureId)) {
MOZ_CRASH("GFX: Failed to load EGL library 4!\n");
}
EGLConfig config;
if (!CreateConfig(&config, static_cast<nsIWidget*>(aWindow))) {
MOZ_CRASH("GFX: Failed to create EGLConfig 2!\n");
}
MOZ_ASSERT(aWindow);
EGLSurface surface = sEGLLibrary.fCreateWindowSurface(EGL_DISPLAY(), config, aWindow,
0);
if (surface == EGL_NO_SURFACE) {
MOZ_CRASH("GFX: Failed to create EGLSurface 2!\n");
}
return surface;
}
void
GLContextProviderEGL::DestroyEGLSurface(EGLSurface surface)
{
nsCString discardFailureId;
if (!sEGLLibrary.EnsureInitialized(false, &discardFailureId)) {
MOZ_CRASH("GFX: Failed to load EGL library 5!\n");
}
sEGLLibrary.fDestroySurface(EGL_DISPLAY(), surface);
}
#endif // defined(ANDROID)
static void
FillContextAttribs(bool alpha, bool depth, bool stencil, bool bpp16,
bool es3, nsTArray<EGLint>* out)

View file

@ -10,9 +10,6 @@
#ifndef GL_CONTEXT_PROVIDER_NAME
#error GL_CONTEXT_PROVIDER_NAME not defined
#endif
#if defined(ANDROID)
typedef void* EGLSurface;
#endif // defined(ANDROID)
class GL_CONTEXT_PROVIDER_NAME
{
@ -111,11 +108,6 @@ public:
static already_AddRefed<GLContext>
CreateWrappingExisting(void* aContext, void* aSurface);
#if defined(ANDROID)
static EGLSurface CreateEGLSurface(void* aWindow);
static void DestroyEGLSurface(EGLSurface surface);
#endif // defined(ANDROID)
/**
* Get a pointer to the global context, creating it if it doesn't exist.
*/

View file

@ -54,46 +54,6 @@ static const char* sEGLExtensionNames[] = {
"EGL_ANGLE_platform_angle_d3d"
};
#if defined(ANDROID)
static PRLibrary* LoadApitraceLibrary()
{
// Initialization of gfx prefs here is only needed during the unit tests...
gfxPrefs::GetSingleton();
if (!gfxPrefs::UseApitrace()) {
return nullptr;
}
static PRLibrary* sApitraceLibrary = nullptr;
if (sApitraceLibrary)
return sApitraceLibrary;
nsCString logFile = Preferences::GetCString("gfx.apitrace.logfile");
if (logFile.IsEmpty()) {
logFile = "firefox.trace";
}
// The firefox process can't write to /data/local, but it can write
// to $GRE_HOME/
nsAutoCString logPath;
logPath.AppendPrintf("%s/%s", getenv("GRE_HOME"), logFile.get());
// apitrace uses the TRACE_FILE environment variable to determine where
// to log trace output to
printf_stderr("Logging GL tracing output to %s", logPath.get());
setenv("TRACE_FILE", logPath.get(), false);
printf_stderr("Attempting load of %s\n", APITRACE_LIB);
sApitraceLibrary = PR_LoadLibrary(APITRACE_LIB);
return sApitraceLibrary;
}
#endif // ANDROID
#ifdef XP_WIN
// see the comment in GLLibraryEGL::EnsureInitialized() for the rationale here.
static PRLibrary*
@ -348,13 +308,8 @@ GLLibraryEGL::EnsureInitialized(bool forceAccel, nsACString* const out_failureId
#else // !Windows
// On non-Windows (Android) we use system copies of libEGL. We look for
// the APITrace lib, libEGL.so, and libEGL.so.1 in that order.
#if defined(ANDROID)
if (!mEGLLibrary)
mEGLLibrary = LoadApitraceLibrary();
#endif
// On non-Windows we use system copies of libEGL. We look for
// libEGL.so and libEGL.so.1 in that order.
if (!mEGLLibrary) {
printf_stderr("Attempting load of libEGL.so\n");
@ -593,24 +548,6 @@ GLLibraryEGL::EnsureInitialized(bool forceAccel, nsACString* const out_failureId
MarkExtensionUnsupported(KHR_image_pixmap);
}
if (IsExtensionSupported(ANDROID_native_fence_sync)) {
GLLibraryLoader::SymLoadStruct nativeFenceSymbols[] = {
{ (PRFuncPtr*) &mSymbols.fDupNativeFenceFDANDROID, { "eglDupNativeFenceFDANDROID", nullptr } },
{ nullptr, { nullptr } }
};
bool success = GLLibraryLoader::LoadSymbols(mEGLLibrary,
&nativeFenceSymbols[0],
lookupFunction);
if (!success) {
NS_ERROR("EGL supports ANDROID_native_fence_sync without exposing its functions!");
MarkExtensionUnsupported(ANDROID_native_fence_sync);
mSymbols.fDupNativeFenceFDANDROID = nullptr;
}
}
mInitialized = true;
return true;
}
@ -642,12 +579,7 @@ GLLibraryEGL::InitClientExtensions()
const char* rawExtString = nullptr;
#ifndef ANDROID
// Bug 1209612: Crashes on a number of android drivers.
// Ideally we would only blocklist this there, but for now we don't need the client
// extension list on ANDROID (we mostly need it on ANGLE), and we'd rather not crash.
rawExtString = (const char*)fQueryString(nullptr, LOCAL_EGL_EXTENSIONS);
#endif
if (!rawExtString) {
if (shouldDumpExts) {

View file

@ -33,17 +33,6 @@
typedef void* EGLNativePixmapType;
typedef void* EGLNativeWindowType;
#ifdef ANDROID
// We only need to explicitly dlopen egltrace
// on android as we can use LD_PRELOAD or other tricks
// on other platforms. We look for it in /data/local
// as that's writeable by all users
//
// This should really go in GLLibraryEGL.cpp but we currently reference
// APITRACE_LIB in GLContextProviderEGL.cpp. Further refactoring
// will come in subsequent patches on Bug 732865
#define APITRACE_LIB "/data/local/tmp/egltrace.so"
#endif
#endif
#if defined(MOZ_X11)
@ -79,28 +68,15 @@ namespace gl {
# endif
#endif
#ifdef MOZ_WIDGET_ANDROID
// Record the name of the GL call for better hang stacks on Android.
#define BEFORE_GL_CALL \
PROFILER_LABEL_FUNC( \
js::ProfileEntry::Category::GRAPHICS);\
BeforeGLCall(MOZ_FUNCTION_NAME)
#else
#define BEFORE_GL_CALL do { \
BeforeGLCall(MOZ_FUNCTION_NAME); \
} while (0)
#endif
#define AFTER_GL_CALL do { \
AfterGLCall(MOZ_FUNCTION_NAME); \
} while (0)
#else
#ifdef MOZ_WIDGET_ANDROID
// Record the name of the GL call for better hang stacks on Android.
#define BEFORE_GL_CALL PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS)
#else
#else // !DEBUG
#define BEFORE_GL_CALL
#endif
#define AFTER_GL_CALL
#endif

View file

@ -16,14 +16,11 @@ elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
gl_provider = 'EGL'
else:
gl_provider = 'GLX'
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
gl_provider = 'EGL'
if CONFIG['MOZ_GL_PROVIDER']:
gl_provider = CONFIG['MOZ_GL_PROVIDER']
EXPORTS += [
'AndroidSurfaceTexture.h',
'DecomposeIntoNoRepeatTriangles.h',
'EGLUtils.h',
'ForceDiscreteGPUHelperCGL.h',
@ -118,7 +115,6 @@ elif gl_provider == 'GLX':
]
SOURCES += [
'AndroidSurfaceTexture.cpp',
'DecomposeIntoNoRepeatTriangles.cpp',
'EGLUtils.cpp',
'GfxTexturesReporter.cpp',

View file

@ -28,15 +28,8 @@ Compositor::Compositor(widget::CompositorWidget* aWidget,
, mScreenRotation(ROTATION_0)
, mWidget(aWidget)
, mIsDestroyed(false)
#if defined(MOZ_WIDGET_ANDROID)
// If the default color isn't white for Fennec, there is a black
// flash before the first page of a tab is loaded.
, mClearColor(1.0, 1.0, 1.0, 1.0)
, mDefaultClearColor(1.0, 1.0, 1.0, 1.0)
#else
, mClearColor(0.0, 0.0, 0.0, 0.0)
, mDefaultClearColor(0.0, 0.0, 0.0, 0.0)
#endif
{
}
@ -173,11 +166,7 @@ Compositor::DrawDiagnosticsInternal(DiagnosticFlags aFlags,
const gfx::Matrix4x4& aTransform,
uint32_t aFlashCounter)
{
#if defined(ANDROID)
int lWidth = 10;
#else
int lWidth = 2;
#endif
gfx::Color color;
if (aFlags & DiagnosticFlags::CONTENT) {

View file

@ -1,3 +1,7 @@
/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "GLImages.h"
#include "GLContext.h"
@ -98,17 +102,5 @@ GLImage::GetAsSourceSurface()
return source.forget();
}
#ifdef MOZ_WIDGET_ANDROID
SurfaceTextureImage::SurfaceTextureImage(gl::AndroidSurfaceTexture* aSurfTex,
const gfx::IntSize& aSize,
gl::OriginPos aOriginPos)
: GLImage(ImageFormat::SURFACE_TEXTURE),
mSurfaceTexture(aSurfTex),
mSize(aSize),
mOriginPos(aOriginPos)
{
}
#endif
} // namespace layers
} // namespace mozilla

View file

@ -6,7 +6,6 @@
#ifndef GFX_GLIMAGES_H
#define GFX_GLIMAGES_H
#include "AndroidSurfaceTexture.h"
#include "GLContextTypes.h"
#include "GLTypes.h"
#include "ImageContainer.h" // for Image
@ -60,34 +59,6 @@ private:
bool mOwns;
};
#ifdef MOZ_WIDGET_ANDROID
class SurfaceTextureImage : public GLImage {
public:
SurfaceTextureImage(gl::AndroidSurfaceTexture* aSurfTex,
const gfx::IntSize& aSize,
gl::OriginPos aOriginPos);
gfx::IntSize GetSize() override { return mSize; }
gl::AndroidSurfaceTexture* GetSurfaceTexture() const {
return mSurfaceTexture;
}
gl::OriginPos GetOriginPos() const {
return mOriginPos;
}
SurfaceTextureImage* AsSurfaceTextureImage() override {
return this;
}
private:
RefPtr<gl::AndroidSurfaceTexture> mSurfaceTexture;
gfx::IntSize mSize;
gl::OriginPos mOriginPos;
};
#endif // MOZ_WIDGET_ANDROID
} // namespace layers
} // namespace mozilla

View file

@ -166,9 +166,7 @@ protected:
class GLImage;
class EGLImageImage;
class SharedRGBImage;
#ifdef MOZ_WIDGET_ANDROID
class SurfaceTextureImage;
#elif defined(XP_MACOSX)
#if defined(XP_MACOSX)
class MacIOSurfaceImage;
#endif
@ -225,9 +223,6 @@ public:
/* Access to derived classes. */
virtual EGLImageImage* AsEGLImageImage() { return nullptr; }
virtual GLImage* AsGLImage() { return nullptr; }
#ifdef MOZ_WIDGET_ANDROID
virtual SurfaceTextureImage* AsSurfaceTextureImage() { return nullptr; }
#endif
#ifdef XP_MACOSX
virtual MacIOSurfaceImage* AsMacIOSurfaceImage() { return nullptr; }
#endif

View file

@ -396,18 +396,7 @@ AppendToString(std::stringstream& aStream, ImageFormat format,
void
print_stderr(std::stringstream& aStr)
{
#if defined(ANDROID)
// On Android logcat output is truncated to 1024 chars per line, and
// we usually use std::stringstream to build up giant multi-line gobs
// of output. So to avoid the truncation we find the newlines and
// print the lines individually.
std::string line;
while (std::getline(aStr, line)) {
printf_stderr("%s\n", line.c_str());
}
#else
printf_stderr("%s", aStr.str().c_str());
#endif
}
void

View file

@ -1,273 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "AndroidAPZ.h"
#include "AsyncPanZoomController.h"
#include "GeneratedJNIWrappers.h"
#include "gfxPrefs.h"
#include "OverscrollHandoffState.h"
#include "ViewConfiguration.h"
#define ANDROID_APZ_LOG(...)
// #define ANDROID_APZ_LOG(...) printf_stderr("ANDROID_APZ: " __VA_ARGS__)
static float sMaxFlingSpeed = 0.0f;
namespace mozilla {
namespace layers {
AndroidSpecificState::AndroidSpecificState() {
using namespace mozilla::java;
sdk::ViewConfiguration::LocalRef config;
if (sdk::ViewConfiguration::Get(GeckoAppShell::GetApplicationContext(), &config) == NS_OK) {
int32_t speed = 0;
if (config->GetScaledMaximumFlingVelocity(&speed) == NS_OK) {
sMaxFlingSpeed = (float)speed * 0.001f;
} else {
ANDROID_APZ_LOG("%p Failed to query ViewConfiguration for scaled maximum fling velocity\n", this);
}
} else {
ANDROID_APZ_LOG("%p Failed to get ViewConfiguration\n", this);
}
StackScroller::LocalRef scroller;
if (StackScroller::New(GeckoAppShell::GetApplicationContext(), &scroller) != NS_OK) {
ANDROID_APZ_LOG("%p Failed to create Android StackScroller\n", this);
return;
}
mOverScroller = scroller;
}
const float BOUNDS_EPSILON = 1.0f;
// This function is used to convert the scroll offset from a float to an integer
// suitable for using with the Android OverScroller Class.
// The Android OverScroller class (unfortunately) operates in integers instead of floats.
// When casting a float value such as 1.5 to an integer, the value is converted to 1.
// If this value represents the max scroll offset, the OverScroller class will never scroll
// to the end of the page as it will always be 0.5 pixels short. To work around this issue,
// the min and max scroll extents are floor/ceil to convert them to the nearest integer
// just outside of the actual scroll extents. This means, the starting
// scroll offset must be converted the same way so that if the frame has already been
// scrolled 1.5 pixels, it won't be snapped back when converted to an integer. This integer
// rounding error was one of several causes of Bug 1276463.
static int32_t
ClampStart(float aOrigin, float aMin, float aMax)
{
if (aOrigin <= aMin) {
return (int32_t)floor(aMin);
} else if (aOrigin >= aMax) {
return (int32_t)ceil(aMax);
}
return (int32_t)aOrigin;
}
AndroidFlingAnimation::AndroidFlingAnimation(AsyncPanZoomController& aApzc,
PlatformSpecificStateBase* aPlatformSpecificState,
const RefPtr<const OverscrollHandoffChain>& aOverscrollHandoffChain,
bool aFlingIsHandoff,
const RefPtr<const AsyncPanZoomController>& aScrolledApzc)
: mApzc(aApzc)
, mOverscrollHandoffChain(aOverscrollHandoffChain)
, mScrolledApzc(aScrolledApzc)
, mSentBounceX(false)
, mSentBounceY(false)
, mFlingDuration(0)
{
MOZ_ASSERT(mOverscrollHandoffChain);
AndroidSpecificState* state = aPlatformSpecificState->AsAndroidSpecificState();
MOZ_ASSERT(state);
mOverScroller = state->mOverScroller;
MOZ_ASSERT(mOverScroller);
// Drop any velocity on axes where we don't have room to scroll anyways
// (in this APZC, or an APZC further in the handoff chain).
// This ensures that we don't take the 'overscroll' path in Sample()
// on account of one axis which can't scroll having a velocity.
if (!mOverscrollHandoffChain->CanScrollInDirection(&mApzc, Layer::HORIZONTAL)) {
ReentrantMonitorAutoEnter lock(mApzc.mMonitor);
mApzc.mX.SetVelocity(0);
}
if (!mOverscrollHandoffChain->CanScrollInDirection(&mApzc, Layer::VERTICAL)) {
ReentrantMonitorAutoEnter lock(mApzc.mMonitor);
mApzc.mY.SetVelocity(0);
}
ParentLayerPoint velocity = mApzc.GetVelocityVector();
float scrollRangeStartX = mApzc.mX.GetPageStart().value;
float scrollRangeEndX = mApzc.mX.GetScrollRangeEnd().value;
float scrollRangeStartY = mApzc.mY.GetPageStart().value;
float scrollRangeEndY = mApzc.mY.GetScrollRangeEnd().value;
mStartOffset.x = mPreviousOffset.x = mApzc.mX.GetOrigin().value;
mStartOffset.y = mPreviousOffset.y = mApzc.mY.GetOrigin().value;
float length = velocity.Length();
if (length > 0.0f) {
mFlingDirection = velocity / length;
if ((sMaxFlingSpeed > 0.0f) && (length > sMaxFlingSpeed)) {
velocity = mFlingDirection * sMaxFlingSpeed;
}
}
mPreviousVelocity = velocity;
int32_t originX = ClampStart(mStartOffset.x, scrollRangeStartX, scrollRangeEndX);
int32_t originY = ClampStart(mStartOffset.y, scrollRangeStartY, scrollRangeEndY);
if (!state->mLastFling.IsNull()) {
// If it's been too long since the previous fling, or if the new fling's
// velocity is too low, don't allow flywheel to kick in. If we do allow
// flywheel to kick in, then we need to update the timestamp on the
// StackScroller because otherwise it might use a stale velocity.
TimeDuration flingDuration = TimeStamp::Now() - state->mLastFling;
if (flingDuration.ToMilliseconds() < gfxPrefs::APZFlingAccelInterval()
&& velocity.Length() >= gfxPrefs::APZFlingAccelMinVelocity()) {
bool unused = false;
mOverScroller->ComputeScrollOffset(flingDuration.ToMilliseconds(), &unused);
} else {
mOverScroller->ForceFinished(true);
}
}
mOverScroller->Fling(originX, originY,
// Android needs the velocity in pixels per second and it is in pixels per ms.
(int32_t)(velocity.x * 1000.0f), (int32_t)(velocity.y * 1000.0f),
(int32_t)floor(scrollRangeStartX), (int32_t)ceil(scrollRangeEndX),
(int32_t)floor(scrollRangeStartY), (int32_t)ceil(scrollRangeEndY),
0, 0, 0);
state->mLastFling = TimeStamp::Now();
}
/**
* Advances a fling by an interpolated amount based on the Android OverScroller.
* This should be called whenever sampling the content transform for this
* frame. Returns true if the fling animation should be advanced by one frame,
* or false if there is no fling or the fling has ended.
*/
bool
AndroidFlingAnimation::DoSample(FrameMetrics& aFrameMetrics,
const TimeDuration& aDelta)
{
bool shouldContinueFling = true;
mFlingDuration += aDelta.ToMilliseconds();
mOverScroller->ComputeScrollOffset(mFlingDuration, &shouldContinueFling);
int32_t currentX = 0;
int32_t currentY = 0;
mOverScroller->GetCurrX(&currentX);
mOverScroller->GetCurrY(&currentY);
ParentLayerPoint offset((float)currentX, (float)currentY);
ParentLayerPoint preCheckedOffset(offset);
bool hitBoundX = CheckBounds(mApzc.mX, offset.x, mFlingDirection.x, &(offset.x));
bool hitBoundY = CheckBounds(mApzc.mY, offset.y, mFlingDirection.y, &(offset.y));
ParentLayerPoint velocity = mPreviousVelocity;
// Sometimes the OverScroller fails to update the offset for a frame.
// If the frame can still scroll we just use the velocity from the previous
// frame. However, if the frame can no longer scroll in the direction
// of the fling, then end the animation.
if (offset != mPreviousOffset) {
if (aDelta.ToMilliseconds() > 0) {
mOverScroller->GetCurrSpeedX(&velocity.x);
mOverScroller->GetCurrSpeedY(&velocity.y);
velocity.x /= 1000;
velocity.y /= 1000;
mPreviousVelocity = velocity;
}
} else if ((fabsf(offset.x - preCheckedOffset.x) > BOUNDS_EPSILON) || (fabsf(offset.y - preCheckedOffset.y) > BOUNDS_EPSILON)) {
// The page is no longer scrolling but the fling animation is still animating beyond the page bounds. If it goes
// beyond the BOUNDS_EPSILON then it has overflowed and will never stop. In that case, stop the fling animation.
shouldContinueFling = false;
} else if (hitBoundX && hitBoundY) {
// We can't scroll any farther along either axis.
shouldContinueFling = false;
}
float speed = velocity.Length();
// gfxPrefs::APZFlingStoppedThreshold is only used in tests.
if (!shouldContinueFling || (speed < gfxPrefs::APZFlingStoppedThreshold())) {
if (shouldContinueFling) {
// The OverScroller thinks it should continue but the speed is below
// the stopping threshold so abort the animation.
mOverScroller->AbortAnimation();
}
// This animation is going to end. If DeferHandleFlingOverscroll
// has not been called and there is still some velocity left,
// call it so that fling hand off may occur if applicable.
if (!mSentBounceX && !mSentBounceY && (speed > 0.0f)) {
DeferHandleFlingOverscroll(velocity);
}
return false;
}
mPreviousOffset = offset;
mApzc.SetVelocityVector(velocity);
aFrameMetrics.SetScrollOffset(offset / aFrameMetrics.GetZoom());
// If we hit a bounds while flinging, send the velocity so that the bounce
// animation can play.
if (hitBoundX || hitBoundY) {
ParentLayerPoint bounceVelocity = velocity;
if (!mSentBounceX && hitBoundX && fabsf(offset.x - mStartOffset.x) > BOUNDS_EPSILON) {
mSentBounceX = true;
} else {
bounceVelocity.x = 0.0f;
}
if (!mSentBounceY && hitBoundY && fabsf(offset.y - mStartOffset.y) > BOUNDS_EPSILON) {
mSentBounceY = true;
} else {
bounceVelocity.y = 0.0f;
}
if (!IsZero(bounceVelocity)) {
DeferHandleFlingOverscroll(bounceVelocity);
}
}
return true;
}
void
AndroidFlingAnimation::DeferHandleFlingOverscroll(ParentLayerPoint& aVelocity)
{
mDeferredTasks.AppendElement(
NewRunnableMethod<ParentLayerPoint,
RefPtr<const OverscrollHandoffChain>,
RefPtr<const AsyncPanZoomController>>(&mApzc,
&AsyncPanZoomController::HandleFlingOverscroll,
aVelocity,
mOverscrollHandoffChain,
mScrolledApzc));
}
bool
AndroidFlingAnimation::CheckBounds(Axis& aAxis, float aValue, float aDirection, float* aClamped)
{
if ((aDirection < 0.0f) && (aValue <= aAxis.GetPageStart().value)) {
if (aClamped) {
*aClamped = aAxis.GetPageStart().value;
}
return true;
} else if ((aDirection > 0.0f) && (aValue >= aAxis.GetScrollRangeEnd().value)) {
if (aClamped) {
*aClamped = aAxis.GetScrollRangeEnd().value;
}
return true;
}
return false;
}
} // namespace layers
} // namespace mozilla

View file

@ -1,60 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_layers_AndroidAPZ_h_
#define mozilla_layers_AndroidAPZ_h_
#include "AsyncPanZoomAnimation.h"
#include "AsyncPanZoomController.h"
#include "GeneratedJNIWrappers.h"
namespace mozilla {
namespace layers {
class AndroidSpecificState : public PlatformSpecificStateBase {
public:
AndroidSpecificState();
virtual AndroidSpecificState* AsAndroidSpecificState() override {
return this;
}
java::StackScroller::GlobalRef mOverScroller;
TimeStamp mLastFling;
};
class AndroidFlingAnimation: public AsyncPanZoomAnimation {
public:
AndroidFlingAnimation(AsyncPanZoomController& aApzc,
PlatformSpecificStateBase* aPlatformSpecificState,
const RefPtr<const OverscrollHandoffChain>& aOverscrollHandoffChain,
bool aFlingIsHandoff /* ignored */,
const RefPtr<const AsyncPanZoomController>& aScrolledApzc);
virtual bool DoSample(FrameMetrics& aFrameMetrics,
const TimeDuration& aDelta) override;
private:
void DeferHandleFlingOverscroll(ParentLayerPoint& aVelocity);
// Returns true if value is on or outside of axis bounds.
bool CheckBounds(Axis& aAxis, float aValue, float aDirection, float* aClamped);
AsyncPanZoomController& mApzc;
java::StackScroller::GlobalRef mOverScroller;
RefPtr<const OverscrollHandoffChain> mOverscrollHandoffChain;
RefPtr<const AsyncPanZoomController> mScrolledApzc;
bool mSentBounceX;
bool mSentBounceY;
long mFlingDuration;
ParentLayerPoint mStartOffset;
ParentLayerPoint mPreviousOffset;
// Unit vector in the direction of the fling.
ParentLayerPoint mFlingDirection;
ParentLayerPoint mPreviousVelocity;
};
} // namespace layers
} // namespace mozilla
#endif // mozilla_layers_AndroidAPZ_h_

View file

@ -75,9 +75,6 @@
#include "SharedMemoryBasic.h" // for SharedMemoryBasic
#include "ScrollSnap.h" // for ScrollSnapUtils
#include "WheelScrollAnimation.h"
#if defined(MOZ_WIDGET_ANDROID)
#include "AndroidAPZ.h"
#endif // defined(MOZ_WIDGET_ANDROID)
#define ENABLE_APZC_LOGGING 0
// #define ENABLE_APZC_LOGGING 1
@ -110,16 +107,10 @@ using mozilla::gfx::PointTyped;
using mozilla::gfx::RectTyped;
using mozilla::gfx::ScaleFactors2D;
// Choose between platform-specific implementations.
#ifdef MOZ_WIDGET_ANDROID
typedef WidgetOverscrollEffect OverscrollEffect;
typedef AndroidSpecificState PlatformSpecificState;
typedef AndroidFlingAnimation FlingAnimation;
#else
// Platform-specific implementations.
typedef GenericOverscrollEffect OverscrollEffect;
typedef PlatformSpecificStateBase PlatformSpecificState; // no extra state, just use the base class
typedef GenericFlingAnimation FlingAnimation;
#endif
/**
* \page APZCPrefs APZ preferences
@ -250,7 +241,6 @@ typedef GenericFlingAnimation FlingAnimation;
* for a new sample, v(t0) is the velocity at the previous sample, f is the
* value of this pref, and (t1 - t0) is the amount of time, in milliseconds,
* that has elapsed between the two samples.\n
* NOTE: Not currently used in Android fling calculations.
*
* \li\b apz.fling_min_velocity_threshold
* Minimum velocity for a fling to actually kick off. If the user pans and lifts
@ -271,8 +261,6 @@ typedef GenericFlingAnimation FlingAnimation;
* animation completely. This is to prevent asymptotically approaching 0
* velocity and rerendering unnecessarily.\n
* Units: screen pixels per millisecond.\n
* NOTE: Should not be set to anything
* other than 0.0 for Android except for tests to disable flings.
*
* \li\b apz.max_velocity_inches_per_ms
* Maximum velocity. Velocity will be capped at this value if a faster fling

View file

@ -580,18 +580,7 @@ GetRootDocumentElementFor(nsIWidget* aWidget)
static nsIFrame*
UpdateRootFrameForTouchTargetDocument(nsIFrame* aRootFrame)
{
#if defined(MOZ_WIDGET_ANDROID)
// Re-target so that the hit test is performed relative to the frame for the
// Root Content Document instead of the Root Document which are different in
// Android. See bug 1229752 comment 16 for an explanation of why this is necessary.
if (nsIDocument* doc = aRootFrame->PresContext()->PresShell()->GetTouchEventTargetDocument()) {
if (nsIPresShell* shell = doc->GetShell()) {
if (nsIFrame* frame = shell->GetRootFrame()) {
return frame;
}
}
}
#endif
// No retargeting needed on desktop.
return aRootFrame;
}

View file

@ -479,11 +479,8 @@ APZEventState::ProcessAPZStateChange(ViewID aViewId,
void
APZEventState::ProcessClusterHit()
{
// If we hit a cluster of links then we shouldn't activate any of them,
// as we will be showing the zoomed view. (This is only called on Fennec).
#ifndef MOZ_WIDGET_ANDROID
MOZ_ASSERT(false);
#endif
// If we hit a cluster of links then we shouldn't activate any of them.
MOZ_ASSERT(false, "Cluster hits shouldn't happen on desktop!");
mActiveElementManager->ClearActivation();
}

View file

@ -6,9 +6,6 @@
#include "mozilla/layers/APZThreadUtils.h"
#include "mozilla/layers/Compositor.h"
#ifdef MOZ_WIDGET_ANDROID
#include "AndroidBridge.h"
#endif
namespace mozilla {
namespace layers {
@ -57,15 +54,6 @@ APZThreadUtils::RunOnControllerThread(already_AddRefed<Runnable> aTask)
{
RefPtr<Runnable> task = aTask;
#ifdef MOZ_WIDGET_ANDROID
// This is needed while nsWindow::ConfigureAPZControllerThread is not propper
// implemented.
if (AndroidBridge::IsJavaUiThread()) {
task->Run();
} else {
AndroidBridge::Bridge()->PostTaskToUiThread(task.forget(), 0);
}
#else
if (!sControllerThread) {
// Could happen on startup
NS_WARNING("Dropping task posted to controller thread");
@ -77,17 +65,12 @@ APZThreadUtils::RunOnControllerThread(already_AddRefed<Runnable> aTask)
} else {
sControllerThread->PostTask(task.forget());
}
#endif
}
/*static*/ bool
APZThreadUtils::IsControllerThread()
{
#ifdef MOZ_WIDGET_ANDROID
return AndroidBridge::IsJavaUiThread();
#else
return sControllerThread == MessageLoop::current();
#endif
}
NS_IMPL_ISUPPORTS(GenericTimerCallbackBase, nsITimerCallback)

View file

@ -149,7 +149,6 @@ BasicPaintedLayer::Validate(LayerManager::DrawPaintedLayerCallback aCallback,
}
uint32_t flags = 0;
#ifndef MOZ_WIDGET_ANDROID
if (BasicManager()->CompositorMightResample()) {
flags |= RotatedContentBuffer::PAINT_WILL_RESAMPLE;
}
@ -158,7 +157,6 @@ BasicPaintedLayer::Validate(LayerManager::DrawPaintedLayerCallback aCallback,
flags |= RotatedContentBuffer::PAINT_WILL_RESAMPLE;
}
}
#endif
if (mDrawAtomically) {
flags |= RotatedContentBuffer::PAINT_NO_ROTATION;
}

View file

@ -31,10 +31,6 @@
#include "TiledLayerBuffer.h"
#include "mozilla/dom/WindowBinding.h" // for Overfill Callback
#include "FrameLayerBuilder.h" // for FrameLayerbuilder
#ifdef MOZ_WIDGET_ANDROID
#include "AndroidBridge.h"
#include "LayerMetricsWrapper.h"
#endif
#ifdef XP_WIN
#include "mozilla/gfx/DeviceManagerDx.h"
#endif
@ -250,7 +246,7 @@ ClientLayerManager::BeginTransactionWithTarget(gfxContext* aTarget)
//
// Desktop does not support async zoom yet, so we ignore this for those
// platforms.
#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_UIKIT)
#if defined(MOZ_WIDGET_UIKIT)
if (mWidget && mWidget->GetOwningTabChild()) {
mCompositorMightResample = AsyncPanZoomEnabled();
}

View file

@ -150,11 +150,6 @@ ClientTiledPaintedLayer::BeginPaint()
if (!displayPortAncestor || !scrollAncestor) {
// No displayport or scroll ancestor, so we can't do progressive rendering.
#if defined(MOZ_WIDGET_ANDROID)
// Both Android and b2g on phones are guaranteed to have a displayport set, so this
// should never happen.
NS_WARNING("Tiled PaintedLayer with no scrollable container ancestor");
#endif
return;
}

View file

@ -128,13 +128,6 @@ ImageClient::CreateTextureClientForImage(Image* aImage, KnowsCompositor* aForwar
EGLImageImage* typedImage = aImage->AsEGLImageImage();
texture = EGLImageTextureData::CreateTextureClient(
typedImage, size, aForwarder->GetTextureForwarder(), TextureFlags::DEFAULT);
#ifdef MOZ_WIDGET_ANDROID
} else if (aImage->GetFormat() == ImageFormat::SURFACE_TEXTURE) {
SurfaceTextureImage* typedImage = aImage->AsSurfaceTextureImage();
texture = AndroidSurfaceTextureData::CreateTextureClient(
typedImage->GetSurfaceTexture(), size, typedImage->GetOriginPos(),
aForwarder->GetTextureForwarder(), TextureFlags::DEFAULT);
#endif
} else {
MOZ_ASSERT(false, "Bad ImageFormat.");
}

View file

@ -1230,19 +1230,7 @@ ClientMultiTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& a
// Compute a "coherent update rect" that we should paint all at once in a
// single transaction. This is to avoid rendering glitches on animated
// page content, and when layers change size/shape.
// On Fennec uploads are more expensive because we're not using gralloc, so
// we use a coherent update rect that is intersected with the screen at the
// time of issuing the draw command. This will paint faster but also potentially
// make the progressive paint more visible to the user while scrolling.
// On B2G uploads are cheaper and we value coherency more, especially outside
// the browser, so we always use the entire user-visible area.
IntRect coherentUpdateRect(RoundedOut(
#ifdef MOZ_WIDGET_ANDROID
transformedCompositionBounds->Intersect(aPaintData->mCompositionBounds)
#else
*transformedCompositionBounds
#endif
).ToUnknownRect());
IntRect coherentUpdateRect(RoundedOut(*transformedCompositionBounds).ToUnknownRect());
TILING_LOG("TILING %p: Progressive update final coherency rect %s\n", &mPaintedLayer, Stringify(coherentUpdateRect).c_str());

View file

@ -38,10 +38,6 @@
#include "nsTArrayForwardDeclare.h" // for InfallibleTArray
#include "UnitTransforms.h" // for TransformTo
#include "gfxPrefs.h"
#if defined(MOZ_WIDGET_ANDROID)
# include <android/log.h>
# include "mozilla/widget/AndroidCompositorWidget.h"
#endif
#include "GeckoProfiler.h"
#include "FrameUniformityData.h"
#include "TreeTraversal.h" // for ForEachNode, BreadthFirstSearch
@ -825,11 +821,7 @@ ExpandRootClipRect(Layer* aLayer, const ScreenMargin& aFixedLayerMargins)
// clear the clip rect on aLayer entirely but this seems more precise.
Maybe<ParentLayerIntRect> rootClipRect = aLayer->AsLayerComposite()->GetShadowClipRect();
if (rootClipRect && aFixedLayerMargins != ScreenMargin()) {
#ifndef MOZ_WIDGET_ANDROID
// We should never enter here on anything other than Fennec, since
// aFixedLayerMargins should be empty everywhere else.
MOZ_ASSERT(false);
#endif
MOZ_ASSERT(false, "aFixedLayerMargins should be empty!");
ParentLayerRect rect(rootClipRect.value());
rect.Deflate(ViewAs<ParentLayerPixel>(aFixedLayerMargins,
PixelCastJustification::ScreenIsParentLayerForRoot));
@ -837,40 +829,6 @@ ExpandRootClipRect(Layer* aLayer, const ScreenMargin& aFixedLayerMargins)
}
}
#ifdef MOZ_WIDGET_ANDROID
static void
MoveScrollbarForLayerMargin(Layer* aRoot, FrameMetrics::ViewID aRootScrollId,
const ScreenMargin& aFixedLayerMargins)
{
// See bug 1223928 comment 9 - once we can detect the RCD with just the
// isRootContent flag on the metrics, we can probably move this code into
// ApplyAsyncTransformToScrollbar rather than having it as a separate
// adjustment on the layer tree.
Layer* scrollbar = BreadthFirstSearch<ReverseIterator>(aRoot,
[aRootScrollId](Layer* aNode) {
return (aNode->GetScrollbarDirection() == Layer::HORIZONTAL &&
aNode->GetScrollbarTargetContainerId() == aRootScrollId);
});
if (scrollbar) {
// Shift the horizontal scrollbar down into the new space exposed by the
// dynamic toolbar hiding. Technically we should also scale the vertical
// scrollbar a bit to expand into the new space but it's not as noticeable
// and it would add a lot more complexity, so we're going with the "it's not
// worth it" justification.
TranslateShadowLayer(scrollbar, ParentLayerPoint(0, -aFixedLayerMargins.bottom), true, nullptr);
if (scrollbar->GetParent()) {
// The layer that has the HORIZONTAL direction sits inside another
// ContainerLayer. This ContainerLayer also has a clip rect that causes
// the scrollbar to get clipped. We need to expand that clip rect to
// prevent that from happening. This is kind of ugly in that we're
// assuming a particular layer tree structure but short of adding more
// flags to the layer there doesn't appear to be a good way to do this.
ExpandRootClipRect(scrollbar->GetParent(), aFixedLayerMargins);
}
}
}
#endif
bool
AsyncCompositionManager::ApplyAsyncContentTransformToTree(Layer *aLayer,
bool* aOutFoundRoot)
@ -974,50 +932,9 @@ AsyncCompositionManager::ApplyAsyncContentTransformToTree(Layer *aLayer,
const ScrollMetadata& scrollMetadata = layer->GetScrollMetadata(i);
const FrameMetrics& metrics = scrollMetadata.GetMetrics();
#if defined(MOZ_WIDGET_ANDROID)
// If we find a metrics which is the root content doc, use that. If not, use
// the root layer. Since this function recurses on children first we should
// only end up using the root layer if the entire tree was devoid of a
// root content metrics. This is a temporary solution; in the long term we
// should not need the root content metrics at all. See bug 1201529 comment
// 6 for details.
if (!(*aOutFoundRoot)) {
*aOutFoundRoot = metrics.IsRootContent() || /* RCD */
(layer->GetParent() == nullptr && /* rootmost metrics */
i + 1 >= layer->GetScrollMetadataCount());
if (*aOutFoundRoot) {
mRootScrollableId = metrics.GetScrollId();
CSSToLayerScale geckoZoom = metrics.LayersPixelsPerCSSPixel().ToScaleFactor();
if (mIsFirstPaint) {
LayerIntPoint scrollOffsetLayerPixels = RoundedToInt(metrics.GetScrollOffset() * geckoZoom);
mContentRect = metrics.GetScrollableRect();
SetFirstPaintViewport(scrollOffsetLayerPixels,
geckoZoom,
mContentRect);
} else {
ParentLayerPoint scrollOffset = controller->GetCurrentAsyncScrollOffset(
AsyncPanZoomController::RESPECT_FORCE_DISABLE);
// Compute the painted displayport in document-relative CSS pixels.
CSSRect displayPort(metrics.GetCriticalDisplayPort().IsEmpty() ?
metrics.GetDisplayPort() :
metrics.GetCriticalDisplayPort());
displayPort += metrics.GetScrollOffset();
SyncFrameMetrics(scrollOffset,
geckoZoom * asyncTransformWithoutOverscroll.mScale,
metrics.GetScrollableRect(), displayPort, geckoZoom, mLayersUpdated,
mPaintSyncId, fixedLayerMargins);
mFixedLayerMargins = fixedLayerMargins;
mLayersUpdated = false;
mPaintSyncId = 0;
}
mIsFirstPaint = false;
}
}
#else
// Non-Android platforms still care about this flag being cleared after
// We still care about this flag being cleared after
// the first call to TransformShadowTree().
mIsFirstPaint = false;
#endif
// Transform the current local clips by this APZC's async transform. If we're
// using containerful scrolling, then the clip is not part of the scrolled
@ -1420,12 +1337,8 @@ AsyncCompositionManager::TransformShadowTree(TimeStamp aCurrentFrame,
// in Gecko and partially in Java.
bool foundRoot = false;
if (ApplyAsyncContentTransformToTree(root, &foundRoot)) {
#if defined(MOZ_WIDGET_ANDROID)
MOZ_ASSERT(foundRoot);
if (foundRoot && mFixedLayerMargins != ScreenMargin()) {
MoveScrollbarForLayerMargin(root, mRootScrollableId, mFixedLayerMargins);
}
#endif
// Fixed margin considerations should go here, but we never encounter
// those outside of mobile.
}
// Advance APZ animations to the next expected vsync timestamp, if we can
@ -1458,14 +1371,7 @@ AsyncCompositionManager::SetFirstPaintViewport(const LayerIntPoint& aOffset,
const CSSToLayerScale& aZoom,
const CSSRect& aCssPageRect)
{
#ifdef MOZ_WIDGET_ANDROID
widget::AndroidCompositorWidget* widget =
mLayerManager->GetCompositor()->GetWidget()->AsAndroid();
if (!widget) {
return;
}
widget->SetFirstPaintViewport(aOffset, aZoom, aCssPageRect);
#endif
// ** STUB **
}
void
@ -1478,16 +1384,7 @@ AsyncCompositionManager::SyncFrameMetrics(const ParentLayerPoint& aScrollOffset,
int32_t aPaintSyncId,
ScreenMargin& aFixedLayerMargins)
{
#ifdef MOZ_WIDGET_ANDROID
widget::AndroidCompositorWidget* widget =
mLayerManager->GetCompositor()->GetWidget()->AsAndroid();
if (!widget) {
return;
}
widget->SyncFrameMetrics(
aScrollOffset, aZoom, aCssPageRect, aDisplayPort, aPaintedResolution,
aLayersUpdated, aPaintSyncId, aFixedLayerMargins);
#endif
// ** STUB **
}
} // namespace layers

View file

@ -238,14 +238,6 @@ private:
LayerTransformRecorder mLayerTransformRecorder;
TimeStamp mPreviousFrameTimeStamp;
#ifdef MOZ_WIDGET_ANDROID
// The following two fields are only needed on Fennec with C++ APZ, because
// then we need to reposition the gecko scrollbar to deal with the
// dynamic toolbar shifting content around.
FrameMetrics::ViewID mRootScrollableId;
ScreenMargin mFixedLayerMargins;
#endif
};
MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(AsyncCompositionManager::TransformsToSkip)

View file

@ -133,18 +133,7 @@ CanvasLayerComposite::CleanupResources()
gfx::SamplingFilter
CanvasLayerComposite::GetSamplingFilter()
{
gfx::SamplingFilter filter = mSamplingFilter;
#ifdef ANDROID
// Bug 691354
// Using the LINEAR filter we get unexplained artifacts.
// Use NEAREST when no scaling is required.
Matrix matrix;
bool is2D = GetEffectiveTransform().Is2D(&matrix);
if (is2D && !ThebesMatrix(matrix).HasNonTranslationOrFlip()) {
filter = SamplingFilter::POINT;
}
#endif
return filter;
return mSamplingFilter;
}
void

View file

@ -54,16 +54,6 @@
#include "nsPoint.h" // for nsIntPoint
#include "nsRect.h" // for mozilla::gfx::IntRect
#include "nsRegion.h" // for nsIntRegion, etc
#ifdef MOZ_WIDGET_ANDROID
#include <android/log.h>
#include <android/native_window.h>
#endif
#if defined(MOZ_WIDGET_ANDROID)
#include "opengl/CompositorOGL.h"
#include "GLContextEGL.h"
#include "GLContextProvider.h"
#include "ScopedGLHelpers.h"
#endif
#include "GeckoProfiler.h"
#include "TextRenderer.h" // for TextRenderer
#include "mozilla/layers/CompositorBridgeParent.h"
@ -490,9 +480,6 @@ LayerManagerComposite::UpdateAndRender()
}
Render(invalid, opaque);
#if defined(MOZ_WIDGET_ANDROID)
RenderToPresentationSurface();
#endif
mGeometryChanged = false;
mWindowOverlayChanged = false;
@ -618,42 +605,6 @@ LayerManagerComposite::RenderDebugOverlay(const IntRect& aBounds)
}
float alpha = 1;
#ifdef ANDROID
// Draw a translation delay warning overlay
int width;
int border;
if (!mWarnTime.IsNull() && (now - mWarnTime).ToMilliseconds() < kVisualWarningDuration) {
EffectChain effects;
// Black blorder
border = 4;
width = 6;
effects.mPrimaryEffect = new EffectSolidColor(gfx::Color(0, 0, 0, 1));
mCompositor->DrawQuad(gfx::Rect(border, border, aBounds.width - 2 * border, width),
aBounds, effects, alpha, gfx::Matrix4x4());
mCompositor->DrawQuad(gfx::Rect(border, aBounds.height - border - width, aBounds.width - 2 * border, width),
aBounds, effects, alpha, gfx::Matrix4x4());
mCompositor->DrawQuad(gfx::Rect(border, border + width, width, aBounds.height - 2 * border - width * 2),
aBounds, effects, alpha, gfx::Matrix4x4());
mCompositor->DrawQuad(gfx::Rect(aBounds.width - border - width, border + width, width, aBounds.height - 2 * border - 2 * width),
aBounds, effects, alpha, gfx::Matrix4x4());
// Content
border = 5;
width = 4;
effects.mPrimaryEffect = new EffectSolidColor(gfx::Color(1, 1.f - mWarningLevel, 0, 1));
mCompositor->DrawQuad(gfx::Rect(border, border, aBounds.width - 2 * border, width),
aBounds, effects, alpha, gfx::Matrix4x4());
mCompositor->DrawQuad(gfx::Rect(border, aBounds.height - border - width, aBounds.width - 2 * border, width),
aBounds, effects, alpha, gfx::Matrix4x4());
mCompositor->DrawQuad(gfx::Rect(border, border + width, width, aBounds.height - 2 * border - width * 2),
aBounds, effects, alpha, gfx::Matrix4x4());
mCompositor->DrawQuad(gfx::Rect(aBounds.width - border - width, border + width, width, aBounds.height - 2 * border - 2 * width),
aBounds, effects, alpha, gfx::Matrix4x4());
SetDebugOverlayWantsNextFrame(true);
}
#endif
float fillRatio = mCompositor->GetFillRatio();
mFPS->DrawFPS(now, drawFrameColorBars ? 10 : 1, 2, unsigned(fillRatio), mCompositor);
@ -932,8 +883,6 @@ LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion, const nsIntRegi
mozilla::widget::WidgetRenderingContext widgetContext;
#if defined(XP_MACOSX)
widgetContext.mLayerManager = this;
#elif defined(MOZ_WIDGET_ANDROID)
widgetContext.mCompositor = GetCompositor();
#endif
{
@ -952,14 +901,6 @@ LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion, const nsIntRegi
CompositorBench(mCompositor, bounds);
MOZ_ASSERT(mRoot->GetOpacity() == 1);
#if defined(MOZ_WIDGET_ANDROID)
LayerMetricsWrapper wrapper = GetRootContentLayer();
if (wrapper) {
mCompositor->SetClearColor(wrapper.Metadata().GetBackgroundColor());
} else {
mCompositor->SetClearColorToDefault();
}
#endif
if (mRoot->GetClipRect()) {
clipRect = *mRoot->GetClipRect();
IntRect rect(clipRect.x, clipRect.y, clipRect.width, clipRect.height);
@ -1029,182 +970,6 @@ LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion, const nsIntRegi
RecordFrame();
}
#if defined(MOZ_WIDGET_ANDROID)
class ScopedCompositorProjMatrix {
public:
ScopedCompositorProjMatrix(CompositorOGL* aCompositor, const Matrix4x4& aProjMatrix):
mCompositor(aCompositor),
mOriginalProjMatrix(mCompositor->GetProjMatrix())
{
mCompositor->SetProjMatrix(aProjMatrix);
}
~ScopedCompositorProjMatrix()
{
mCompositor->SetProjMatrix(mOriginalProjMatrix);
}
private:
CompositorOGL* const mCompositor;
const Matrix4x4 mOriginalProjMatrix;
};
class ScopedCompostitorSurfaceSize {
public:
ScopedCompostitorSurfaceSize(CompositorOGL* aCompositor, const gfx::IntSize& aSize) :
mCompositor(aCompositor),
mOriginalSize(mCompositor->GetDestinationSurfaceSize())
{
mCompositor->SetDestinationSurfaceSize(aSize);
}
~ScopedCompostitorSurfaceSize()
{
mCompositor->SetDestinationSurfaceSize(mOriginalSize);
}
private:
CompositorOGL* const mCompositor;
const gfx::IntSize mOriginalSize;
};
class ScopedCompositorRenderOffset {
public:
ScopedCompositorRenderOffset(CompositorOGL* aCompositor, const ScreenPoint& aOffset) :
mCompositor(aCompositor),
mOriginalOffset(mCompositor->GetScreenRenderOffset())
{
mCompositor->SetScreenRenderOffset(aOffset);
}
~ScopedCompositorRenderOffset()
{
mCompositor->SetScreenRenderOffset(mOriginalOffset);
}
private:
CompositorOGL* const mCompositor;
const ScreenPoint mOriginalOffset;
};
class ScopedContextSurfaceOverride {
public:
ScopedContextSurfaceOverride(GLContextEGL* aContext, void* aSurface) :
mContext(aContext)
{
MOZ_ASSERT(aSurface);
mContext->SetEGLSurfaceOverride(aSurface);
mContext->MakeCurrent(true);
}
~ScopedContextSurfaceOverride()
{
mContext->SetEGLSurfaceOverride(EGL_NO_SURFACE);
mContext->MakeCurrent(true);
}
private:
GLContextEGL* const mContext;
};
void
LayerManagerComposite::RenderToPresentationSurface()
{
#ifdef MOZ_WIDGET_ANDROID
nsIWidget* const widget = mCompositor->GetWidget()->RealWidget();
auto window = static_cast<ANativeWindow*>(
widget->GetNativeData(NS_PRESENTATION_WINDOW));
if (!window) {
return;
}
EGLSurface surface = widget->GetNativeData(NS_PRESENTATION_SURFACE);
if (!surface) {
//create surface;
surface = GLContextProviderEGL::CreateEGLSurface(window);
if (!surface) {
return;
}
widget->SetNativeData(NS_PRESENTATION_SURFACE,
reinterpret_cast<uintptr_t>(surface));
}
CompositorOGL* compositor = mCompositor->AsCompositorOGL();
GLContext* gl = compositor->gl();
GLContextEGL* egl = GLContextEGL::Cast(gl);
if (!egl) {
return;
}
const IntSize windowSize(ANativeWindow_getWidth(window),
ANativeWindow_getHeight(window));
#endif
if ((windowSize.width <= 0) || (windowSize.height <= 0)) {
return;
}
ScreenRotation rotation = compositor->GetScreenRotation();
const int actualWidth = windowSize.width;
const int actualHeight = windowSize.height;
const gfx::IntSize originalSize = compositor->GetDestinationSurfaceSize();
const nsIntRect originalRect = nsIntRect(0, 0, originalSize.width, originalSize.height);
int pageWidth = originalSize.width;
int pageHeight = originalSize.height;
if (rotation == ROTATION_90 || rotation == ROTATION_270) {
pageWidth = originalSize.height;
pageHeight = originalSize.width;
}
float scale = 1.0;
if ((pageWidth > actualWidth) || (pageHeight > actualHeight)) {
const float scaleWidth = (float)actualWidth / (float)pageWidth;
const float scaleHeight = (float)actualHeight / (float)pageHeight;
scale = scaleWidth <= scaleHeight ? scaleWidth : scaleHeight;
}
const gfx::IntSize actualSize(actualWidth, actualHeight);
ScopedCompostitorSurfaceSize overrideSurfaceSize(compositor, actualSize);
const ScreenPoint offset((actualWidth - (int)(scale * pageWidth)) / 2, 0);
ScopedContextSurfaceOverride overrideSurface(egl, surface);
Matrix viewMatrix = ComputeTransformForRotation(originalRect,
rotation);
viewMatrix.Invert(); // unrotate
viewMatrix.PostScale(scale, scale);
viewMatrix.PostTranslate(offset.x, offset.y);
Matrix4x4 matrix = Matrix4x4::From2D(viewMatrix);
mRoot->ComputeEffectiveTransforms(matrix);
nsIntRegion opaque;
LayerIntRegion visible;
PostProcessLayers(mRoot, opaque, visible, Nothing());
nsIntRegion invalid;
IntRect bounds = IntRect::Truncate(0, 0, scale * pageWidth, actualHeight);
IntRect rect, actualBounds;
MOZ_ASSERT(mRoot->GetOpacity() == 1);
mCompositor->BeginFrame(invalid, nullptr, bounds, nsIntRegion(), &rect, &actualBounds);
// The Java side of Fennec sets a scissor rect that accounts for
// chrome such as the URL bar. Override that so that the entire frame buffer
// is cleared.
ScopedScissorRect scissorRect(egl, 0, 0, actualWidth, actualHeight);
egl->fClearColor(0.0, 0.0, 0.0, 0.0);
egl->fClear(LOCAL_GL_COLOR_BUFFER_BIT);
const IntRect clipRect = IntRect::Truncate(0, 0, actualWidth, actualHeight);
RootLayer()->Prepare(RenderTargetIntRect::FromUnknownRect(clipRect));
RootLayer()->RenderLayer(clipRect);
mCompositor->EndFrame();
}
#endif
already_AddRefed<PaintedLayerComposite>
LayerManagerComposite::CreatePaintedLayerComposite()
{

View file

@ -327,9 +327,6 @@ private:
* Render the current layer tree to the active target.
*/
void Render(const nsIntRegion& aInvalidRegion, const nsIntRegion& aOpaqueRegion);
#if defined(MOZ_WIDGET_ANDROID)
void RenderToPresentationSurface();
#endif
/**
* We need to know our invalid region before we're ready to render.

View file

@ -369,16 +369,6 @@ CompositorVsyncScheduler::ScheduleComposition()
if (mAsapScheduling) {
// Used only for performance testing purposes
PostCompositeTask(TimeStamp::Now());
#ifdef MOZ_WIDGET_ANDROID
} else if (mNeedsComposite >= 2 && mIsObservingVsync) {
// uh-oh, we already requested a composite at least twice so far, and a
// composite hasn't happened yet. It is possible that the vsync observation
// is blocked on the main thread, so let's just composite ASAP and not
// wait for the vsync. Note that this should only ever happen on Fennec
// because there content runs in the same process as the compositor, and so
// content can actually block the main thread in this process.
PostCompositeTask(TimeStamp::Now());
#endif
} else {
SetNeedsComposite();
}
@ -953,11 +943,6 @@ CompositorBridgeParent::ResumeComposition()
MonitorAutoLock lock(mResumeCompositionMonitor);
if (!mCompositor->Resume()) {
#ifdef MOZ_WIDGET_ANDROID
// We can't get a surface. This could be because the activity changed between
// the time resume was scheduled and now.
__android_log_print(ANDROID_LOG_INFO, "CompositorBridgeParent", "Unable to renew compositor surface; remaining in paused state");
#endif
lock.NotifyAll();
return;
}

View file

@ -18,9 +18,6 @@
#include "mozilla/gfx/GPUProcessManager.h"
#include "mozilla/Unused.h"
#include "Units.h"
#ifdef MOZ_WIDGET_ANDROID
#include "AndroidBridge.h"
#endif
namespace mozilla {
namespace layers {
@ -90,8 +87,7 @@ RemoteContentController::HandleTap(TapType aTapType,
if (NS_IsMainThread()) {
HandleTapOnMainThread(aTapType, aPoint, aModifiers, aGuid, aInputBlockId);
} else {
// We don't want to get the TabParent or call TabParent::SendHandleTap() from a non-main thread (this might happen
// on Android, where this is called from the Java UI thread)
// We don't want to get the TabParent or call TabParent::SendHandleTap() from a non-main thread
NS_DispatchToMainThread(NewRunnableMethod<TapType, LayoutDevicePoint, Modifiers, ScrollableLayerGuid, uint64_t>
(this, &RemoteContentController::HandleTapOnMainThread, aTapType, aPoint, aModifiers, aGuid, aInputBlockId));
}
@ -139,12 +135,8 @@ RemoteContentController::NotifyPinchGesture(PinchGestureInput::PinchGestureType
void
RemoteContentController::PostDelayedTask(already_AddRefed<Runnable> aTask, int aDelayMs)
{
#ifdef MOZ_WIDGET_ANDROID
AndroidBridge::Bridge()->PostTaskToUiThread(Move(aTask), aDelayMs);
#else
(MessageLoop::current() ? MessageLoop::current() : mCompositorThread)->
PostDelayedTask(Move(aTask), aDelayMs);
#endif
}
bool

View file

@ -228,11 +228,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
'opengl/GLManager.cpp',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
SOURCES += [
'apz/src/AndroidAPZ.cpp',
]
SOURCES += [
'apz/public/IAPZCTreeManager.cpp',
'apz/src/APZCTreeManager.cpp',

View file

@ -43,10 +43,6 @@
#include "GLBlitTextureImageHelper.h"
#include "HeapCopyOfStackArray.h"
#if MOZ_WIDGET_ANDROID
#include "TexturePoolOGL.h"
#endif
#include "GeckoProfiler.h"
namespace mozilla {
@ -229,13 +225,6 @@ CompositorOGL::Initialize(nsCString* const out_failureReason)
mGLContext = CreateContext();
#ifdef MOZ_WIDGET_ANDROID
if (!mGLContext){
*out_failureReason = "FEATURE_FAILURE_OPENGL_NO_ANDROID_CONTEXT";
NS_RUNTIMEABORT("We need a context on Android");
}
#endif
if (!mGLContext){
*out_failureReason = "FEATURE_FAILURE_OPENGL_CREATE_CONTEXT";
return false;
@ -673,10 +662,6 @@ CompositorOGL::BeginFrame(const nsIntRegion& aInvalidRegion,
mPixelsPerFrame = width * height;
mPixelsFilled = 0;
#ifdef MOZ_WIDGET_ANDROID
TexturePoolOGL::Fill(gl());
#endif
// Default blend function implements "OVER"
mGLContext->fBlendFuncSeparate(LOCAL_GL_ONE, LOCAL_GL_ONE_MINUS_SRC_ALPHA,
LOCAL_GL_ONE, LOCAL_GL_ONE_MINUS_SRC_ALPHA);
@ -1707,19 +1692,13 @@ CompositorOGL::CopyToTarget(DrawTarget* aTarget, const nsIntPoint& aTopLeft, con
void
CompositorOGL::Pause()
{
#ifdef MOZ_WIDGET_ANDROID
if (!gl() || gl()->IsDestroyed())
return;
// ReleaseSurface internally calls MakeCurrent.
gl()->ReleaseSurface();
#endif
// This was only used on Android
}
bool
CompositorOGL::Resume()
{
#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_UIKIT)
#if defined(MOZ_WIDGET_UIKIT)
if (!gl() || gl()->IsDestroyed())
return false;

View file

@ -73,64 +73,5 @@ EGLImageTextureData::Serialize(SurfaceDescriptor& aOutDescriptor)
return true;
}
////////////////////////////////////////////////////////////////////////
// AndroidSurface
#ifdef MOZ_WIDGET_ANDROID
already_AddRefed<TextureClient>
AndroidSurfaceTextureData::CreateTextureClient(AndroidSurfaceTexture* aSurfTex,
gfx::IntSize aSize,
gl::OriginPos aOriginPos,
LayersIPCChannel* aAllocator,
TextureFlags aFlags)
{
MOZ_ASSERT(XRE_IsParentProcess(),
"Can't pass an android surfaces between processes.");
if (!aSurfTex || !XRE_IsParentProcess()) {
return nullptr;
}
if (aOriginPos == gl::OriginPos::BottomLeft) {
aFlags |= TextureFlags::ORIGIN_BOTTOM_LEFT;
}
return TextureClient::CreateWithData(
new AndroidSurfaceTextureData(aSurfTex, aSize),
aFlags, aAllocator
);
}
AndroidSurfaceTextureData::AndroidSurfaceTextureData(AndroidSurfaceTexture* aSurfTex,
gfx::IntSize aSize)
: mSurfTex(aSurfTex)
, mSize(aSize)
{}
AndroidSurfaceTextureData::~AndroidSurfaceTextureData()
{}
void
AndroidSurfaceTextureData::FillInfo(TextureData::Info& aInfo) const
{
aInfo.size = mSize;
aInfo.format = gfx::SurfaceFormat::UNKNOWN;
aInfo.hasIntermediateBuffer = false;
aInfo.hasSynchronization = false;
aInfo.supportsMoz2D = false;
aInfo.canExposeMappedData = false;
}
bool
AndroidSurfaceTextureData::Serialize(SurfaceDescriptor& aOutDescriptor)
{
aOutDescriptor = SurfaceTextureDescriptor((uintptr_t)mSurfTex.get(),
mSize);
return true;
}
#endif // MOZ_WIDGET_ANDROID
} // namespace layers
} // namespace mozilla

View file

@ -14,7 +14,6 @@
#include "mozilla/layers/CompositorTypes.h"
#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor
#include "mozilla/layers/TextureClient.h" // for TextureClient, etc
#include "AndroidSurfaceTexture.h"
namespace mozilla {
@ -48,41 +47,6 @@ protected:
const gfx::IntSize mSize;
};
#ifdef MOZ_WIDGET_ANDROID
class AndroidSurfaceTextureData : public TextureData
{
public:
static already_AddRefed<TextureClient>
CreateTextureClient(gl::AndroidSurfaceTexture* aSurfTex,
gfx::IntSize aSize,
gl::OriginPos aOriginPos,
LayersIPCChannel* aAllocator,
TextureFlags aFlags);
~AndroidSurfaceTextureData();
virtual void FillInfo(TextureData::Info& aInfo) const override;
virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override;
// Useless functions.
virtual bool Lock(OpenMode) override { return true; }
virtual void Unlock() override {}
// Our data is always owned externally.
virtual void Deallocate(LayersIPCChannel*) override {}
protected:
AndroidSurfaceTextureData(gl::AndroidSurfaceTexture* aSurfTex, gfx::IntSize aSize);
const RefPtr<gl::AndroidSurfaceTexture> mSurfTex;
const gfx::IntSize mSize;
};
#endif // MOZ_WIDGET_ANDROID
} // namespace layers
} // namespace mozilla

View file

@ -16,7 +16,6 @@
#include "mozilla/gfx/Logging.h" // for gfxCriticalError
#include "mozilla/layers/ISurfaceAllocator.h"
#include "nsRegion.h" // for nsIntRegion
#include "AndroidSurfaceTexture.h"
#include "GfxTexturesReporter.h" // for GfxTexturesReporter
#include "GLBlitTextureImageHelper.h"
#include "GeckoProfiler.h"
@ -40,16 +39,6 @@ CreateTextureHostOGL(const SurfaceDescriptor& aDesc,
{
RefPtr<TextureHost> result;
switch (aDesc.type()) {
#ifdef MOZ_WIDGET_ANDROID
case SurfaceDescriptor::TSurfaceTextureDescriptor: {
const SurfaceTextureDescriptor& desc = aDesc.get_SurfaceTextureDescriptor();
result = new SurfaceTextureHost(aFlags,
(AndroidSurfaceTexture*)desc.surfTex(),
desc.size());
break;
}
#endif
case SurfaceDescriptor::TEGLImageDescriptor: {
const EGLImageDescriptor& desc = aDesc.get_EGLImageDescriptor();
result = new EGLImageTextureHost(aFlags,
@ -346,177 +335,6 @@ GLTextureSource::gl() const
return mCompositor ? mCompositor->gl() : nullptr;
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// SurfaceTextureHost
#ifdef MOZ_WIDGET_ANDROID
SurfaceTextureSource::SurfaceTextureSource(CompositorOGL* aCompositor,
AndroidSurfaceTexture* aSurfTex,
gfx::SurfaceFormat aFormat,
GLenum aTarget,
GLenum aWrapMode,
gfx::IntSize aSize)
: mCompositor(aCompositor)
, mSurfTex(aSurfTex)
, mFormat(aFormat)
, mTextureTarget(aTarget)
, mWrapMode(aWrapMode)
, mSize(aSize)
{
}
void
SurfaceTextureSource::BindTexture(GLenum aTextureUnit,
gfx::SamplingFilter aSamplingFilter)
{
MOZ_ASSERT(mSurfTex);
GLContext* gl = this->gl();
if (!gl || !gl->MakeCurrent()) {
NS_WARNING("Trying to bind a texture without a GLContext");
return;
}
gl->fActiveTexture(aTextureUnit);
// SurfaceTexture spams us if there are any existing GL errors, so
// we'll clear them here in order to avoid that.
gl->FlushErrors();
mSurfTex->UpdateTexImage();
ApplySamplingFilterToBoundTexture(gl, aSamplingFilter, mTextureTarget);
}
void
SurfaceTextureSource::SetCompositor(Compositor* aCompositor)
{
CompositorOGL* glCompositor = AssertGLCompositor(aCompositor);
if (!glCompositor) {
DeallocateDeviceData();
return;
}
if (mCompositor != glCompositor) {
DeallocateDeviceData();
}
mCompositor = glCompositor;
}
bool
SurfaceTextureSource::IsValid() const
{
return !!gl();
}
gl::GLContext*
SurfaceTextureSource::gl() const
{
return mCompositor ? mCompositor->gl() : nullptr;
}
gfx::Matrix4x4
SurfaceTextureSource::GetTextureTransform()
{
MOZ_ASSERT(mSurfTex);
gfx::Matrix4x4 ret;
mSurfTex->GetTransformMatrix(ret);
return ret;
}
void
SurfaceTextureSource::DeallocateDeviceData()
{
mSurfTex = nullptr;
}
////////////////////////////////////////////////////////////////////////
SurfaceTextureHost::SurfaceTextureHost(TextureFlags aFlags,
AndroidSurfaceTexture* aSurfTex,
gfx::IntSize aSize)
: TextureHost(aFlags)
, mSurfTex(aSurfTex)
, mSize(aSize)
, mCompositor(nullptr)
{
}
SurfaceTextureHost::~SurfaceTextureHost()
{
}
gl::GLContext*
SurfaceTextureHost::gl() const
{
return mCompositor ? mCompositor->gl() : nullptr;
}
bool
SurfaceTextureHost::Lock()
{
MOZ_ASSERT(mSurfTex);
GLContext* gl = this->gl();
if (!gl || !gl->MakeCurrent()) {
return false;
}
if (!mTextureSource) {
gfx::SurfaceFormat format = gfx::SurfaceFormat::R8G8B8A8;
GLenum target = LOCAL_GL_TEXTURE_EXTERNAL;
GLenum wrapMode = LOCAL_GL_CLAMP_TO_EDGE;
mTextureSource = new SurfaceTextureSource(mCompositor,
mSurfTex,
format,
target,
wrapMode,
mSize);
}
return NS_SUCCEEDED(mSurfTex->Attach(gl));
}
void
SurfaceTextureHost::Unlock()
{
MOZ_ASSERT(mSurfTex);
mSurfTex->Detach();
}
void
SurfaceTextureHost::SetCompositor(Compositor* aCompositor)
{
CompositorOGL* glCompositor = AssertGLCompositor(aCompositor);
if (!glCompositor) {
DeallocateDeviceData();
return;
}
mCompositor = glCompositor;
if (mTextureSource) {
mTextureSource->SetCompositor(glCompositor);
}
}
gfx::SurfaceFormat
SurfaceTextureHost::GetFormat() const
{
return mTextureSource ? mTextureSource->GetFormat() : gfx::SurfaceFormat::UNKNOWN;
}
void
SurfaceTextureHost::DeallocateDeviceData()
{
if (mTextureSource) {
mTextureSource->DeallocateDeviceData();
}
mSurfTex = nullptr;
}
#endif // MOZ_WIDGET_ANDROID
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// EGLImage

View file

@ -36,10 +36,6 @@ namespace gfx {
class DataSourceSurface;
} // namespace gfx
namespace gl {
class AndroidSurfaceTexture;
} // namespace gl
namespace layers {
class Compositor;
@ -335,103 +331,6 @@ protected:
RefPtr<GLTextureSource> mTextureSource;
};
////////////////////////////////////////////////////////////////////////
// SurfaceTexture
#ifdef MOZ_WIDGET_ANDROID
class SurfaceTextureSource : public TextureSource
, public TextureSourceOGL
{
public:
SurfaceTextureSource(CompositorOGL* aCompositor,
mozilla::gl::AndroidSurfaceTexture* aSurfTex,
gfx::SurfaceFormat aFormat,
GLenum aTarget,
GLenum aWrapMode,
gfx::IntSize aSize);
virtual const char* Name() const override { return "SurfaceTextureSource"; }
virtual TextureSourceOGL* AsSourceOGL() override { return this; }
virtual void BindTexture(GLenum activetex,
gfx::SamplingFilter aSamplingFilter) override;
virtual bool IsValid() const override;
virtual gfx::IntSize GetSize() const override { return mSize; }
virtual gfx::SurfaceFormat GetFormat() const override { return mFormat; }
virtual gfx::Matrix4x4 GetTextureTransform() override;
virtual GLenum GetTextureTarget() const override { return mTextureTarget; }
virtual GLenum GetWrapMode() const override { return mWrapMode; }
virtual void DeallocateDeviceData() override;
virtual void SetCompositor(Compositor* aCompositor) override;
gl::GLContext* gl() const;
protected:
RefPtr<CompositorOGL> mCompositor;
RefPtr<gl::AndroidSurfaceTexture> mSurfTex;
const gfx::SurfaceFormat mFormat;
const GLenum mTextureTarget;
const GLenum mWrapMode;
const gfx::IntSize mSize;
};
class SurfaceTextureHost : public TextureHost
{
public:
SurfaceTextureHost(TextureFlags aFlags,
mozilla::gl::AndroidSurfaceTexture* aSurfTex,
gfx::IntSize aSize);
virtual ~SurfaceTextureHost();
virtual void DeallocateDeviceData() override;
virtual void SetCompositor(Compositor* aCompositor) override;
virtual Compositor* GetCompositor() override { return mCompositor; }
virtual bool Lock() override;
virtual void Unlock() override;
virtual gfx::SurfaceFormat GetFormat() const override;
virtual bool BindTextureSource(CompositableTextureSourceRef& aTexture) override
{
aTexture = mTextureSource;
return !!aTexture;
}
virtual already_AddRefed<gfx::DataSourceSurface> GetAsSurface() override
{
return nullptr; // XXX - implement this (for MOZ_DUMP_PAINTING)
}
gl::GLContext* gl() const;
virtual gfx::IntSize GetSize() const override { return mSize; }
virtual const char* Name() override { return "SurfaceTextureHost"; }
protected:
RefPtr<gl::AndroidSurfaceTexture> mSurfTex;
const gfx::IntSize mSize;
RefPtr<CompositorOGL> mCompositor;
RefPtr<SurfaceTextureSource> mTextureSource;
};
#endif // MOZ_WIDGET_ANDROID
////////////////////////////////////////////////////////////////////////
// EGLImage

View file

@ -22,9 +22,6 @@
#include "nsFrameSelection.h"
#include "nsGenericHTMLElement.h"
#include "nsIHapticFeedback.h"
#ifdef MOZ_WIDGET_ANDROID
#include "nsWindow.h"
#endif
namespace mozilla {
@ -896,15 +893,6 @@ AccessibleCaretManager::SetSelectionDragState(bool aState) const
if (fs) {
fs->SetDragState(aState);
}
// Pin Fennecs DynamicToolbarAnimator in place before/after dragging,
// to avoid co-incident screen scrolling.
#ifdef MOZ_WIDGET_ANDROID
nsIDocument* doc = mPresShell->GetDocument();
MOZ_ASSERT(doc);
nsIWidget* widget = nsContentUtils::WidgetForDocument(doc);
static_cast<nsWindow*>(widget)->SetSelectionDragState(aState);
#endif
}
void

View file

@ -2502,7 +2502,6 @@ ContainerState::PreparePaintedLayerForUse(PaintedLayer* aLayer,
aData->mVisibilityComputedRegion.SetEmpty();
// FIXME: Temporary workaround for bug 681192 and bug 724786.
#ifndef MOZ_WIDGET_ANDROID
// Calculate exact position of the top-left of the active scrolled root.
// This might not be 0,0 due to the snapping in ScaleToNearestPixels.
gfxPoint animatedGeometryRootTopLeft = scaledOffset - ThebesPoint(matrix.GetTranslation()) + mParameters.mOffset;
@ -2515,9 +2514,6 @@ ContainerState::PreparePaintedLayerForUse(PaintedLayer* aLayer,
} else if (didResetScrollPositionForLayerPixelAlignment) {
aData->mAnimatedGeometryRootPosition = animatedGeometryRootTopLeft;
}
#else
Unused << didResetScrollPositionForLayerPixelAlignment;
#endif
}
#if defined(DEBUG) || defined(MOZ_DUMP_PAINTING)

View file

@ -620,8 +620,6 @@ FindFrameTargetedByInputEvent(WidgetGUIEvent* aEvent,
PET_LOG("Final target is %p\n", target);
// Uncomment this to dump the frame tree to help with debugging.
// Note that dumping the frame tree at the top of the function may flood
// logcat on Android devices and cause the PET_LOGs to get dropped.
// aRootFrame->DumpFrameTree();
if (!target || !prefs->mRepositionEventCoords) {

View file

@ -53,7 +53,7 @@ GetWidget(nsIPresShell* aShell)
return nullptr;
}
if (nsIFrame* rootFrame = aShell->GetRootFrame()) {
#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_UIKIT)
#if defined(MOZ_WIDGET_UIKIT)
return rootFrame->GetNearestWidget();
#else
if (nsView* view = rootFrame->GetView()) {

View file

@ -294,7 +294,7 @@ load 469861-1.xhtml
load 469861-2.xhtml
load 470851-1.xhtml
load 471594-1.xhtml
asserts-if(Android&&!asyncPan,1-2) load 473042.xhtml # bug 1034369 (may also cause a few assertions to be registered on the next test)
load 473042.xhtml # bug 1034369 (may also cause a few assertions to be registered on the next test)
asserts(0-5) load 474075.html # bug 847368
load 477333-1.xhtml
load 477731-1.html
@ -411,7 +411,7 @@ load 709536-1.xhtml
load 722137.html
load 725535.html
load 727601.html
skip-if(Android) asserts(0-2) pref(dom.disable_open_during_load,false) load 735943.html # the assertion is bug 735966, for android bug 760271
asserts(0-2) pref(dom.disable_open_during_load,false) load 735943.html # the assertion is bug 735966
asserts(0-2) load 736389-1.xhtml # sometimes the above assertions are delayed and is reported on this test instead
load 736924-1.html
load 749816-1.html
@ -447,7 +447,7 @@ load 866588.html
load 876092.html
load 876221.html
load 897852.html
asserts(4-6) asserts-if(Android&&!asyncPan,2) load 898913.html # bug 847368
asserts(4-6) load 898913.html # bug 847368
pref(layers.acceleration.enabled,false) pref(layers.force-active,true) load 919434.html
load 926728.html
load 930381.html

View file

@ -193,11 +193,6 @@ LOCAL_INCLUDES += [
'/view',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
LOCAL_INCLUDES += [
'/widget/android',
]
FINAL_LIBRARY = 'xul'
BROWSER_CHROME_MANIFESTS += ['tests/browser.ini']

View file

@ -3668,14 +3668,8 @@ nsCSSFrameConstructor::FindInputData(Element* aElement,
nsCSSAnonBoxes::buttonContent) },
// TODO: this is temporary until a frame is written: bug 635240.
SIMPLE_INT_CREATE(NS_FORM_INPUT_NUMBER, NS_NewNumberControlFrame),
#if defined(MOZ_WIDGET_ANDROID)
// On Android/B2G, date/time input appears as a normal text box.
SIMPLE_INT_CREATE(NS_FORM_INPUT_TIME, NS_NewTextControlFrame),
SIMPLE_INT_CREATE(NS_FORM_INPUT_DATE, NS_NewTextControlFrame),
#else
SIMPLE_INT_CREATE(NS_FORM_INPUT_TIME, NS_NewDateTimeControlFrame),
SIMPLE_INT_CREATE(NS_FORM_INPUT_DATE, NS_NewDateTimeControlFrame),
#endif
// TODO: this is temporary until a frame is written: bug 888320
SIMPLE_INT_CREATE(NS_FORM_INPUT_MONTH, NS_NewTextControlFrame),
// TODO: this is temporary until a frame is written: bug 888320

View file

@ -4326,7 +4326,7 @@ nsDocumentViewer::ShouldAttachToTopLevel()
if (nsIWidget::UsePuppetWidgets())
return true;
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_UIKIT)
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_UIKIT)
// On windows, in the parent process we also attach, but just to
// chrome items
nsWindowType winType = mParentWidget->WindowType();

View file

@ -1711,10 +1711,6 @@ public:
void SyncWindowProperties(nsView* aView);
#ifdef ANDROID
virtual nsIDocument* GetTouchEventTargetDocument() = 0;
#endif
protected:
friend class nsRefreshDriver;

View file

@ -911,11 +911,6 @@ ApplyRectMultiplier(nsRect aRect, float aMultiplier)
bool
nsLayoutUtils::UsesAsyncScrolling(nsIFrame* aFrame)
{
#ifdef MOZ_WIDGET_ANDROID
// We always have async scrolling for android
return true;
#endif
return AsyncPanZoomEnabled(aFrame);
}
@ -8104,7 +8099,7 @@ UpdateCompositionBoundsForRCDRSF(ParentLayerRect& aCompBounds,
return false;
}
#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_UIKIT)
#if defined(MOZ_WIDGET_UIKIT)
nsIWidget* widget = rootFrame->GetNearestWidget();
#else
nsView* view = rootFrame->GetView();

View file

@ -197,10 +197,6 @@
#include "mozilla/StyleSheetInlines.h"
#include "mozilla/dom/ImageTracker.h"
#ifdef ANDROID
#include "nsIDocShellTreeOwner.h"
#endif
#ifdef MOZ_TASK_TRACER
#include "GeckoTaskTracer.h"
using namespace mozilla::tasktracer;
@ -7287,12 +7283,6 @@ PresShell::HandleEvent(nsIFrame* aFrame,
// if the mouse is being captured then retarget the mouse event at the
// document that is being captured.
retargetEventDoc = capturingContent->GetComposedDoc();
#ifdef ANDROID
} else if ((aEvent->mClass == eTouchEventClass) ||
(aEvent->mClass == eMouseEventClass) ||
(aEvent->mClass == eWheelEventClass)) {
retargetEventDoc = GetTouchEventTargetDocument();
#endif
}
if (retargetEventDoc) {
@ -7846,38 +7836,6 @@ PresShell::HandleEvent(nsIFrame* aFrame,
return rv;
}
#ifdef ANDROID
nsIDocument*
PresShell::GetTouchEventTargetDocument()
{
nsPresContext* context = GetPresContext();
if (!context || !context->IsRoot()) {
return nullptr;
}
nsCOMPtr<nsIDocShellTreeItem> shellAsTreeItem = context->GetDocShell();
if (!shellAsTreeItem) {
return nullptr;
}
nsCOMPtr<nsIDocShellTreeOwner> owner;
shellAsTreeItem->GetTreeOwner(getter_AddRefs(owner));
if (!owner) {
return nullptr;
}
// now get the primary content shell (active tab)
nsCOMPtr<nsIDocShellTreeItem> item;
owner->GetPrimaryContentShell(getter_AddRefs(item));
nsCOMPtr<nsIDocShell> childDocShell = do_QueryInterface(item);
if (!childDocShell) {
return nullptr;
}
return childDocShell->GetDocument();
}
#endif
#ifdef DEBUG
void
PresShell::ShowEventTargetDebug()

View file

@ -755,9 +755,6 @@ protected:
virtual void SysColorChanged() override { mPresContext->SysColorChanged(); }
virtual void ThemeChanged() override { mPresContext->ThemeChanged(); }
virtual void BackingScaleFactorChanged() override { mPresContext->UIResolutionChanged(); }
#ifdef ANDROID
virtual nsIDocument* GetTouchEventTargetDocument() override;
#endif
virtual void PausePainting() override;
virtual void ResumePainting() override;

View file

@ -1,5 +1,4 @@
[DEFAULT]
skip-if = os == 'android'
support-files =
animated.gif
blue-32x32.png

View file

@ -1,6 +1,4 @@
[DEFAULT]
# Android: SLOW_DIRECTORY;
skip-if = toolkit == 'android'
support-files =
Ahem.ttf
border_radius_hit_testing_iframe.html
@ -224,23 +222,18 @@ support-files = file_bug607529.html
skip-if = e10s # bug 1020135, nested oop iframes not supported
support-files = bug921928_event_target_iframe_apps_oop.html
[test_mozPaintCount.html]
skip-if = toolkit == 'android'
[test_scroll_event_ordering.html]
[test_scroll_selection_into_view.html]
support-files=scroll_selection_into_view_window.html
[test_scroll_snapping.html]
skip-if = buildapp == 'android' # bug 1041833
[test_scroll_snapping_scrollbars.html]
skip-if = buildapp == 'android' # bug 1041833
[test_bug583889.html]
support-files = bug583889_inner1.html bug583889_inner2.html
[test_bug582771.html]
[test_bug968148.html]
support-files = bug968148_inner.html
[test_bug603550.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug629838.html]
skip-if = toolkit == 'android'
[test_bug646757.html]
[test_bug718809.html]
[test_bug725426.html]
@ -270,13 +263,12 @@ support-files =
# because of bug 469208.
[test_bug332655-1.html]
skip-if = toolkit == 'android'
[test_bug332655-2.html]
[test_bug499538-1.html]
[test_bug749186.html]
[test_bug644768.html]
[test_flush_on_paint.html]
skip-if = true || (toolkit == 'android') || (toolkit == "cocoa") # Bug 688128, bug 539356
skip-if = true || (toolkit == "cocoa") # Bug 688128, bug 539356
[test_getBoxQuads_convertPointRectQuad.html]
[test_bug687297.html]
support-files =
@ -294,7 +286,7 @@ support-files = bug1080361_inner.html
[test_bug1093686.html]
support-files = bug1093686_inner.html
[test_bug1120705.html]
skip-if = buildapp == 'android' || os == 'mac' || toolkit == 'gtk2' || toolkit == 'gtk3' # android does not have clickable scrollbars, mac does not have scrollbar down and up buttons, gtk may or may not have scrollbar buttons depending on theme
skip-if = os == 'mac' || toolkit == 'gtk2' || toolkit == 'gtk3' # mac does not have scrollbar down and up buttons, gtk may or may not have scrollbar buttons depending on theme
[test_bug1153130.html]
support-files = bug1153130_inner.html
[test_bug1162990.html]

View file

@ -189,20 +189,15 @@ var tests = [
function() {SpecialPowers.pushPrefEnv({'clear': [['layout.accessiblecaret.enabled']]}, nextTest);} ,
];
if (navigator.appVersion.indexOf("Android") == -1 &&
SpecialPowers.Services.appinfo.name != "B2G") {
tests.push([ 'bug512295-1.html' , 'bug512295-1-ref.html' ]);
tests.push([ 'bug512295-2.html' , 'bug512295-2-ref.html' ]);
tests.push([ 'bug923376.html' , 'bug923376-ref.html' ]);
tests.push(function() {SpecialPowers.pushPrefEnv({'set': [['layout.css.overflow-clip-box.enabled', true]]}, nextTest);});
tests.push([ 'bug966992-1.html' , 'bug966992-1-ref.html' ]);
tests.push([ 'bug966992-2.html' , 'bug966992-2-ref.html' ]);
tests.push([ 'bug966992-3.html' , 'bug966992-3-ref.html' ]);
tests.push(function() {SpecialPowers.pushPrefEnv({'clear': [['layout.css.overflow-clip-box.enabled']]}, nextTest);});
tests.push([ 'bug1258308-1.html' , 'bug1258308-1-ref.html' ]); // maybe VK_END doesn't work on Android?
} else {
is(SpecialPowers.getIntPref("layout.spellcheckDefault"), 0, "Spellcheck should be turned off for this platform or this if..else check removed");
}
tests.push([ 'bug512295-1.html' , 'bug512295-1-ref.html' ]);
tests.push([ 'bug512295-2.html' , 'bug512295-2-ref.html' ]);
tests.push([ 'bug923376.html' , 'bug923376-ref.html' ]);
tests.push(function() {SpecialPowers.pushPrefEnv({'set': [['layout.css.overflow-clip-box.enabled', true]]}, nextTest);});
tests.push([ 'bug966992-1.html' , 'bug966992-1-ref.html' ]);
tests.push([ 'bug966992-2.html' , 'bug966992-2-ref.html' ]);
tests.push([ 'bug966992-3.html' , 'bug966992-3-ref.html' ]);
tests.push(function() {SpecialPowers.pushPrefEnv({'clear': [['layout.css.overflow-clip-box.enabled']]}, nextTest);});
tests.push([ 'bug1258308-1.html' , 'bug1258308-1-ref.html' ]);
if (navigator.platform.indexOf("Linux") >= 0 &&
SpecialPowers.Services.appinfo.name != "B2G") {

View file

@ -67,11 +67,6 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
LOCAL_INCLUDES += [
'/dom/system/mac',
]
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
LOCAL_INCLUDES += [
'/dom/system',
'/dom/system/android',
]
elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
LOCAL_INCLUDES += [
'/widget/gtk',

View file

@ -116,9 +116,6 @@ using mozilla::dom::AudioChannelAgent;
#include "nsSystemPrincipal.h"
#include "nsNullPrincipal.h"
#include "nsNetCID.h"
#if defined(MOZ_WIDGET_ANDROID)
#include "nsHapticFeedback.h"
#endif
#include "nsParserUtils.h"
#include "nsHTMLCanvasFrame.h"
@ -253,9 +250,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(AudioChannelAgent)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceSensors)
#if defined(ANDROID)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHapticFeedback)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ThirdPartyUtil, Init)
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIPowerManagerService,
PowerManagerService::GetInstance)
@ -653,10 +647,6 @@ NS_DEFINE_NAMED_CID(NS_NULLPRINCIPAL_CID);
NS_DEFINE_NAMED_CID(THIRDPARTYUTIL_CID);
NS_DEFINE_NAMED_CID(NS_STRUCTUREDCLONECONTAINER_CID);
NS_DEFINE_NAMED_CID(NS_DEVICE_SENSORS_CID);
#if defined(ANDROID)
NS_DEFINE_NAMED_CID(NS_HAPTICFEEDBACK_CID);
#endif
NS_DEFINE_NAMED_CID(NS_POWERMANAGERSERVICE_CID);
NS_DEFINE_NAMED_CID(OSFILECONSTANTSSERVICE_CID);
NS_DEFINE_NAMED_CID(UDPSOCKETCHILD_CID);
@ -909,9 +899,6 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
{ &kNS_SYSTEMPRINCIPAL_CID, false, nullptr, nsSystemPrincipalConstructor },
{ &kNS_NULLPRINCIPAL_CID, false, nullptr, nsNullPrincipalConstructor },
{ &kNS_DEVICE_SENSORS_CID, false, nullptr, nsDeviceSensorsConstructor },
#if defined(ANDROID)
{ &kNS_HAPTICFEEDBACK_CID, false, nullptr, nsHapticFeedbackConstructor },
#endif
{ &kTHIRDPARTYUTIL_CID, false, nullptr, ThirdPartyUtilConstructor },
{ &kNS_STRUCTUREDCLONECONTAINER_CID, false, nullptr, nsStructuredCloneContainerConstructor },
{ &kNS_POWERMANAGERSERVICE_CID, false, nullptr, nsIPowerManagerServiceConstructor, Module::ALLOW_IN_GPU_PROCESS },
@ -1029,9 +1016,6 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
{ NS_SYSTEMPRINCIPAL_CONTRACTID, &kNS_SYSTEMPRINCIPAL_CID },
{ NS_NULLPRINCIPAL_CONTRACTID, &kNS_NULLPRINCIPAL_CID },
{ NS_DEVICE_SENSORS_CONTRACTID, &kNS_DEVICE_SENSORS_CID },
#if defined(ANDROID)
{ "@mozilla.org/widget/hapticfeedback;1", &kNS_HAPTICFEEDBACK_CID },
#endif
{ THIRDPARTYUTIL_CONTRACTID, &kTHIRDPARTYUTIL_CID },
{ NS_STRUCTUREDCLONECONTAINER_CONTRACTID, &kNS_STRUCTUREDCLONECONTAINER_CID },
{ POWERMANAGERSERVICE_CONTRACTID, &kNS_POWERMANAGERSERVICE_CID, Module::ALLOW_IN_GPU_PROCESS },

View file

@ -315,10 +315,7 @@ nsLayoutStatics::Initialize()
// creating the hidden DOM window to support some current stylo hacks. We
// should move initialization back here once those go away.
#ifndef MOZ_WIDGET_ANDROID
// On Android, we instantiate it when constructing AndroidBridge.
MediaPrefs::GetSingleton();
#endif
return NS_OK;
}

View file

@ -1,5 +1,4 @@
[DEFAULT]
skip-if = os == 'android'
support-files =
bug536567_iframe.html
bug536567_subframe.html

View file

@ -9,58 +9,44 @@ support-files =
[test_bug345267.html]
[test_bug346043.html]
[test_bug348236.html]
skip-if = toolkit == 'android' || e10s || os == 'mac' # mac(select form control popup behavior is different)
skip-if = toolkit == e10s || os == 'mac' # mac(select form control popup behavior is different)
[test_bug353539.html]
[test_bug365410.html]
[test_bug378670.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug402198.html]
[test_bug411236.html]
[test_bug446663.html]
skip-if = toolkit == 'android'
[test_bug476308.html]
[test_bug477531.html]
[test_bug477700.html]
[test_bug478219.xhtml]
skip-if = toolkit == 'android'
[test_bug534785.html]
[test_bug542914.html]
[test_bug549170.html]
[test_bug562447.html]
[test_bug563642.html]
[test_bug564115.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug571352.html]
skip-if = (os == 'mac' && os_version == '10.10') || toolkit == 'android' #TIMED_OUT # OS X 10.10 - bug 947690
skip-if = (os == 'mac' && os_version == '10.10') # OS X 10.10 - bug 947690
[test_bug572406.html]
[test_bug572649.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug595310.html]
[test_bug620936.html]
[test_bug644542.html]
skip-if = toolkit == 'android' #TIMED_OUT
[test_bug672810.html]
skip-if = toolkit == 'android'
[test_bug704049.html]
[test_bug717878_input_scroll.html]
[test_bug869314.html]
[test_bug903715.html]
skip-if = toolkit == 'android' || e10s #select elements don't use an in-page popup on Android
[test_bug935876.html]
# Bug 1023472 - Fails when pushed into a different chunk on Android
skip-if = toolkit == 'android'
[test_bug957562.html]
[test_bug960277.html]
[test_bug961363.html]
skip-if = toolkit == 'android' # Bug 1021644 - Fails when pushed into a different chunk on Android
[test_bug1111995.html]
[test_bug1301290.html]
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' # b2g(resizing textarea not available in b2g) b2g-debug(resizing textarea not available in b2g) b2g-desktop(resizing textarea not available in b2g)
[test_bug1305282.html]
[test_listcontrol_search.html]
skip-if = toolkit == 'android' #select elements don't use an in-page popup on Android
[test_select_prevent_default.html]
[test_select_vertical.html]
skip-if = e10s || toolkit == 'android' # Bug 1170129 - vertical <select> popup not implemented for e10s # <select> elements don't use an in-page popup on Android
skip-if = e10s # Bug 1170129 - vertical <select> popup not implemented for e10s
[test_textarea_resize.html]
skip-if = toolkit == 'android'

View file

@ -49,7 +49,6 @@ SimpleTest.waitForExplicitFinish();
const kIsWin = navigator.platform.indexOf("Win") == 0;
const kIsMac = navigator.platform.indexOf("Mac") == 0;
const kIsAndroid = navigator.appVersion.indexOf("Android") != 0;
function runTests()
{
@ -352,8 +351,7 @@ function runTests()
// Mac uses native popup for dropdown. Let's skip the tests for popup
// since it's not handled in nsListControlFrame.
// Similarly, Android doesn't use popup for dropdown.
if (kIsMac || kIsAndroid) {
if (kIsMac) {
finish();
return;
}

View file

@ -25,7 +25,7 @@ load 321224.xul
load 322780-1.xul
load 323381-1.html
load 323381-2.html
asserts-if(gtkWidget,1) asserts-if(Android&&asyncPan,1) load 323386-1.html # Bug 718883
asserts-if(gtkWidget,1) load 323386-1.html # Bug 718883
load 323389-1.html
load 323389-2.html
load 323493-1.html
@ -310,7 +310,7 @@ load 455171-3.html
load 455643-1.xhtml
load 457375.html
load 457380-1.html
asserts-if(!Android,4) load 459968.html # bug 1067022
asserts(4) load 459968.html # bug 1067022
load 460910-1.xml
load 461294-1.html
load 462968.xhtml
@ -345,7 +345,7 @@ load 477928.html
load 478131-1.html
load 478170-1.html
load 478185-1.html
asserts-if(!Android,0-1) load 479938-1.html # Bug 575011
asserts(0-1) load 479938-1.html # Bug 575011
load 480345-1.html
load 481921.html
load 489462-1.html
@ -473,8 +473,8 @@ load 700031.xhtml
load 718516.html
load 723108.html
load 724235.html
skip-if(Android&&isDebugBuild) load 724978.xhtml # bug 1263300 - slow
skip-if(Android&&isDebugBuild) load 730559.html # bug 1245634 - slow
load 724978.xhtml
load 730559.html
load 734777.html
load 737313-1.html
load 737313-2.html
@ -500,7 +500,7 @@ load 786740-1.html
load 790260-1.html
asserts(1) test-pref(font.size.inflation.emPerLine,15) load 791601.xhtml # Bug 871327
test-pref(font.size.inflation.minTwips,120) load 794693.html
asserts-if(!Android,4) load 798020-1.html
asserts(4) load 798020-1.html
load 798235-1.html
load 799207-1.html
load 799207-2.html
@ -532,7 +532,7 @@ load 842166.html
load 844529-1.html
load 847130.xhtml
load 847208.html
asserts-if(Android,2) asserts-if(Android&&asyncPan,4) asserts-if(!Android,4) load 847209.html # bug 847368
asserts(4) load 847209.html # bug 847368
load 847211-1.html
load 849603.html
asserts(0-12) load 850931.html # bug 569193
@ -558,7 +558,7 @@ asserts(2-8) load 944909-1.html
load 946167-1.html
load 947158.html
load 949932.html
asserts-if(Android,0-1) load 964078.html # bug 989718
load 964078.html
load 970710.html
load 973701-1.xhtml
load 973701-2.xhtml
@ -626,7 +626,7 @@ load text-overflow-bug671796.xhtml
load text-overflow-bug713610.html
load text-overflow-form-elements.html
load text-overflow-iframe.html
asserts-if(Android,2-4) asserts-if(!Android,4) load 1225005.html # bug 682647 and bug 448083
asserts(4) load 1225005.html # bug 682647 and bug 448083
load 1233191.html
asserts(2) load 1272983-1.html # bug 586628
asserts(2) load 1272983-2.html # bug 586628

View file

@ -1266,21 +1266,6 @@ ScrollFrameHelper::HandleScrollbarStyleSwitching()
}
}
#if defined(MOZ_WIDGET_ANDROID)
static bool IsFocused(nsIContent* aContent)
{
// Some content elements, like the GetContent() of a scroll frame
// for a text input field, are inside anonymous subtrees, but the focus
// manager always reports a non-anonymous element as the focused one, so
// walk up the tree until we reach a non-anonymous element.
while (aContent && aContent->IsInAnonymousSubtree()) {
aContent = aContent->GetParent();
}
return aContent ? nsContentUtils::IsFocusedContent(aContent) : false;
}
#endif
void
ScrollFrameHelper::SetScrollableByAPZ(bool aScrollable)
{
@ -1315,12 +1300,8 @@ ScrollFrameHelper::WantAsyncScroll() const
bool isHScrollable = (scrollRange.width >= oneDevPixel) &&
(styles.mHorizontal != NS_STYLE_OVERFLOW_HIDDEN);
#if defined(MOZ_WIDGET_ANDROID)
// Mobile platforms need focus to scroll.
bool canScrollWithoutScrollbars = IsFocused(mOuter->GetContent());
#else
// Desktop platforms don't need focus to scroll.
bool canScrollWithoutScrollbars = true;
#endif
// The check for scroll bars was added in bug 825692 to prevent layerization
// of text inputs for performance reasons.

View file

@ -84,11 +84,6 @@ using mozilla::DefaultXDisplay;
#include <winuser.h>
#endif
#ifdef MOZ_WIDGET_ANDROID
#include "AndroidBridge.h"
#include "GLContext.h"
#endif
#include "mozilla/dom/TabChild.h"
#include "ClientLayerManager.h"
@ -938,55 +933,6 @@ nsDisplayPluginReadback::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap)
return GetDisplayItemBounds(aBuilder, this, mFrame);
}
#ifdef MOZ_WIDGET_ANDROID
class nsDisplayPluginVideo : public nsDisplayItem {
public:
nsDisplayPluginVideo(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame, nsNPAPIPluginInstance::VideoInfo* aVideoInfo)
: nsDisplayItem(aBuilder, aFrame), mVideoInfo(aVideoInfo)
{
MOZ_COUNT_CTOR(nsDisplayPluginVideo);
}
#ifdef NS_BUILD_REFCNT_LOGGING
virtual ~nsDisplayPluginVideo() {
MOZ_COUNT_DTOR(nsDisplayPluginVideo);
}
#endif
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder,
bool* aSnap) override;
NS_DISPLAY_DECL_NAME("PluginVideo", TYPE_PLUGIN_VIDEO)
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
LayerManager* aManager,
const ContainerLayerParameters& aContainerParameters) override
{
return static_cast<nsPluginFrame*>(mFrame)->BuildLayer(aBuilder, aManager, this, aContainerParameters);
}
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
LayerManager* aManager,
const ContainerLayerParameters& aParameters) override
{
return LAYER_ACTIVE;
}
nsNPAPIPluginInstance::VideoInfo* VideoInfo() { return mVideoInfo; }
private:
nsNPAPIPluginInstance::VideoInfo* mVideoInfo;
};
nsRect
nsDisplayPluginVideo::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap)
{
*aSnap = false;
return GetDisplayItemBounds(aBuilder, this, mFrame);
}
#endif
nsRect
nsDisplayPlugin::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap)
{
@ -1138,9 +1084,6 @@ nsPluginFrame::IsOpaque() const
{
#if defined(XP_MACOSX)
return false;
#elif defined(MOZ_WIDGET_ANDROID)
// We don't know, so just assume transparent
return false;
#else
if (mInstanceOwner && mInstanceOwner->UseAsyncRendering()) {
@ -1239,29 +1182,12 @@ nsPluginFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsDisplayItem::ForceActiveLayers()) {
state = LAYER_ACTIVE;
}
// We don't need this on Android, and it just confuses things
#if !MOZ_WIDGET_ANDROID
if (aBuilder->IsPaintingToWindow() &&
state == LAYER_ACTIVE &&
IsTransparentMode()) {
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayPluginReadback(aBuilder, this));
}
#endif
#if MOZ_WIDGET_ANDROID
if (aBuilder->IsPaintingToWindow() &&
state == LAYER_ACTIVE) {
nsTArray<nsNPAPIPluginInstance::VideoInfo*> videos;
mInstanceOwner->GetVideos(videos);
for (uint32_t i = 0; i < videos.Length(); i++) {
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayPluginVideo(aBuilder, this, videos[i]));
}
}
#endif
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayPlugin(aBuilder, this));
@ -1399,10 +1325,6 @@ nsPluginFrame::GetLayerState(nsDisplayListBuilder* aBuilder,
if (!mInstanceOwner)
return LAYER_NONE;
#ifdef MOZ_WIDGET_ANDROID
// We always want a layer on Honeycomb and later
return LAYER_ACTIVE;
#else
if (mInstanceOwner->NeedsScrollImageLayer()) {
return LAYER_ACTIVE;
}
@ -1412,7 +1334,6 @@ nsPluginFrame::GetLayerState(nsDisplayListBuilder* aBuilder,
}
return LAYER_ACTIVE_FORCE;
#endif
}
class PluginFrameDidCompositeObserver final : public ClientLayerManager::
@ -1529,32 +1450,6 @@ nsPluginFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
}
lm->AddDidCompositeObserver(mDidCompositeObserver.get());
}
#ifdef MOZ_WIDGET_ANDROID
} else if (aItem->GetType() == nsDisplayItem::TYPE_PLUGIN_VIDEO) {
nsDisplayPluginVideo* videoItem = reinterpret_cast<nsDisplayPluginVideo*>(aItem);
nsNPAPIPluginInstance::VideoInfo* videoInfo = videoItem->VideoInfo();
RefPtr<ImageContainer> container = mInstanceOwner->GetImageContainerForVideo(videoInfo);
if (!container)
return nullptr;
if (!layer) {
// Initialize ImageLayer
layer = aManager->CreateImageLayer();
if (!layer)
return nullptr;
}
ImageLayer* imglayer = static_cast<ImageLayer*>(layer.get());
imglayer->SetContainer(container);
layer->SetContentFlags(IsOpaque() ? Layer::CONTENT_OPAQUE : 0);
// Set the offset and size according to the video dimensions
r.MoveBy(videoInfo->mDimensions.TopLeft());
size.width = videoInfo->mDimensions.width;
size.height = videoInfo->mDimensions.height;
#endif
} else {
NS_ASSERTION(aItem->GetType() == nsDisplayItem::TYPE_PLUGIN_READBACK,
"Unknown item type");
@ -1603,20 +1498,7 @@ nsPluginFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
nsRenderingContext& aRenderingContext,
const nsRect& aDirtyRect, const nsRect& aPluginRect)
{
#if defined(MOZ_WIDGET_ANDROID)
if (mInstanceOwner) {
gfxRect frameGfxRect =
PresContext()->AppUnitsToGfxUnits(aPluginRect);
gfxRect dirtyGfxRect =
PresContext()->AppUnitsToGfxUnits(aDirtyRect);
gfxContext* ctx = aRenderingContext.ThebesContext();
mInstanceOwner->Paint(ctx, frameGfxRect, dirtyGfxRect);
return;
}
#else
# if defined(DEBUG)
#if defined(DEBUG)
// On Desktop, we should have built a layer as we no longer support in-process
// plugins or synchronous painting. We can only get here for windowed plugins
// (which draw themselves), or via some error/unload state.
@ -1625,7 +1507,6 @@ nsPluginFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
mInstanceOwner->GetWindow(window);
MOZ_ASSERT(!window || window->type == NPWindowTypeWindow);
}
# endif
#endif
}

View file

@ -1,5 +1,4 @@
[DEFAULT]
skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM, ONLY IN CHUNK 10
support-files =
../../reftests/backgrounds/blue-32x32.png
../../reftests/backgrounds/fuchsia-32x32.png

View file

@ -1,5 +1,4 @@
[DEFAULT]
skip-if = os == 'android'
support-files = GentiumPlus-R.woff
[test_bug467669.css]

View file

@ -1004,7 +1004,7 @@ nsPrintEngine::GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings
nsresult
nsPrintEngine::CheckForPrinters(nsIPrintSettings* aPrintSettings)
{
#if defined(XP_MACOSX) || defined(ANDROID)
#if defined(XP_MACOSX)
// Mac doesn't support retrieving a printer list.
return NS_OK;
#else

View file

@ -1,69 +0,0 @@
# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
== font-size-wrap.html font-size-wrap.html
== abs-pos-auto-margin-1.html abs-pos-auto-margin-1.html
fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,73,1) == auto-offset-inline-block-1.html auto-offset-inline-block-1.html
# bug 696670
== fieldset-1.html fieldset-1.html
== table-1.html table-1.html
== table-2.html table-2.html
== table-3.html table-3.html
== table-caption-1.html table-caption-1.html
== table-caption-2.html table-caption-2.html
== table-caption-3.html table-caption-3.html
== table-caption-4.html table-caption-4.html
skip-if((B2G&&browserIsRemote)||Mulet) == table-caption-5.html table-caption-5.html
# TODO: change to == when bug 967870 is is
# Initial mulet triage: parity with B2G/B2G Desktop
== table-cell-1.html table-cell-1.html
== table-cell-2.html table-cell-2.html
== table-cell-3.html table-cell-3.html
== table-cell-4.html table-cell-4.html
== table-cell-5.html table-cell-5.html
== table-cell-6.html table-cell-6.html
== table-cell-7.html table-cell-7.html
skip-if((B2G&&browserIsRemote)||Mulet) == table-cell-8.html table-cell-8.html
# TODO: change to == when bug 967870 is is
# Initial mulet triage: parity with B2G/B2G Desktop
== table-row-1.html table-row-1.html
== table-row-2.html table-row-2.html
== table-row-3.html table-row-3.html
== table-row-4.html table-row-4.html
== table-row-5.html table-row-5.html
== table-row-6.html table-row-6.html
== table-row-7.html table-row-7.html
== table-row-group-1.html table-row-group-1.html
== table-row-group-2.html table-row-group-2.html
== table-row-group-3.html table-row-group-3.html
== table-row-group-4.html table-row-group-4.html
== table-row-group-5.html table-row-group-5.html
== table-row-group-6.html table-row-group-6.html
== table-row-group-7.html table-row-group-7.html
== table-header-group-1.html table-header-group-1.html
== table-header-group-2.html table-header-group-2.html
== table-header-group-3.html table-header-group-3.html
== table-header-group-4.html table-header-group-4.html
== table-header-group-5.html table-header-group-5.html
== table-header-group-6.html table-header-group-6.html
== table-header-group-7.html table-header-group-7.html
# == table-footer-group-1.html table-footer-group-1.html
== table-footer-group-2.html table-footer-group-2.html
== table-footer-group-3.html table-footer-group-3.html
== table-footer-group-4.html table-footer-group-4.html
== table-footer-group-5.html table-footer-group-5.html
== table-footer-group-6.html table-footer-group-6.html
== table-footer-group-7.html table-footer-group-7.html
== continuation-positioned-inline-1.html continuation-positioned-inline-1.html
== continuation-positioned-inline-2.html continuation-positioned-inline-2.html
== scrollframe-1.html scrollframe-1.html
fails == scrollframe-2.html scrollframe-2-ref.html #bug #bug
# Initial mulet triage: parity with B2G/B2G Desktop
fuzzy-if(gtkWidget,1,8) == select-1.html select-1.html
fails fuzzy-if(gtkWidget,1,8) == select-1-dynamic.html select-1-dynamic.html
== select-2.html select-2.html
fuzzy-if(gtkWidget,1,19) fuzzy-if(Android||B2G,17,726) fuzzy-if(asyncPan&&!layersGPUAccelerated,102,98) fuzzy-if(browserIsRemote&&winWidget,102,107) == select-3.html select-3.html
== multi-column-1.html multi-column-1.html
== button-1.html button-1.html
== button-2.html button-2.html
== relative-row-animation-1.html relative-row-animation-1.html
fuzzy-if(Android,12,50) == fixed-pos-auto-offset-1a.html fixed-pos-auto-offset-1a.html
fuzzy-if(Android,12,50) == fixed-pos-auto-offset-1b.html fixed-pos-auto-offset-1b.html

View file

@ -49,14 +49,14 @@ fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azur
== continuation-positioned-inline-1.html continuation-positioned-inline-ref.html
== continuation-positioned-inline-2.html continuation-positioned-inline-ref.html
== scrollframe-1.html scrollframe-1-ref.html
fuzzy-if(gtkWidget,1,1) fuzzy-if(Android,9,185) fuzzy-if(asyncPan&&!layersGPUAccelerated,140,144) == scrollframe-2.html scrollframe-2-ref.html #bug 756530
fuzzy-if(gtkWidget,1,1) fuzzy-if(asyncPan&&!layersGPUAccelerated,140,144) == scrollframe-2.html scrollframe-2-ref.html #bug 756530
fuzzy-if(gtkWidget,1,8) == select-1.html select-1-ref.html
fuzzy-if(gtkWidget,1,8) == select-1-dynamic.html select-1-ref.html
== select-2.html select-2-ref.html
fuzzy-if(gtkWidget,1,19) fuzzy-if(Android,17,726) fuzzy-if(asyncPan&&!layersGPUAccelerated,110,114) fuzzy-if(browserIsRemote&&winWidget,110,114) == select-3.html select-3-ref.html
fuzzy-if(gtkWidget,1,19) fuzzy-if(asyncPan&&!layersGPUAccelerated,110,114) fuzzy-if(browserIsRemote&&winWidget,110,114) == select-3.html select-3-ref.html
== multi-column-1.html multi-column-1-ref.html
== button-1.html button-1-ref.html
== button-2.html button-2-ref.html
== relative-row-animation-1.html relative-row-animation-1-ref.html
fuzzy-if(Android,12,50) == fixed-pos-auto-offset-1a.html fixed-pos-auto-offset-1-ref.html
fuzzy-if(Android,12,50) == fixed-pos-auto-offset-1b.html fixed-pos-auto-offset-1-ref.html
== fixed-pos-auto-offset-1a.html fixed-pos-auto-offset-1-ref.html
== fixed-pos-auto-offset-1b.html fixed-pos-auto-offset-1-ref.html

View file

@ -1,59 +0,0 @@
# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
skip-if(!asyncPan) == bg-fixed-1.html bg-fixed-1.html
skip-if(!asyncPan) == bg-fixed-cover-1.html bg-fixed-cover-1.html
skip-if(!asyncPan) == bg-fixed-cover-2.html bg-fixed-cover-2.html
skip-if(!asyncPan) == bg-fixed-cover-3.html bg-fixed-cover-3.html
skip-if(!asyncPan) == bg-fixed-child.html bg-fixed-child.html
skip-if(!asyncPan) == bg-fixed-child-clip-1.html bg-fixed-child-clip-1.html
skip-if(!asyncPan) == bg-fixed-child-clip-2.html bg-fixed-child-clip-2.html
fuzzy(1,246) fuzzy-if(skiaContent,2,160) fuzzy-if(browserIsRemote&&d2d,53,185) skip-if(!asyncPan) == bg-fixed-child-mask.html bg-fixed-child-mask.html
skip-if(!asyncPan) == bg-fixed-in-opacity.html bg-fixed-in-opacity.html
skip-if(!asyncPan) == bg-fixed-child-no-culling.html bg-fixed-child-no-culling.html
skip fuzzy-if(B2G,2,5366) fuzzy-if(Android,2,4000) fuzzy-if(browserIsRemote&&cocoaWidget,2,179524) fuzzy-if(browserIsRemote&&winWidget,1,74590) skip-if(!asyncPan) == bg-fixed-transformed-image.html bg-fixed-transformed-image.html
skip-if(!asyncPan) == element-1.html element-1.html
pref(layers.force-active,true) skip-if(!asyncPan) == iframe-1.html iframe-1.html
skip-if(!asyncPan) == nested-1.html nested-1.html
skip-if(!asyncPan) == nested-2.html nested-2.html
skip-if(!asyncPan) == position-fixed-1.html position-fixed-1.html
skip-if(!asyncPan) == position-fixed-2.html position-fixed-2.html
skip-if(!asyncPan) == position-fixed-body.html position-fixed-body.html
skip-if(!asyncPan) == position-fixed-cover-1.html position-fixed-cover-1.html
skip-if(!asyncPan) == position-fixed-cover-2.html position-fixed-cover-2.html
skip-if(!asyncPan) == position-fixed-cover-3.html position-fixed-cover-3.html
fuzzy-if(Android,5,4) skip-if(!asyncPan) == position-fixed-transformed-1.html position-fixed-transformed-1.html
skip-if(!asyncPan) == split-layers-1.html split-layers-1.html
skip-if(!asyncPan) == split-layers-multi-scrolling-1.html split-layers-multi-scrolling-1.html
fuzzy-if(skiaContent,2,240000) fuzzy-if(browserIsRemote&&!skiaContent&&(cocoaWidget||winWidget),1,240000) skip-if(!asyncPan) == split-opacity-layers-1.html split-opacity-layers-1.html
skip-if(!asyncPan) == sticky-pos-scrollable-1.html sticky-pos-scrollable-1.html
skip-if(!asyncPan) == fixed-pos-scrollable-1.html fixed-pos-scrollable-1.html
skip-if(!asyncPan) == culling-1.html culling-1.html
skip-if(!asyncPan) == position-fixed-iframe-1.html position-fixed-iframe-1.html
skip-if(!asyncPan) == position-fixed-iframe-2.html position-fixed-iframe-2.html
fuzzy-if(skiaContent||(browserIsRemote&&cocoaWidget),1,10000) skip-if(!asyncPan) == position-fixed-in-scroll-container.html position-fixed-in-scroll-container.html
skip-if(!asyncPan) == position-fixed-inside-sticky-1.html position-fixed-inside-sticky-1.html
skip-if(!asyncPan) == group-opacity-surface-size-1.html group-opacity-surface-size-1.html
skip-if(!asyncPan) == position-sticky-transformed.html position-sticky-transformed.html
skip-if(!asyncPan) == offscreen-prerendered-active-opacity.html offscreen-prerendered-active-opacity.html
fuzzy-if(Android,6,4) skip-if(!asyncPan) == offscreen-clipped-blendmode-1.html offscreen-clipped-blendmode-1.html
fuzzy-if(Android,6,4) skip-if(!asyncPan) == offscreen-clipped-blendmode-2.html offscreen-clipped-blendmode-2.html
fuzzy-if(Android,6,4) skip == offscreen-clipped-blendmode-3.html offscreen-clipped-blendmode-3.html
# bug 1251588 - wrong AGR on mix-blend-mode item
fuzzy-if(Android,6,4) skip-if(!asyncPan) == offscreen-clipped-blendmode-4.html offscreen-clipped-blendmode-4.html
fuzzy-if(Android,7,4) skip-if(!asyncPan) == perspective-scrolling-1.html perspective-scrolling-1.html
fuzzy-if(Android,7,4) skip-if(!asyncPan) == perspective-scrolling-2.html perspective-scrolling-2.html
fuzzy-if(Android,7,4) skip-if(!asyncPan) == perspective-scrolling-3.html perspective-scrolling-3.html
fuzzy-if(Android,7,4) skip-if(!asyncPan) == perspective-scrolling-4.html perspective-scrolling-4.html
pref(apz.disable_for_scroll_linked_effects,true) skip-if(!asyncPan) == disable-apz-for-sle-pages.html disable-apz-for-sle-pages.html
fuzzy-if(browserIsRemote&&d2d,1,19) skip-if(!asyncPan) == background-blend-mode-1.html background-blend-mode-1.html
skip-if(Android||!asyncPan) == opaque-fractional-displayport-1.html opaque-fractional-displayport-1.html
skip-if(Android||!asyncPan) == opaque-fractional-displayport-2.html opaque-fractional-displayport-2.html
# for the following tests, we want to disable the low-precision buffer
# as it will expand the displayport beyond what the test specifies in
# its reftest-displayport attributes, and interfere with where we expect
# checkerboarding to occur
default-preferences pref(layers.low-precision-buffer,false)
skip-if(!asyncPan) == checkerboard-1.html checkerboard-1.html
skip-if(!asyncPan) == checkerboard-2.html checkerboard-2.html
skip-if(!asyncPan) == checkerboard-3.html checkerboard-3.html
default-preferences

View file

@ -9,7 +9,7 @@ fuzzy(1,246) fuzzy-if(skiaContent,2,160) fuzzy-if(browserIsRemote&&d2d,53,185) s
skip-if(!asyncPan) == bg-fixed-in-opacity.html bg-fixed-in-opacity-ref.html
skip-if(!asyncPan) == bg-fixed-child-no-culling-1.html bg-fixed-child-no-culling-1-ref.html
skip-if(!asyncPan) == bg-fixed-child-no-culling-2.html bg-fixed-child-no-culling-2-ref.html
fuzzy-if(Android,2,4000) fuzzy-if(browserIsRemote&&cocoaWidget,2,179524) fuzzy-if(browserIsRemote&&winWidget,1,74590) fuzzy-if(gtkWidget&&layersGPUAccelerated,1,3528) skip-if(!asyncPan) == bg-fixed-transformed-image.html bg-fixed-transformed-image-ref.html
fuzzy-if(browserIsRemote&&cocoaWidget,2,179524) fuzzy-if(browserIsRemote&&winWidget,1,74590) fuzzy-if(gtkWidget&&layersGPUAccelerated,1,3528) skip-if(!asyncPan) == bg-fixed-transformed-image.html bg-fixed-transformed-image-ref.html
skip-if(!asyncPan) == element-1.html element-1-ref.html
pref(layers.force-active,true) skip-if(!asyncPan) == iframe-1.html iframe-1-ref.html
skip-if(!asyncPan) == nested-1.html nested-1-ref.html
@ -20,7 +20,7 @@ skip-if(!asyncPan) == position-fixed-body.html position-fixed-body-ref.html
skip-if(!asyncPan) == position-fixed-cover-1.html position-fixed-cover-1-ref.html
skip-if(!asyncPan) == position-fixed-cover-2.html position-fixed-cover-2-ref.html
skip-if(!asyncPan) == position-fixed-cover-3.html position-fixed-cover-3-ref.html
fuzzy-if(Android,5,4) skip-if(!asyncPan) == position-fixed-transformed-1.html position-fixed-transformed-1-ref.html
skip-if(!asyncPan) == position-fixed-transformed-1.html position-fixed-transformed-1-ref.html
skip-if(!asyncPan) == split-layers-1.html split-layers-1-ref.html
skip-if(!asyncPan) == split-layers-multi-scrolling-1.html split-layers-multi-scrolling-1-ref.html
fuzzy-if(skiaContent,2,240000) fuzzy-if(browserIsRemote&&!skiaContent&&(cocoaWidget||winWidget),1,240000) skip-if(!asyncPan) == split-opacity-layers-1.html split-opacity-layers-1-ref.html
@ -37,18 +37,18 @@ skip-if(!asyncPan) == position-fixed-inside-sticky-2.html position-fixed-inside-
fuzzy(1,60000) skip-if(!asyncPan) == group-opacity-surface-size-1.html group-opacity-surface-size-1-ref.html
skip-if(!asyncPan) == position-sticky-transformed.html position-sticky-transformed-ref.html
skip-if(!asyncPan) == offscreen-prerendered-active-opacity.html offscreen-prerendered-active-opacity-ref.html
fuzzy-if(Android,6,4) fuzzy-if(skiaContent&&!Android,1,34) skip-if(!asyncPan) == offscreen-clipped-blendmode-1.html offscreen-clipped-blendmode-ref.html
fuzzy-if(Android,6,4) skip-if(!asyncPan) == offscreen-clipped-blendmode-2.html offscreen-clipped-blendmode-ref.html
fuzzy-if(Android,6,4) skip == offscreen-clipped-blendmode-3.html offscreen-clipped-blendmode-ref.html # bug 1251588 - wrong AGR on mix-blend-mode item
fuzzy-if(Android,6,4) skip-if(!asyncPan) == offscreen-clipped-blendmode-4.html offscreen-clipped-blendmode-ref.html
fuzzy-if(Android,7,4) skip-if(!asyncPan) == perspective-scrolling-1.html perspective-scrolling-1-ref.html
fuzzy-if(Android,7,4) skip-if(!asyncPan) == perspective-scrolling-2.html perspective-scrolling-2-ref.html
fuzzy-if(Android,7,4) skip-if(!asyncPan) == perspective-scrolling-3.html perspective-scrolling-3-ref.html
fuzzy-if(Android,7,4) skip-if(!asyncPan) == perspective-scrolling-4.html perspective-scrolling-4-ref.html
fuzzy-if(skiaContent,1,34) skip-if(!asyncPan) == offscreen-clipped-blendmode-1.html offscreen-clipped-blendmode-ref.html
skip-if(!asyncPan) == offscreen-clipped-blendmode-2.html offscreen-clipped-blendmode-ref.html
skip == offscreen-clipped-blendmode-3.html offscreen-clipped-blendmode-ref.html # bug 1251588 - wrong AGR on mix-blend-mode item
skip-if(!asyncPan) == offscreen-clipped-blendmode-4.html offscreen-clipped-blendmode-ref.html
skip-if(!asyncPan) == perspective-scrolling-1.html perspective-scrolling-1-ref.html
skip-if(!asyncPan) == perspective-scrolling-2.html perspective-scrolling-2-ref.html
skip-if(!asyncPan) == perspective-scrolling-3.html perspective-scrolling-3-ref.html
skip-if(!asyncPan) == perspective-scrolling-4.html perspective-scrolling-4-ref.html
pref(apz.disable_for_scroll_linked_effects,true) skip-if(!asyncPan) == disable-apz-for-sle-pages.html disable-apz-for-sle-pages-ref.html
fuzzy-if(browserIsRemote&&d2d,1,19) skip-if(!asyncPan) == background-blend-mode-1.html background-blend-mode-1-ref.html
skip-if(Android||!asyncPan) != opaque-fractional-displayport-1.html about:blank
skip-if(Android||!asyncPan) != opaque-fractional-displayport-2.html about:blank
skip-if(!asyncPan) != opaque-fractional-displayport-1.html about:blank
skip-if(!asyncPan) != opaque-fractional-displayport-2.html about:blank
# for the following tests, we want to disable the low-precision buffer
# as it will expand the displayport beyond what the test specifies in

View file

@ -52,10 +52,7 @@ function handleRequest(request, response)
// Test url looks like:
// http://localhost:port/timestamp/number/background-referrer.html
// Except in Android, where it looks like:
// http://A.B.C.D:port/timestamp/number/background-referrer.html
// where A.B.C.D is the IP address of the box the reftest HTTP server is
// running on. And maybe that will change. So just test for ending in
// Maybe that will change. So just test for ending in
// "/background-referrer.html".
if (/\/background-referrer.html$/.test(referrer))
{

View file

@ -1,4 +0,0 @@
# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
== scaled-color-stop-position.html scaled-color-stop-position.html
== color-stop-clamp-interpolation.html color-stop-clamp-interpolation.html
== linear-gradient-repeated.html linear-gradient-repeated.html

View file

@ -1,215 +0,0 @@
# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
include gradient/reftest-stylo.list
include vector/reftest-stylo.list
skip-if(B2G||Mulet) == layers-stacking-order.xhtml layers-stacking-order.xhtml
# Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) == layers-layer-count-cascade-1.xhtml layers-layer-count-cascade-1.xhtml
# Initial mulet triage: parity with B2G/B2G Desktop
== layers-layer-count-inheritance-1.xhtml layers-layer-count-inheritance-1.xhtml
== layers-layer-count-cascade-2.xhtml layers-layer-count-cascade-2.xhtml
== layers-layer-count-inheritance-2.xhtml layers-layer-count-inheritance-2.xhtml
fuzzy-if(Android,9,600000) fuzzy-if(skiaContent,1,5000) == viewport-translucent-color-1.html viewport-translucent-color-1.html
fuzzy-if(skiaContent,1,5000) == viewport-translucent-color-2.html viewport-translucent-color-2.html
fuzzy-if(skiaContent,1,5000) == viewport-translucent-color-3.html viewport-translucent-color-3.html
== viewport-translucent-color-ref.html viewport-translucent-color-ref.html
fuzzy-if(skiaContent,1,10000) == iframe-translucent-color-1.html iframe-translucent-color-1.html
fuzzy-if(skiaContent,1,1024) == translucent-color-1.html translucent-color-1.html
fuzzy-if(skiaContent,1,1024) == translucent-color-2.html translucent-color-2.html
fuzzy-if(skiaContent,1,1024) == translucent-color-3.html translucent-color-3.html
== translucent-color-ref.html translucent-color-ref.html
skip-if(B2G||Mulet) == root-element-display-none-1.html root-element-display-none-1.html
# Initial mulet triage: parity with B2G/B2G Desktop
== continuous-inline-1a.html continuous-inline-1a.html
== continuous-inline-1b.html continuous-inline-1b.html
== continuous-inline-1c.html continuous-inline-1c.html
== continuous-inline-1d.html continuous-inline-1d.html
== continuous-inline-2a.html continuous-inline-2a.html
== continuous-inline-2b.html continuous-inline-2b.html
== continuous-inline-3.html continuous-inline-3.html
skip-if(B2G||Mulet) == continuous-inline-4a.html continuous-inline-4a.html
# Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) == continuous-inline-4b.html continuous-inline-4b.html
# Initial mulet triage: parity with B2G/B2G Desktop
== continuous-inline-5a.html continuous-inline-5a.html
== continuous-inline-5b.html continuous-inline-5b.html
== background-redraw-237766.html background-redraw-237766.html
== background-clip-1.html background-clip-1.html
== background-clip-2.html background-clip-2.html
skip-if(B2G||Mulet) == background-position-1a.html background-position-1a.html
# Initial mulet triage: parity with B2G/B2G Desktop
== background-position-1b.html background-position-1b.html
== background-position-1c.html background-position-1c.html
skip-if(B2G||Mulet) == background-position-1d.html background-position-1d.html
# Initial mulet triage: parity with B2G/B2G Desktop
== background-position-1e.html background-position-1e.html
== background-position-1f.html background-position-1f.html
== background-position-2a.html background-position-2a.html
== background-position-2b.html background-position-2b.html
== background-position-2c.html background-position-2c.html
== background-position-2d.html background-position-2d.html
== background-position-3a.html background-position-3a.html
== background-position-3b.html background-position-3b.html
== background-position-3c.html background-position-3c.html
== background-position-3d.html background-position-3d.html
== background-position-4a.html background-position-4a.html
== background-position-4b.html background-position-4b.html
== background-position-4c.html background-position-4c.html
== background-position-4d.html background-position-4d.html
== background-position-4e.html background-position-4e.html
== background-position-5.html background-position-5.html
== background-position-6a.html background-position-6a.html
== background-position-6b.html background-position-6b.html
== background-position-7.html background-position-7.html
== background-position-8.html background-position-8.html
== background-size-auto-auto.html background-size-auto-auto.html
== background-size-auto.html background-size-auto.html
== background-size-contain.html background-size-contain.html
== background-size-cover.html background-size-cover.html
== background-size-auto-length.html background-size-auto-length.html
== background-size-length-auto.html background-size-length-auto.html
== background-size-length.html background-size-length.html
== background-size-auto-percent.html background-size-auto-percent.html
== background-size-percent-auto.html background-size-percent-auto.html
== background-size-percent.html background-size-percent.html
== background-size-length-percent.html background-size-length-percent.html
== background-size-percent-length.html background-size-percent-length.html
== background-size-percent-percent.html background-size-percent-percent.html
== background-size-length-length.html background-size-length-length.html
skip-if(B2G||Mulet) == background-size-percent-percent-stretch.html background-size-percent-percent-stretch.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== background-size-body-percent-percent.html background-size-body-percent-percent.html
== background-size-body-percent-percent-no-repeat.html background-size-body-percent-percent-no-repeat.html
== background-size-body-percent-percent-not-fixed.html background-size-body-percent-percent-not-fixed.html
== background-size-body-cover.html background-size-body-cover.html
== background-size-body-cover-no-repeat.html background-size-body-cover-no-repeat.html
== background-size-body-cover-not-fixed.html background-size-body-cover-not-fixed.html
== background-size-body-cover-not-fixed.html background-size-body-cover-not-fixed.html
# relies on reftest window having greater height than width
== background-size-body-contain.html background-size-body-contain.html
== background-size-body-contain-no-repeat.html background-size-body-contain-no-repeat.html
== background-size-body-contain-not-fixed.html background-size-body-contain-not-fixed.html
== background-size-body-cover-not-fixed.html background-size-body-cover-not-fixed.html
== background-size-body-percent-percent-overflow.html background-size-body-percent-percent-overflow.html
== background-size-zoom-no-repeat.html background-size-zoom-no-repeat.html
== background-size-contain-clip-padding.html background-size-contain-clip-padding.html
== background-size-contain-clip-border.html background-size-contain-clip-border.html
== background-size-contain-position-fifty-fifty.html background-size-contain-position-fifty-fifty.html
== background-size-contain-clip-padding-origin-border.html background-size-contain-clip-padding-origin-border.html
== background-size-contain-clip-padding-origin-border-padding.html background-size-contain-clip-padding-origin-border-padding.html
skip-if(B2G||Mulet) == background-layers-1a.html background-layers-1a.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
fuzzy-if(OSX,1,324) == background-layers-1b.html background-layers-1b.html
# box-decoration-break's effect on backgrounds is touchy and hard to test due to stretching
# artifacts and the difficulty of covering exact lines, so just make sure
# background-size results in a different rendering when present.
pref(layout.css.box-decoration-break.enabled,true) == background-size-cover-slice.html background-size-cover-slice.html
pref(layout.css.box-decoration-break.enabled,true) == background-size-cover-clone.html background-size-cover-clone.html
# ...and make sure each rendering with background-size is different from the
# other
pref(layout.css.box-decoration-break.enabled,true) == background-size-cover-slice.html background-size-cover-slice.html
random-if(OSX==1010) == background-size-monster-ch.html background-size-monster-ch.html
# bug 1129300
random-if(OSX==1010) == background-size-monster-cm.html background-size-monster-cm.html
# bug 1129300
random-if(OSX==1010) == background-size-monster-em.html background-size-monster-em.html
# bug 1129300
random-if(OSX==1010) == background-size-monster-ex.html background-size-monster-ex.html
# bug 1129300
random-if(OSX==1010) == background-size-monster-inches.html background-size-monster-inches.html
# bug 1129300
random-if(OSX==1010) == background-size-monster-mm.html background-size-monster-mm.html
# bug 1129300
random-if(OSX==1010) == background-size-monster-pc.html background-size-monster-pc.html
# bug 1129300
random-if(OSX==1010) == background-size-monster-pt.html background-size-monster-pt.html
# bug 1129300
random-if(OSX==1010) == background-size-monster-px.html background-size-monster-px.html
# bug 1129300
random-if(OSX==1010) == background-size-monster-rem.html background-size-monster-rem.html
# bug 1129300
# There seems to be a pixel-snapping problem here, where the repeated background
# image isn't being snapped at its boundaries. Note that the boundaries within
# the image aren't the issue, because they're being obscured to avoid sampling
# algorithm dependencies (at least assuming the sampling algorithm in use
# doesn't sample too far astray from the boundaries).
== background-size-zoom-repeat.html background-size-zoom-repeat.html
# -moz-default-background-color and -moz-default-color (bug 591341)
== background-moz-default-background-color.html background-moz-default-background-color.html
random-if(B2G||Mulet) == fixed-bg-with-transform-outside-viewport-1.html fixed-bg-with-transform-outside-viewport-1.html
# Initial mulet triage: parity with B2G/B2G Desktop
fuzzy(2,83) == fixed-bg-border-radius.html fixed-bg-border-radius.html
random == fixed-bg-inside-transform.html fixed-bg-inside-transform.html
HTTP == root-background-1.html root-background-1.html
HTTP == root-background-1.html root-background-1.html
random-if(B2G||Mulet) == really-big-background.html really-big-background.html
# Initial mulet triage: parity with B2G/B2G Desktop
== body-background.html body-background.html
== table-background.html table-background.html
== table-background-print.html table-background-print.html
== div-background.html div-background.html
== background-repeat-1-ref.html background-repeat-1-ref.html
== multi-background-clip-content-border.html multi-background-clip-content-border.html
HTTP == background-referrer.html background-referrer.html
== attachment-scroll-positioning-1.html attachment-scroll-positioning-1.html
== attachment-local-positioning-1.html attachment-local-positioning-1.html
== attachment-local-positioning-2.html attachment-local-positioning-2.html
== attachment-local-positioning-3.html attachment-local-positioning-3.html
== attachment-local-positioning-4.html attachment-local-positioning-4.html
== attachment-local-positioning-5.html attachment-local-positioning-5.html
== attachment-local-clipping-color-1.html attachment-local-clipping-color-1.html
== attachment-local-clipping-color-2.html attachment-local-clipping-color-2.html
# Same ref as the previous test.
== attachment-local-clipping-color-3.html attachment-local-clipping-color-3.html
fails fuzzy-if(skiaContent,1,300) == attachment-local-clipping-color-4.html attachment-local-clipping-color-4.html
fails fuzzy-if(skiaContent,1,400) == attachment-local-clipping-color-5.html attachment-local-clipping-color-5.html
== attachment-local-clipping-color-6.html attachment-local-clipping-color-6.html
== attachment-local-clipping-image-1.html attachment-local-clipping-image-1.html
== attachment-local-clipping-image-2.html attachment-local-clipping-image-2.html
# Same ref as the previous test.
== attachment-local-clipping-image-3.html attachment-local-clipping-image-3.html
# The next three tests are fuzzy due to bug 1128229.
fails fuzzy-if(skiaContent,64,1300) == attachment-local-clipping-image-4.html attachment-local-clipping-image-4.html
fails fuzzy-if(skiaContent,64,1300) == attachment-local-clipping-image-5.html attachment-local-clipping-image-5.html
== attachment-local-clipping-image-6.html attachment-local-clipping-image-6.html
fuzzy-if(skiaContent,1,8) == background-multiple-with-border-radius.html background-multiple-with-border-radius.html
== background-repeat-large-area.html background-repeat-large-area.html
fuzzy-if(skiaContent,31,474) == background-tiling-zoom-1.html background-tiling-zoom-1.html
skip-if(!cocoaWidget) == background-repeat-resampling.html background-repeat-resampling.html
skip pref(layout.css.background-clip-text.enabled,true) fuzzy-if(winWidget,102,2032) fuzzy-if(skiaContent,102,2595) == background-clip-text-1a.html background-clip-text-1a.html
fails pref(layout.css.background-clip-text.enabled,true) fuzzy-if(winWidget,102,2032) fuzzy-if(skiaContent,102,2595) == background-clip-text-1b.html background-clip-text-1b.html
fails pref(layout.css.background-clip-text.enabled,true) fuzzy-if(winWidget,102,2032) fuzzy-if(skiaContent,102,2595) == background-clip-text-1c.html background-clip-text-1c.html
fails pref(layout.css.background-clip-text.enabled,true) fuzzy-if(winWidget,102,2032) fuzzy-if(skiaContent,102,2595) == background-clip-text-1d.html background-clip-text-1d.html
fails pref(layout.css.background-clip-text.enabled,true) fuzzy-if(winWidget,102,2032) fuzzy-if(skiaContent,102,2595) == background-clip-text-1e.html background-clip-text-1e.html
skip pref(layout.css.background-clip-text.enabled,false) == background-clip-text-1a.html background-clip-text-1a.html
pref(layout.css.background-clip-text.enabled,true) == background-clip-text-2.html background-clip-text-2.html

View file

@ -6,7 +6,7 @@ include vector/reftest.list
== layers-layer-count-inheritance-1.xhtml layers-layer-count-1-ref.xhtml
== layers-layer-count-cascade-2.xhtml layers-layer-count-2-ref.xhtml
== layers-layer-count-inheritance-2.xhtml layers-layer-count-2-ref.xhtml
fuzzy-if(Android,9,600000) fuzzy-if(skiaContent,1,5000) == viewport-translucent-color-1.html viewport-translucent-color-ref.html
fuzzy-if(skiaContent,1,5000) == viewport-translucent-color-1.html viewport-translucent-color-ref.html
fuzzy-if(skiaContent,1,5000) == viewport-translucent-color-2.html viewport-translucent-color-ref.html
fuzzy-if(skiaContent,1,5000) == viewport-translucent-color-3.html viewport-translucent-color-ref.html
!= viewport-translucent-color-ref.html about:blank

View file

@ -1,27 +0,0 @@
# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
== tall--contain--height.html tall--contain--height.html
== tall--contain--width.html tall--contain--width.html
== wide--contain--height.html wide--contain--height.html
== wide--contain--width.html wide--contain--width.html
# These tests fail because of integer overflow; see bug 894555.
== tall--cover--height.html tall--cover--height.html
== tall--cover--width.html tall--cover--width.html
== wide--cover--height.html wide--cover--height.html
== wide--cover--width.html wide--cover--width.html
== zero-height-ratio-contain.html zero-height-ratio-contain.html
== zero-height-ratio-cover.html zero-height-ratio-cover.html
== zero-height-ratio-auto-auto.html zero-height-ratio-auto-auto.html
== zero-height-ratio-auto-5px.html zero-height-ratio-auto-5px.html
== zero-height-ratio-5px-auto.html zero-height-ratio-5px-auto.html
== zero-width-ratio-contain.html zero-width-ratio-contain.html
== zero-width-ratio-cover.html zero-width-ratio-cover.html
== zero-width-ratio-auto-auto.html zero-width-ratio-auto-auto.html
== zero-width-ratio-auto-5px.html zero-width-ratio-auto-5px.html
== zero-width-ratio-5px-auto.html zero-width-ratio-5px-auto.html
== zero-ratio-no-dimensions-contain.html zero-ratio-no-dimensions-contain.html
== zero-ratio-no-dimensions-cover.html zero-ratio-no-dimensions-cover.html
== zero-ratio-no-dimensions-auto-5px.html zero-ratio-no-dimensions-auto-5px.html
== zero-ratio-no-dimensions-5px-auto.html zero-ratio-no-dimensions-5px-auto.html
== zero-ratio-no-dimensions-auto-auto.html zero-ratio-no-dimensions-auto-auto.html

View file

@ -1,256 +0,0 @@
# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
include empty/reftest-stylo.list
################################################################################
# For reference (although the wide--32px-auto* tests/names were changed to
# avoid viewBox-directed scaling to make the scaled height less than the wide-
# tests height):
#
# for ORIENTATION in tall wide; do for SIZE in 32px-auto auto-32px auto contain cover; do for VIMAGE in *.svg; do cat template.html | sed -e "s/SIZE/$(echo $SIZE | sed -e 's/-/ /')/g" | sed -e "s/VIMAGE/$VIMAGE/g" | sed -e "s/TALLWIDE/$ORIENTATION/g" | sed -e "s/ORIENTATION/$(if [ "$ORIENTATION" = "tall" ]; then echo 'width: 256px; height: 768px'; else echo 'width: 768px; height: 256px'; fi)/g" > $ORIENTATION--$SIZE--$(echo $VIMAGE | sed -e 's/.svg//').html; echo "== $ORIENTATION--$SIZE--$(echo $VIMAGE | sed -e 's/.svg//').html ###" >> reftest-stylo.list; done; echo >> reftest-stylo.list; done; done;
#
################################################################################
== tall--32px-auto--nonpercent-width-nonpercent-height.html tall--32px-auto--nonpercent-width-nonpercent-height.html
== tall--32px-auto--nonpercent-width-nonpercent-height-viewbox.html tall--32px-auto--nonpercent-width-nonpercent-height-viewbox.html
== tall--32px-auto--nonpercent-width-omitted-height.html tall--32px-auto--nonpercent-width-omitted-height.html
skip-if(B2G||Mulet) == tall--32px-auto--nonpercent-width-omitted-height-viewbox.html tall--32px-auto--nonpercent-width-omitted-height-viewbox.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) == tall--32px-auto--nonpercent-width-percent-height.html tall--32px-auto--nonpercent-width-percent-height.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== tall--32px-auto--nonpercent-width-percent-height-viewbox.html tall--32px-auto--nonpercent-width-percent-height-viewbox.html
skip-if(B2G||Mulet) == tall--32px-auto--omitted-width-nonpercent-height.html tall--32px-auto--omitted-width-nonpercent-height.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== tall--32px-auto--omitted-width-nonpercent-height-viewbox.html tall--32px-auto--omitted-width-nonpercent-height-viewbox.html
== tall--32px-auto--omitted-width-omitted-height.html tall--32px-auto--omitted-width-omitted-height.html
== tall--32px-auto--omitted-width-omitted-height-viewbox.html tall--32px-auto--omitted-width-omitted-height-viewbox.html
skip-if(B2G||Mulet) == tall--32px-auto--omitted-width-percent-height.html tall--32px-auto--omitted-width-percent-height.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) == tall--32px-auto--omitted-width-percent-height-viewbox.html tall--32px-auto--omitted-width-percent-height-viewbox.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== tall--32px-auto--percent-width-nonpercent-height.html tall--32px-auto--percent-width-nonpercent-height.html
== tall--32px-auto--percent-width-nonpercent-height-viewbox.html tall--32px-auto--percent-width-nonpercent-height-viewbox.html
== tall--32px-auto--percent-width-omitted-height.html tall--32px-auto--percent-width-omitted-height.html
skip-if(B2G||Mulet) == tall--32px-auto--percent-width-omitted-height-viewbox.html tall--32px-auto--percent-width-omitted-height-viewbox.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== tall--32px-auto--percent-width-percent-height.html tall--32px-auto--percent-width-percent-height.html
skip-if(B2G||Mulet) == tall--32px-auto--percent-width-percent-height-viewbox.html tall--32px-auto--percent-width-percent-height-viewbox.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== tall--auto-32px--nonpercent-width-nonpercent-height.html tall--auto-32px--nonpercent-width-nonpercent-height.html
== tall--auto-32px--nonpercent-width-nonpercent-height-viewbox.html tall--auto-32px--nonpercent-width-nonpercent-height-viewbox.html
skip-if(B2G||Mulet) == tall--auto-32px--nonpercent-width-omitted-height.html tall--auto-32px--nonpercent-width-omitted-height.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== tall--auto-32px--nonpercent-width-omitted-height-viewbox.html tall--auto-32px--nonpercent-width-omitted-height-viewbox.html
skip-if(B2G||Mulet) == tall--auto-32px--nonpercent-width-percent-height.html tall--auto-32px--nonpercent-width-percent-height.html
# Initial mulet triage: parity with B2G/B2G Desktop
== tall--auto-32px--nonpercent-width-percent-height-viewbox.html tall--auto-32px--nonpercent-width-percent-height-viewbox.html
== tall--auto-32px--omitted-width-nonpercent-height.html tall--auto-32px--omitted-width-nonpercent-height.html
== tall--auto-32px--omitted-width-nonpercent-height-viewbox.html tall--auto-32px--omitted-width-nonpercent-height-viewbox.html
== tall--auto-32px--omitted-width-omitted-height.html tall--auto-32px--omitted-width-omitted-height.html
== tall--auto-32px--omitted-width-omitted-height-viewbox.html tall--auto-32px--omitted-width-omitted-height-viewbox.html
== tall--auto-32px--omitted-width-percent-height.html tall--auto-32px--omitted-width-percent-height.html
== tall--auto-32px--omitted-width-percent-height-viewbox.html tall--auto-32px--omitted-width-percent-height-viewbox.html
== tall--auto-32px--percent-width-nonpercent-height.html tall--auto-32px--percent-width-nonpercent-height.html
== tall--auto-32px--percent-width-nonpercent-height-viewbox.html tall--auto-32px--percent-width-nonpercent-height-viewbox.html
== tall--auto-32px--percent-width-omitted-height.html tall--auto-32px--percent-width-omitted-height.html
== tall--auto-32px--percent-width-omitted-height-viewbox.html tall--auto-32px--percent-width-omitted-height-viewbox.html
== tall--auto-32px--percent-width-percent-height.html tall--auto-32px--percent-width-percent-height.html
== tall--auto-32px--percent-width-percent-height-viewbox.html tall--auto-32px--percent-width-percent-height-viewbox.html
skip-if(B2G||Mulet) == tall--auto--nonpercent-width-nonpercent-height.html tall--auto--nonpercent-width-nonpercent-height.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== tall--auto--nonpercent-width-nonpercent-height-viewbox.html tall--auto--nonpercent-width-nonpercent-height-viewbox.html
== tall--auto--nonpercent-width-omitted-height.html tall--auto--nonpercent-width-omitted-height.html
== tall--auto--nonpercent-width-omitted-height-viewbox.html tall--auto--nonpercent-width-omitted-height-viewbox.html
== tall--auto--nonpercent-width-percent-height.html tall--auto--nonpercent-width-percent-height.html
== tall--auto--nonpercent-width-percent-height-viewbox.html tall--auto--nonpercent-width-percent-height-viewbox.html
== tall--auto--omitted-width-nonpercent-height.html tall--auto--omitted-width-nonpercent-height.html
== tall--auto--omitted-width-nonpercent-height-viewbox.html tall--auto--omitted-width-nonpercent-height-viewbox.html
== tall--auto--omitted-width-omitted-height.html tall--auto--omitted-width-omitted-height.html
skip-if(B2G||Mulet) == tall--auto--omitted-width-omitted-height-viewbox.html tall--auto--omitted-width-omitted-height-viewbox.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== tall--auto--omitted-width-percent-height.html tall--auto--omitted-width-percent-height.html
== tall--auto--omitted-width-percent-height-viewbox.html tall--auto--omitted-width-percent-height-viewbox.html
== tall--auto--percent-width-nonpercent-height.html tall--auto--percent-width-nonpercent-height.html
== tall--auto--percent-width-nonpercent-height-viewbox.html tall--auto--percent-width-nonpercent-height-viewbox.html
== tall--auto--percent-width-omitted-height.html tall--auto--percent-width-omitted-height.html
== tall--auto--percent-width-omitted-height-viewbox.html tall--auto--percent-width-omitted-height-viewbox.html
== tall--auto--percent-width-percent-height.html tall--auto--percent-width-percent-height.html
== tall--auto--percent-width-percent-height-viewbox.html tall--auto--percent-width-percent-height-viewbox.html
== tall--contain--nonpercent-width-nonpercent-height.html tall--contain--nonpercent-width-nonpercent-height.html
== tall--contain--nonpercent-width-nonpercent-height-viewbox.html tall--contain--nonpercent-width-nonpercent-height-viewbox.html
skip-if(B2G||Mulet) == tall--contain--nonpercent-width-omitted-height.html tall--contain--nonpercent-width-omitted-height.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) == tall--contain--nonpercent-width-omitted-height-viewbox.html tall--contain--nonpercent-width-omitted-height-viewbox.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== tall--contain--nonpercent-width-percent-height.html tall--contain--nonpercent-width-percent-height.html
== tall--contain--nonpercent-width-percent-height-viewbox.html tall--contain--nonpercent-width-percent-height-viewbox.html
== tall--contain--omitted-width-nonpercent-height.html tall--contain--omitted-width-nonpercent-height.html
== tall--contain--omitted-width-nonpercent-height-viewbox.html tall--contain--omitted-width-nonpercent-height-viewbox.html
== tall--contain--omitted-width-omitted-height.html tall--contain--omitted-width-omitted-height.html
== tall--contain--omitted-width-omitted-height-viewbox.html tall--contain--omitted-width-omitted-height-viewbox.html
== tall--contain--omitted-width-percent-height.html tall--contain--omitted-width-percent-height.html
== tall--contain--omitted-width-percent-height-viewbox.html tall--contain--omitted-width-percent-height-viewbox.html
== tall--contain--percent-width-nonpercent-height.html tall--contain--percent-width-nonpercent-height.html
== tall--contain--percent-width-nonpercent-height-viewbox.html tall--contain--percent-width-nonpercent-height-viewbox.html
== tall--contain--percent-width-omitted-height.html tall--contain--percent-width-omitted-height.html
== tall--contain--percent-width-omitted-height-viewbox.html tall--contain--percent-width-omitted-height-viewbox.html
== tall--contain--percent-width-percent-height.html tall--contain--percent-width-percent-height.html
== tall--contain--percent-width-percent-height-viewbox.html tall--contain--percent-width-percent-height-viewbox.html
== tall--cover--nonpercent-width-nonpercent-height.html tall--cover--nonpercent-width-nonpercent-height.html
== tall--cover--nonpercent-width-nonpercent-height-viewbox.html tall--cover--nonpercent-width-nonpercent-height-viewbox.html
== tall--cover--nonpercent-width-nonpercent-height--crisp.html tall--cover--nonpercent-width-nonpercent-height--crisp.html
== tall--cover--nonpercent-width-nonpercent-height-viewbox--crisp.html tall--cover--nonpercent-width-nonpercent-height-viewbox--crisp.html
== tall--cover--nonpercent-width-omitted-height.html tall--cover--nonpercent-width-omitted-height.html
== tall--cover--nonpercent-width-omitted-height-viewbox.html tall--cover--nonpercent-width-omitted-height-viewbox.html
== tall--cover--nonpercent-width-percent-height.html tall--cover--nonpercent-width-percent-height.html
== tall--cover--nonpercent-width-percent-height-viewbox.html tall--cover--nonpercent-width-percent-height-viewbox.html
== tall--cover--omitted-width-nonpercent-height.html tall--cover--omitted-width-nonpercent-height.html
== tall--cover--omitted-width-nonpercent-height-viewbox.html tall--cover--omitted-width-nonpercent-height-viewbox.html
== tall--cover--omitted-width-omitted-height.html tall--cover--omitted-width-omitted-height.html
== tall--cover--omitted-width-omitted-height-viewbox.html tall--cover--omitted-width-omitted-height-viewbox.html
== tall--cover--omitted-width-percent-height.html tall--cover--omitted-width-percent-height.html
== tall--cover--omitted-width-percent-height-viewbox.html tall--cover--omitted-width-percent-height-viewbox.html
== tall--cover--percent-width-nonpercent-height.html tall--cover--percent-width-nonpercent-height.html
== tall--cover--percent-width-nonpercent-height-viewbox.html tall--cover--percent-width-nonpercent-height-viewbox.html
== tall--cover--percent-width-omitted-height.html tall--cover--percent-width-omitted-height.html
== tall--cover--percent-width-omitted-height-viewbox.html tall--cover--percent-width-omitted-height-viewbox.html
== tall--cover--percent-width-percent-height.html tall--cover--percent-width-percent-height.html
== tall--cover--percent-width-percent-height-viewbox.html tall--cover--percent-width-percent-height-viewbox.html
== wide--12px-auto--nonpercent-width-nonpercent-height.html wide--12px-auto--nonpercent-width-nonpercent-height.html
== wide--12px-auto--nonpercent-width-nonpercent-height-viewbox.html wide--12px-auto--nonpercent-width-nonpercent-height-viewbox.html
skip-if(B2G||Mulet) == wide--12px-auto--nonpercent-width-omitted-height.html wide--12px-auto--nonpercent-width-omitted-height.html
# Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) == wide--12px-auto--nonpercent-width-omitted-height-viewbox.html wide--12px-auto--nonpercent-width-omitted-height-viewbox.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== wide--12px-auto--nonpercent-width-percent-height.html wide--12px-auto--nonpercent-width-percent-height.html
== wide--12px-auto--nonpercent-width-percent-height-viewbox.html wide--12px-auto--nonpercent-width-percent-height-viewbox.html
skip-if(B2G||Mulet) == wide--12px-auto--omitted-width-nonpercent-height.html wide--12px-auto--omitted-width-nonpercent-height.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) == wide--12px-auto--omitted-width-nonpercent-height-viewbox.html wide--12px-auto--omitted-width-nonpercent-height-viewbox.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== wide--12px-auto--omitted-width-omitted-height.html wide--12px-auto--omitted-width-omitted-height.html
== wide--12px-auto--omitted-width-omitted-height-viewbox.html wide--12px-auto--omitted-width-omitted-height-viewbox.html
== wide--12px-auto--omitted-width-percent-height.html wide--12px-auto--omitted-width-percent-height.html
== wide--12px-auto--omitted-width-percent-height-viewbox.html wide--12px-auto--omitted-width-percent-height-viewbox.html
== wide--12px-auto--percent-width-nonpercent-height.html wide--12px-auto--percent-width-nonpercent-height.html
== wide--12px-auto--percent-width-nonpercent-height-viewbox.html wide--12px-auto--percent-width-nonpercent-height-viewbox.html
== wide--12px-auto--percent-width-omitted-height.html wide--12px-auto--percent-width-omitted-height.html
skip-if(B2G||Mulet) == wide--12px-auto--percent-width-omitted-height-viewbox.html wide--12px-auto--percent-width-omitted-height-viewbox.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) == wide--12px-auto--percent-width-percent-height.html wide--12px-auto--percent-width-percent-height.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== wide--12px-auto--percent-width-percent-height-viewbox.html wide--12px-auto--percent-width-percent-height-viewbox.html
== wide--auto-32px--nonpercent-width-nonpercent-height.html wide--auto-32px--nonpercent-width-nonpercent-height.html
== wide--auto-32px--nonpercent-width-nonpercent-height-viewbox.html wide--auto-32px--nonpercent-width-nonpercent-height-viewbox.html
== wide--auto-32px--nonpercent-width-omitted-height.html wide--auto-32px--nonpercent-width-omitted-height.html
== wide--auto-32px--nonpercent-width-omitted-height-viewbox.html wide--auto-32px--nonpercent-width-omitted-height-viewbox.html
skip-if(B2G||Mulet) == wide--auto-32px--nonpercent-width-percent-height.html wide--auto-32px--nonpercent-width-percent-height.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== wide--auto-32px--nonpercent-width-percent-height-viewbox.html wide--auto-32px--nonpercent-width-percent-height-viewbox.html
== wide--auto-32px--omitted-width-nonpercent-height.html wide--auto-32px--omitted-width-nonpercent-height.html
== wide--auto-32px--omitted-width-nonpercent-height-viewbox.html wide--auto-32px--omitted-width-nonpercent-height-viewbox.html
== wide--auto-32px--omitted-width-omitted-height.html wide--auto-32px--omitted-width-omitted-height.html
== wide--auto-32px--omitted-width-omitted-height-viewbox.html wide--auto-32px--omitted-width-omitted-height-viewbox.html
== wide--auto-32px--omitted-width-percent-height.html wide--auto-32px--omitted-width-percent-height.html
== wide--auto-32px--omitted-width-percent-height-viewbox.html wide--auto-32px--omitted-width-percent-height-viewbox.html
== wide--auto-32px--percent-width-nonpercent-height.html wide--auto-32px--percent-width-nonpercent-height.html
== wide--auto-32px--percent-width-nonpercent-height-viewbox.html wide--auto-32px--percent-width-nonpercent-height-viewbox.html
== wide--auto-32px--percent-width-omitted-height.html wide--auto-32px--percent-width-omitted-height.html
== wide--auto-32px--percent-width-omitted-height-viewbox.html wide--auto-32px--percent-width-omitted-height-viewbox.html
== wide--auto-32px--percent-width-percent-height.html wide--auto-32px--percent-width-percent-height.html
== wide--auto-32px--percent-width-percent-height-viewbox.html wide--auto-32px--percent-width-percent-height-viewbox.html
skip-if(B2G||Mulet) == wide--auto--nonpercent-width-nonpercent-height.html wide--auto--nonpercent-width-nonpercent-height.html
# Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) == wide--auto--nonpercent-width-nonpercent-height-viewbox.html wide--auto--nonpercent-width-nonpercent-height-viewbox.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== wide--auto--nonpercent-width-omitted-height.html wide--auto--nonpercent-width-omitted-height.html
== wide--auto--nonpercent-width-omitted-height-viewbox.html wide--auto--nonpercent-width-omitted-height-viewbox.html
== wide--auto--nonpercent-width-percent-height.html wide--auto--nonpercent-width-percent-height.html
skip-if(B2G||Mulet) == wide--auto--nonpercent-width-percent-height-viewbox.html wide--auto--nonpercent-width-percent-height-viewbox.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== wide--auto--omitted-width-nonpercent-height.html wide--auto--omitted-width-nonpercent-height.html
== wide--auto--omitted-width-nonpercent-height-viewbox.html wide--auto--omitted-width-nonpercent-height-viewbox.html
== wide--auto--omitted-width-omitted-height.html wide--auto--omitted-width-omitted-height.html
skip-if(B2G||Mulet) == wide--auto--omitted-width-omitted-height-viewbox.html wide--auto--omitted-width-omitted-height-viewbox.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== wide--auto--omitted-width-percent-height.html wide--auto--omitted-width-percent-height.html
== wide--auto--omitted-width-percent-height-viewbox.html wide--auto--omitted-width-percent-height-viewbox.html
== wide--auto--percent-width-nonpercent-height.html wide--auto--percent-width-nonpercent-height.html
== wide--auto--percent-width-nonpercent-height-viewbox.html wide--auto--percent-width-nonpercent-height-viewbox.html
== wide--auto--percent-width-omitted-height.html wide--auto--percent-width-omitted-height.html
== wide--auto--percent-width-omitted-height-viewbox.html wide--auto--percent-width-omitted-height-viewbox.html
== wide--auto--percent-width-percent-height.html wide--auto--percent-width-percent-height.html
== wide--auto--percent-width-percent-height-viewbox.html wide--auto--percent-width-percent-height-viewbox.html
== wide--contain--nonpercent-width-nonpercent-height.html wide--contain--nonpercent-width-nonpercent-height.html
== wide--contain--nonpercent-width-nonpercent-height-viewbox.html wide--contain--nonpercent-width-nonpercent-height-viewbox.html
skip-if(B2G||Mulet) == wide--contain--nonpercent-width-omitted-height.html wide--contain--nonpercent-width-omitted-height.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== wide--contain--nonpercent-width-omitted-height-viewbox.html wide--contain--nonpercent-width-omitted-height-viewbox.html
== wide--contain--nonpercent-width-percent-height.html wide--contain--nonpercent-width-percent-height.html
== wide--contain--nonpercent-width-percent-height-viewbox.html wide--contain--nonpercent-width-percent-height-viewbox.html
== wide--contain--omitted-width-nonpercent-height.html wide--contain--omitted-width-nonpercent-height.html
== wide--contain--omitted-width-nonpercent-height-viewbox.html wide--contain--omitted-width-nonpercent-height-viewbox.html
== wide--contain--omitted-width-omitted-height.html wide--contain--omitted-width-omitted-height.html
== wide--contain--omitted-width-omitted-height-viewbox.html wide--contain--omitted-width-omitted-height-viewbox.html
== wide--contain--omitted-width-percent-height.html wide--contain--omitted-width-percent-height.html
== wide--contain--omitted-width-percent-height-viewbox.html wide--contain--omitted-width-percent-height-viewbox.html
== wide--contain--percent-width-nonpercent-height.html wide--contain--percent-width-nonpercent-height.html
== wide--contain--percent-width-nonpercent-height-viewbox.html wide--contain--percent-width-nonpercent-height-viewbox.html
== wide--contain--percent-width-omitted-height.html wide--contain--percent-width-omitted-height.html
== wide--contain--percent-width-omitted-height-viewbox.html wide--contain--percent-width-omitted-height-viewbox.html
== wide--contain--percent-width-percent-height.html wide--contain--percent-width-percent-height.html
== wide--contain--percent-width-percent-height-viewbox.html wide--contain--percent-width-percent-height-viewbox.html
== wide--cover--nonpercent-width-nonpercent-height.html wide--cover--nonpercent-width-nonpercent-height.html
skip-if(B2G||Mulet) == wide--cover--nonpercent-width-nonpercent-height-viewbox.html wide--cover--nonpercent-width-nonpercent-height-viewbox.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== wide--cover--nonpercent-width-omitted-height.html wide--cover--nonpercent-width-omitted-height.html
== wide--cover--nonpercent-width-omitted-height-viewbox.html wide--cover--nonpercent-width-omitted-height-viewbox.html
== wide--cover--nonpercent-width-percent-height.html wide--cover--nonpercent-width-percent-height.html
== wide--cover--nonpercent-width-percent-height-viewbox.html wide--cover--nonpercent-width-percent-height-viewbox.html
== wide--cover--omitted-width-nonpercent-height.html wide--cover--omitted-width-nonpercent-height.html
skip-if(B2G||Mulet) == wide--cover--omitted-width-nonpercent-height-viewbox.html wide--cover--omitted-width-nonpercent-height-viewbox.html
# bug 773482
# Initial mulet triage: parity with B2G/B2G Desktop
== wide--cover--omitted-width-omitted-height.html wide--cover--omitted-width-omitted-height.html
== wide--cover--omitted-width-omitted-height-viewbox.html wide--cover--omitted-width-omitted-height-viewbox.html
== wide--cover--omitted-width-percent-height.html wide--cover--omitted-width-percent-height.html
== wide--cover--omitted-width-percent-height-viewbox.html wide--cover--omitted-width-percent-height-viewbox.html
== wide--cover--percent-width-nonpercent-height.html wide--cover--percent-width-nonpercent-height.html
== wide--cover--percent-width-nonpercent-height-viewbox.html wide--cover--percent-width-nonpercent-height-viewbox.html
== wide--cover--percent-width-omitted-height.html wide--cover--percent-width-omitted-height.html
== wide--cover--percent-width-omitted-height-viewbox.html wide--cover--percent-width-omitted-height-viewbox.html
== wide--cover--percent-width-percent-height.html wide--cover--percent-width-percent-height.html
== wide--cover--percent-width-percent-height-viewbox.html wide--cover--percent-width-percent-height-viewbox.html
== diagonal-percentage-vector-background.html diagonal-percentage-vector-background.html
== no-aspect-ratio-wide.html no-aspect-ratio-wide.html

View file

@ -1,120 +0,0 @@
# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
== bdi-auto-dir-default.html bdi-auto-dir-default.html
== dir_auto-set-contained-dir-L.html dir_auto-set-contained-dir-L.html
== dir_auto-set-contained-dir-R.html dir_auto-set-contained-dir-R.html
== dir_auto-set-contained-invalid-dir-L.html dir_auto-set-contained-invalid-dir-L.html
== dir_auto-set-contained-invalid-dir-R.html dir_auto-set-contained-invalid-dir-R.html
== dir_auto-unset-contained-dir-L.html dir_auto-unset-contained-dir-L.html
== dir_auto-unset-contained-dir-R.html dir_auto-unset-contained-dir-R.html
== dynamicDirAuto-setLTR-Auto1.html dynamicDirAuto-setLTR-Auto1.html
== dynamicDirAuto-setLTR-Auto2.html dynamicDirAuto-setLTR-Auto2.html
== dynamicDirAuto-setLTR-Auto3.html dynamicDirAuto-setLTR-Auto3.html
== dynamicDirAuto-setLTR-Auto4.html dynamicDirAuto-setLTR-Auto4.html
== dynamicDirAuto-setLTR-Auto5.html dynamicDirAuto-setLTR-Auto5.html
== dynamicDirAuto-setLTR-Auto6.html dynamicDirAuto-setLTR-Auto6.html
== dynamicDirAuto-setLTR-LTR1.html dynamicDirAuto-setLTR-LTR1.html
== dynamicDirAuto-setLTR-LTR2.html dynamicDirAuto-setLTR-LTR2.html
== dynamicDirAuto-setLTR-LTR3.html dynamicDirAuto-setLTR-LTR3.html
== dynamicDirAuto-setLTR-LTR4.html dynamicDirAuto-setLTR-LTR4.html
== dynamicDirAuto-setLTR-LTR5.html dynamicDirAuto-setLTR-LTR5.html
== dynamicDirAuto-setLTR-LTR6.html dynamicDirAuto-setLTR-LTR6.html
== dynamicDirAuto-setLTR-LTR7.html dynamicDirAuto-setLTR-LTR7.html
== dynamicDirAuto-setLTR-LTR8.html dynamicDirAuto-setLTR-LTR8.html
== dynamicDirAuto-setLTR-RTL1.html dynamicDirAuto-setLTR-RTL1.html
== dynamicDirAuto-setLTR-RTL2.html dynamicDirAuto-setLTR-RTL2.html
== dynamicDirAuto-setLTR-RTL3.html dynamicDirAuto-setLTR-RTL3.html
== dynamicDirAuto-setLTR-RTL4.html dynamicDirAuto-setLTR-RTL4.html
== dynamicDirAuto-setLTR-RTL5.html dynamicDirAuto-setLTR-RTL5.html
== dynamicDirAuto-setLTR-RTL6.html dynamicDirAuto-setLTR-RTL6.html
== dynamicDirAuto-setLTR-RTL7.html dynamicDirAuto-setLTR-RTL7.html
== dynamicDirAuto-setLTR-RTL8.html dynamicDirAuto-setLTR-RTL8.html
== dynamicDirAuto-setLTR-NoDir1.html dynamicDirAuto-setLTR-NoDir1.html
== dynamicDirAuto-setLTR-NoDir2.html dynamicDirAuto-setLTR-NoDir2.html
== dynamicDirAuto-setLTR-NoDir3.html dynamicDirAuto-setLTR-NoDir3.html
== dynamicDirAuto-setLTR-NoDir4.html dynamicDirAuto-setLTR-NoDir4.html
== dynamicDirAuto-setLTR-NoDir5.html dynamicDirAuto-setLTR-NoDir5.html
== dynamicDirAuto-setLTR-NoDir6.html dynamicDirAuto-setLTR-NoDir6.html
== dynamicDirAuto-setLTR-NoDir7.html dynamicDirAuto-setLTR-NoDir7.html
== dynamicDirAuto-setLTR-NoDir8.html dynamicDirAuto-setLTR-NoDir8.html
== dynamicDirAuto-setLTR-InvalidDir1.html dynamicDirAuto-setLTR-InvalidDir1.html
== dynamicDirAuto-setLTR-InvalidDir2.html dynamicDirAuto-setLTR-InvalidDir2.html
== dynamicDirAuto-setLTR-InvalidDir3.html dynamicDirAuto-setLTR-InvalidDir3.html
== dynamicDirAuto-setLTR-InvalidDir4.html dynamicDirAuto-setLTR-InvalidDir4.html
== dynamicDirAuto-setLTR-InvalidDir5.html dynamicDirAuto-setLTR-InvalidDir5.html
== dynamicDirAuto-setLTR-InvalidDir6.html dynamicDirAuto-setLTR-InvalidDir6.html
== dynamicDirAuto-setLTR-InvalidDir7.html dynamicDirAuto-setLTR-InvalidDir7.html
== dynamicDirAuto-setLTR-InvalidDir7.html dynamicDirAuto-setLTR-InvalidDir7.html
== dynamicDirAuto-setRTL-Auto1.html dynamicDirAuto-setRTL-Auto1.html
== dynamicDirAuto-setRTL-Auto2.html dynamicDirAuto-setRTL-Auto2.html
== dynamicDirAuto-setRTL-Auto3.html dynamicDirAuto-setRTL-Auto3.html
== dynamicDirAuto-setRTL-Auto4.html dynamicDirAuto-setRTL-Auto4.html
== dynamicDirAuto-setRTL-Auto5.html dynamicDirAuto-setRTL-Auto5.html
== dynamicDirAuto-setRTL-Auto6.html dynamicDirAuto-setRTL-Auto6.html
== dynamicDirAuto-setRTL-LTR1.html dynamicDirAuto-setRTL-LTR1.html
== dynamicDirAuto-setRTL-LTR2.html dynamicDirAuto-setRTL-LTR2.html
== dynamicDirAuto-setRTL-LTR3.html dynamicDirAuto-setRTL-LTR3.html
== dynamicDirAuto-setRTL-LTR4.html dynamicDirAuto-setRTL-LTR4.html
== dynamicDirAuto-setRTL-LTR5.html dynamicDirAuto-setRTL-LTR5.html
== dynamicDirAuto-setRTL-LTR6.html dynamicDirAuto-setRTL-LTR6.html
== dynamicDirAuto-setRTL-LTR7.html dynamicDirAuto-setRTL-LTR7.html
== dynamicDirAuto-setRTL-LTR8.html dynamicDirAuto-setRTL-LTR8.html
== dynamicDirAuto-setRTL-RTL1.html dynamicDirAuto-setRTL-RTL1.html
== dynamicDirAuto-setRTL-RTL2.html dynamicDirAuto-setRTL-RTL2.html
== dynamicDirAuto-setRTL-RTL3.html dynamicDirAuto-setRTL-RTL3.html
== dynamicDirAuto-setRTL-RTL4.html dynamicDirAuto-setRTL-RTL4.html
== dynamicDirAuto-setRTL-RTL5.html dynamicDirAuto-setRTL-RTL5.html
== dynamicDirAuto-setRTL-RTL6.html dynamicDirAuto-setRTL-RTL6.html
== dynamicDirAuto-setRTL-RTL7.html dynamicDirAuto-setRTL-RTL7.html
== dynamicDirAuto-setRTL-RTL8.html dynamicDirAuto-setRTL-RTL8.html
== dynamicDirAuto-setRTL-NoDir1.html dynamicDirAuto-setRTL-NoDir1.html
== dynamicDirAuto-setRTL-NoDir2.html dynamicDirAuto-setRTL-NoDir2.html
== dynamicDirAuto-setRTL-NoDir3.html dynamicDirAuto-setRTL-NoDir3.html
== dynamicDirAuto-setRTL-NoDir4.html dynamicDirAuto-setRTL-NoDir4.html
== dynamicDirAuto-setRTL-NoDir5.html dynamicDirAuto-setRTL-NoDir5.html
== dynamicDirAuto-setRTL-NoDir6.html dynamicDirAuto-setRTL-NoDir6.html
== dynamicDirAuto-setRTL-NoDir7.html dynamicDirAuto-setRTL-NoDir7.html
== dynamicDirAuto-setRTL-NoDir8.html dynamicDirAuto-setRTL-NoDir8.html
== dynamicDirAuto-setRTL-InvalidDir1.html dynamicDirAuto-setRTL-InvalidDir1.html
== dynamicDirAuto-setRTL-InvalidDir2.html dynamicDirAuto-setRTL-InvalidDir2.html
== dynamicDirAuto-setRTL-InvalidDir3.html dynamicDirAuto-setRTL-InvalidDir3.html
== dynamicDirAuto-setRTL-InvalidDir4.html dynamicDirAuto-setRTL-InvalidDir4.html
== dynamicDirAuto-setRTL-InvalidDir5.html dynamicDirAuto-setRTL-InvalidDir5.html
== dynamicDirAuto-setRTL-InvalidDir6.html dynamicDirAuto-setRTL-InvalidDir6.html
== dynamicDirAuto-setRTL-InvalidDir7.html dynamicDirAuto-setRTL-InvalidDir7.html
== dynamicDirAuto-setRTL-InvalidDir8.html dynamicDirAuto-setRTL-InvalidDir8.html
== dynamicDirAuto-addLTR-Auto.html dynamicDirAuto-addLTR-Auto.html
== dynamicDirAuto-addRTL-Auto.html dynamicDirAuto-addRTL-Auto.html
== dynamicDirAuto-ChangeText-LTR1.html dynamicDirAuto-ChangeText-LTR1.html
== dynamicDirAuto-ChangeText-LTR2.html dynamicDirAuto-ChangeText-LTR2.html
== dynamicDirAuto-ChangeText-LTR3.html dynamicDirAuto-ChangeText-LTR3.html
== dynamicDirAuto-ChangeText-LTR4.html dynamicDirAuto-ChangeText-LTR4.html
== dynamicDirAuto-ChangeText-LTR5.html dynamicDirAuto-ChangeText-LTR5.html
== dynamicDirAuto-ChangeText-LTR6.html dynamicDirAuto-ChangeText-LTR6.html
== dynamicDirAuto-ChangeText-LTR7.html dynamicDirAuto-ChangeText-LTR7.html
== dynamicDirAuto-ChangeText-LTR8.html dynamicDirAuto-ChangeText-LTR8.html
== dynamicDirAuto-ChangeText-LTR9.html dynamicDirAuto-ChangeText-LTR9.html
== dynamicDirAuto-ChangeText-LTR10.html dynamicDirAuto-ChangeText-LTR10.html
== dynamicDirAuto-ChangeText-RTL1.html dynamicDirAuto-ChangeText-RTL1.html
== dynamicDirAuto-ChangeText-RTL2.html dynamicDirAuto-ChangeText-RTL2.html
fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,30,1) == dynamicDirAuto-ChangeText-RTL3.html dynamicDirAuto-ChangeText-RTL3.html
fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,30,1) == dynamicDirAuto-ChangeText-RTL4.html dynamicDirAuto-ChangeText-RTL4.html
fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,30,1) == dynamicDirAuto-ChangeText-RTL5.html dynamicDirAuto-ChangeText-RTL5.html
fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,30,1) == dynamicDirAuto-ChangeText-RTL6.html dynamicDirAuto-ChangeText-RTL6.html
== dynamicDirAuto-ChangeText-RTL7.html dynamicDirAuto-ChangeText-RTL7.html
== dynamicDirAuto-ChangeText-RTL8.html dynamicDirAuto-ChangeText-RTL8.html
== dynamicDirAuto-ChangeText-RTL9.html dynamicDirAuto-ChangeText-RTL9.html
== dynamicDirAuto-ChangeText-RTL10.html dynamicDirAuto-ChangeText-RTL10.html
== dynamicDirAuto-DeleteText-LTR1.html dynamicDirAuto-DeleteText-LTR1.html
== dynamicDirAuto-DeleteText-LTR2.html dynamicDirAuto-DeleteText-LTR2.html
== dynamicDirAuto-DeleteText-LTR3.html dynamicDirAuto-DeleteText-LTR3.html
== dynamicDirAuto-DeleteText-RTL1.html dynamicDirAuto-DeleteText-RTL1.html
== dynamicDirAuto-DeleteText-RTL2.html dynamicDirAuto-DeleteText-RTL2.html
== dynamicDirAuto-DeleteText-RTL3.html dynamicDirAuto-DeleteText-RTL3.html
== 839886-1.html 839886-1.html
== 859093-1.html 859093-1.html
== 889742-1.html 889742-1.html
== 1103348-1.html 1103348-1.html
== 1169267-delete-add-1a.html 1169267-delete-add-1a.html
== 1169267-delete-add-1b.html 1169267-delete-add-1b.html
== 1169267-delete-add-2a.html 1169267-delete-add-2a.html
== 1169267-delete-add-2b.html 1169267-delete-add-2b.html

View file

@ -1,121 +0,0 @@
# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
pref(bidi.numeral,0) == arabic-1.html arabic-1.html
pref(bidi.numeral,1) == arabic-1.html arabic-1.html
pref(bidi.numeral,2) == arabic-1.html arabic-1.html
pref(bidi.numeral,3) == arabic-1.html arabic-1.html
pref(bidi.numeral,4) == arabic-1.html arabic-1.html
skip pref(bidi.numeral,0) == arabic-2.html arabic-2.html
skip pref(bidi.numeral,1) == arabic-2.html arabic-2.html
skip pref(bidi.numeral,2) == arabic-2.html arabic-2.html
skip pref(bidi.numeral,3) == arabic-2.html arabic-2.html
skip pref(bidi.numeral,4) == arabic-2.html arabic-2.html
pref(bidi.numeral,0) == arabic-3.html arabic-3.html
pref(bidi.numeral,1) == arabic-3.html arabic-3.html
pref(bidi.numeral,2) == arabic-3.html arabic-3.html
pref(bidi.numeral,3) == arabic-3.html arabic-3.html
pref(bidi.numeral,4) == arabic-3.html arabic-3.html
pref(bidi.numeral,0) == arabic-4.html arabic-4.html
pref(bidi.numeral,1) == arabic-4.html arabic-4.html
pref(bidi.numeral,2) == arabic-4.html arabic-4.html
pref(bidi.numeral,3) == arabic-4.html arabic-4.html
pref(bidi.numeral,4) == arabic-4.html arabic-4.html
pref(bidi.numeral,0) == arabic-5.html arabic-5.html
pref(bidi.numeral,1) == arabic-5.html arabic-5.html
pref(bidi.numeral,2) == arabic-5.html arabic-5.html
pref(bidi.numeral,3) == arabic-5.html arabic-5.html
pref(bidi.numeral,4) == arabic-5.html arabic-5.html
pref(bidi.numeral,0) == bug441782-1.html bug441782-1.html
pref(bidi.numeral,1) == bug441782-1.html bug441782-1.html
pref(bidi.numeral,2) == bug441782-1.html bug441782-1.html
pref(bidi.numeral,3) == bug441782-1.html bug441782-1.html
pref(bidi.numeral,4) == bug441782-1.html bug441782-1.html
pref(bidi.numeral,0) == bug441782-2.html bug441782-2.html
pref(bidi.numeral,1) == bug441782-2.html bug441782-2.html
pref(bidi.numeral,2) == bug441782-2.html bug441782-2.html
pref(bidi.numeral,3) == bug441782-2.html bug441782-2.html
pref(bidi.numeral,4) == bug441782-2.html bug441782-2.html
pref(bidi.numeral,0) == bug441782-3.html bug441782-3.html
fails-if(winWidget&&!layersGPUAccelerated&&!(/^Windows\x20NT\x205\.1/.test(http.oscpu))&&!skiaContent) fuzzy-if(winWidget&&!d2d&&d3d11,13,1) pref(bidi.numeral,1) == bug441782-3.html bug441782-3.html
fails-if(winWidget&&!layersGPUAccelerated&&!(/^Windows\x20NT\x205\.1/.test(http.oscpu))&&!skiaContent) fuzzy-if(winWidget&&!d2d&&d3d11,13,1) pref(bidi.numeral,2) == bug441782-3.html bug441782-3.html
fails-if(winWidget&&!layersGPUAccelerated&&!(/^Windows\x20NT\x205\.1/.test(http.oscpu))&&!skiaContent) fuzzy-if(winWidget&&!d2d&&d3d11,13,1) pref(bidi.numeral,3) == bug441782-3.html bug441782-3.html
pref(bidi.numeral,4) == bug441782-3.html bug441782-3.html
pref(bidi.numeral,0) == bug441782-4.html bug441782-4.html
pref(bidi.numeral,1) == bug441782-4.html bug441782-4.html
pref(bidi.numeral,2) == bug441782-4.html bug441782-4.html
pref(bidi.numeral,3) == bug441782-4.html bug441782-4.html
pref(bidi.numeral,4) == bug441782-4.html bug441782-4.html
pref(bidi.numeral,0) == bug441782-5.html bug441782-5.html
pref(bidi.numeral,1) == bug441782-5.html bug441782-5.html
pref(bidi.numeral,2) == bug441782-5.html bug441782-5.html
pref(bidi.numeral,3) == bug441782-5.html bug441782-5.html
pref(bidi.numeral,4) == bug441782-5.html bug441782-5.html
pref(bidi.numeral,0) == bug467672-1.html bug467672-1.html
pref(bidi.numeral,1) == bug467672-1.html bug467672-1.html
pref(bidi.numeral,2) == bug467672-1.html bug467672-1.html
pref(bidi.numeral,3) == bug467672-1.html bug467672-1.html
pref(bidi.numeral,4) == bug467672-1.html bug467672-1.html
pref(bidi.numeral,5) == bug467672-1.html bug467672-1.html
pref(bidi.numeral,6) == bug467672-1.html bug467672-1.html
pref(bidi.numeral,0) == bug467672-2.html bug467672-2.html
pref(bidi.numeral,1) == bug467672-2.html bug467672-2.html
pref(bidi.numeral,2) == bug467672-2.html bug467672-2.html
pref(bidi.numeral,3) == bug467672-2.html bug467672-2.html
pref(bidi.numeral,4) == bug467672-2.html bug467672-2.html
pref(bidi.numeral,5) == bug467672-2.html bug467672-2.html
pref(bidi.numeral,6) == bug467672-2.html bug467672-2.html
pref(bidi.numeral,0) == bug467672-3.html bug467672-3.html
pref(bidi.numeral,1) == bug467672-3.html bug467672-3.html
pref(bidi.numeral,2) == bug467672-3.html bug467672-3.html
pref(bidi.numeral,3) == bug467672-3.html bug467672-3.html
pref(bidi.numeral,4) == bug467672-3.html bug467672-3.html
pref(bidi.numeral,5) == bug467672-3.html bug467672-3.html
pref(bidi.numeral,6) == bug467672-3.html bug467672-3.html
pref(bidi.numeral,0) == bug467672-4.html bug467672-4.html
pref(bidi.numeral,1) == bug467672-4.html bug467672-4.html
pref(bidi.numeral,2) == bug467672-4.html bug467672-4.html
pref(bidi.numeral,3) == bug467672-4.html bug467672-4.html
pref(bidi.numeral,4) == bug467672-4.html bug467672-4.html
pref(bidi.numeral,5) == bug467672-4.html bug467672-4.html
pref(bidi.numeral,6) == bug467672-4.html bug467672-4.html
pref(bidi.numeral,0) == bug467672-5.html bug467672-5.html
pref(bidi.numeral,1) == bug467672-5.html bug467672-5.html
pref(bidi.numeral,2) == bug467672-5.html bug467672-5.html
pref(bidi.numeral,3) == bug467672-5.html bug467672-5.html
pref(bidi.numeral,4) == bug467672-5.html bug467672-5.html
pref(bidi.numeral,5) == bug467672-5.html bug467672-5.html
pref(bidi.numeral,6) == bug467672-5.html bug467672-5.html
pref(bidi.numeral,0) == persian-1.html persian-1.html
pref(bidi.numeral,1) == persian-1.html persian-1.html
pref(bidi.numeral,2) == persian-1.html persian-1.html
pref(bidi.numeral,3) == persian-1.html persian-1.html
pref(bidi.numeral,4) == persian-1.html persian-1.html
pref(bidi.numeral,5) == persian-1.html persian-1.html
pref(bidi.numeral,6) == persian-1.html persian-1.html
skip pref(bidi.numeral,0) == persian-2.html persian-2.html
skip pref(bidi.numeral,1) == persian-2.html persian-2.html
skip pref(bidi.numeral,2) == persian-2.html persian-2.html
skip pref(bidi.numeral,3) == persian-2.html persian-2.html
skip pref(bidi.numeral,4) == persian-2.html persian-2.html
skip pref(bidi.numeral,5) == persian-2.html persian-2.html
skip pref(bidi.numeral,6) == persian-2.html persian-2.html
pref(bidi.numeral,0) == persian-3.html persian-3.html
pref(bidi.numeral,1) == persian-3.html persian-3.html
pref(bidi.numeral,2) == persian-3.html persian-3.html
pref(bidi.numeral,3) == persian-3.html persian-3.html
pref(bidi.numeral,4) == persian-3.html persian-3.html
pref(bidi.numeral,5) == persian-3.html persian-3.html
pref(bidi.numeral,6) == persian-3.html persian-3.html
pref(bidi.numeral,0) == persian-4.html persian-4.html
pref(bidi.numeral,1) == persian-4.html persian-4.html
pref(bidi.numeral,2) == persian-4.html persian-4.html
pref(bidi.numeral,3) == persian-4.html persian-4.html
pref(bidi.numeral,4) == persian-4.html persian-4.html
pref(bidi.numeral,5) == persian-4.html persian-4.html
pref(bidi.numeral,6) == persian-4.html persian-4.html
pref(bidi.numeral,0) == persian-5.html persian-5.html
pref(bidi.numeral,1) == persian-5.html persian-5.html
pref(bidi.numeral,2) == persian-5.html persian-5.html
pref(bidi.numeral,3) == persian-5.html persian-5.html
pref(bidi.numeral,4) == persian-5.html persian-5.html
pref(bidi.numeral,5) == persian-5.html persian-5.html
pref(bidi.numeral,6) == persian-5.html persian-5.html

View file

@ -1,186 +0,0 @@
# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
include dirAuto/reftest-stylo.list
include numeral/reftest-stylo.list
== bdi-element.html bdi-element.html
== bidi-000.html bidi-000.html
== bidi-001.html bidi-001.html
== bidi-001-j.html bidi-001-j.html
== bidi-001-v.html bidi-001-v.html
== bidi-002.html bidi-002.html
== bidi-003.html bidi-003.html
== bidi-004.html bidi-004.html
== bidi-004-j.html bidi-004-j.html
== bidi-005.html bidi-005.html
random-if(cocoaWidget) == bidi-006.html bidi-006.html
# bug 734313
random-if(cocoaWidget) == bidi-006-j.html bidi-006-j.html
# bug 734313
== bidiSVG-01.svg bidiSVG-01.svg
== bidiSVG-02.svg bidiSVG-02.svg
skip == bidiSVG-03.svg bidiSVG-03.svg
== bidiSVG-04.svg bidiSVG-04.svg
== bidiSVG-05.svg bidiSVG-05.svg
random-if(/^Windows\x20NT\x205\.1/.test(http.oscpu)) HTTP(..) == bidiMirroring.svg bidiMirroring.svg
fuzzy-if(Android,9,134) random-if(layersGPUAccelerated) == visualmarquee.html visualmarquee.html
fuzzy-if(Android,9,134) random-if(layersGPUAccelerated) == logicalmarquee.html logicalmarquee.html
== visualmarquee.html visualmarquee.html
# test for glyph mirroring in right-to-left text
== mirroring-01.html mirroring-01.html
# quote marks are not supposed to mirror, but Unicode 5.0 said they should, so some systems do it
random-if(cocoaWidget) == mirroring-02.html mirroring-02.html
== mirroring-03.html mirroring-03.html
== mixedChartype-00.html mixedChartype-00.html
== mixedChartype-00-j.html mixedChartype-00-j.html
== mixedChartype-01.html mixedChartype-01.html
== mixedChartype-01-j.html mixedChartype-01-j.html
== mixedChartype-02.html mixedChartype-02.html
== mixedChartype-02-j.html mixedChartype-02-j.html
== mixedChartype-03.html mixedChartype-03.html
== mixedChartype-03-j.html mixedChartype-03-j.html
== unicode-bidi-anonymous-001.html unicode-bidi-anonymous-001.html
== unicode-bidi-anonymous-002.html unicode-bidi-anonymous-002.html
== unicode-bidi-isolate-basic.html unicode-bidi-isolate-basic.html
== unicode-bidi-isolate-aharon.html unicode-bidi-isolate-aharon.html
fails fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,73,1) fuzzy-if(skiaContent,104,32) == unicode-bidi-plaintext.html unicode-bidi-plaintext.html
== unicode-bidi-plaintext-textarea-1.html unicode-bidi-plaintext-textarea-1.html
== unicode-bidi-plaintext-textarea-2.html unicode-bidi-plaintext-textarea-2.html
== unicode-bidi-plaintext-textarea-3.html unicode-bidi-plaintext-textarea-3.html
== unicode-bidi-plaintext-textarea-4.html unicode-bidi-plaintext-textarea-4.html
== with-first-letter-1a.html with-first-letter-1a.html
== with-first-letter-1b.html with-first-letter-1b.html
random-if(cocoaWidget) == with-first-letter-2a.html with-first-letter-2a.html
# bug 734313
random-if(cocoaWidget) == with-first-letter-2b.html with-first-letter-2b.html
# bug 734313
== 83958-1a.html 83958-1a.html
== 83958-1b.html 83958-1b.html
== 83958-1c.html 83958-1c.html
fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,111,7) == 83958-2a.html 83958-2a.html
fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,111,7) == 83958-2b.html 83958-2b.html
== 115921-1.html 115921-1.html
== 115921-2.html 115921-2.html
== 151407-1.html 151407-1.html
== 151407-1a.html 151407-1a.html
== 151407-2-ltr.html 151407-2-ltr.html
== 151407-2-rtl.html 151407-2-rtl.html
== 151407-2-auto.html 151407-2-auto.html
== 151407-2-empty.html 151407-2-empty.html
== 151407-2-foopy.html 151407-2-foopy.html
== 151407-3-ltr.html 151407-3-ltr.html
== 151407-3-rtl.html 151407-3-rtl.html
== 151407-3-auto.html 151407-3-auto.html
== 151407-3-foopy.html 151407-3-foopy.html
== 229367-1.html 229367-1.html
== 229367-2.html 229367-2.html
== 229367-3.html 229367-3.html
== 258928-1.html 258928-1.html
== 263359-1.html 263359-1.html
== 263359-1a.html 263359-1a.html
== 263359-1b.html 263359-1b.html
== 263359-2.html 263359-2.html
== 263359-3.html 263359-3.html
== 263359-4.html 263359-4.html
random-if(winWidget) fuzzy-if(skiaContent,1,1700) == 267459-1.html 267459-1.html
# depends on windows version, see bug 590101
fuzzy-if(skiaContent,1,1100) == 267459-2.html 267459-2.html
== 299065-1.html 299065-1.html
random-if(winWidget) == 305643-1.html 305643-1.html
# depends on windows version, see bug 590101
== 332655-1.html 332655-1.html
== 332655-2.html 332655-2.html
== 381279-1.html 381279-1.html
== 386339.html 386339.html
== 409375.html 409375.html
== 413542-1.html 413542-1.html
== 413542-2.html 413542-2.html
random-if((B2G&&browserIsRemote)||Mulet) == 413928-1.html 413928-1.html
# Initial mulet triage: parity with B2G/B2G Desktop
random-if((B2G&&browserIsRemote)||Mulet) == 413928-2.html 413928-2.html
# Initial mulet triage: parity with B2G/B2G Desktop
== 425338-1a.html 425338-1a.html
== 425338-1b.html 425338-1b.html
skip == 489517-1.html 489517-1.html
== 489887-1.html 489887-1.html
== 492231-1.html 492231-1.html
== 496006-1.html 496006-1.html
== 503269-1.html 503269-1.html
== 503957-1.html 503957-1.html
== 525740-1.html 525740-1.html
== 536963-1.html 536963-1.html
== 562169-1.html 562169-1.html
== 562169-1a.html 562169-1a.html
== 562169-2.html 562169-2.html
== 562169-2a.html 562169-2a.html
== 562169-3.html 562169-3.html
== 562169-3a.html 562169-3a.html
skip == 562169-4.html 562169-4.html
== 588739-1.html 588739-1.html
== 588739-2.html 588739-2.html
== 588739-3.html 588739-3.html
== 612843-1.html 612843-1.html
== 613149-1a.html 613149-1a.html
== 613149-1b.html 613149-1b.html
fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,36,2) == 613149-2a.html 613149-2a.html
fuzzy-if(Android,24,1) fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,36,2) == 613149-2b.html 613149-2b.html
== 613157-1.html 613157-1.html
fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated&&!azureSkia,255,6) == 613157-2.html 613157-2.html
== 662288-1.html 662288-1.html
skip == 670226-1.html 670226-1.html
== 676245-1.html 676245-1.html
skip-if(B2G||Mulet) fuzzy-if(skiaContent,1,3) == 698291-1.html 698291-1.html
# Initial mulet triage: parity with B2G/B2G Desktop
== 698706-1.html 698706-1.html
== 704837-1.html 704837-1.html
== 712600-1.html 712600-1.html
== 712600-2.html 712600-2.html
skip == 712600-2-dyn.html 712600-2-dyn.html
== 712600-3.html 712600-3.html
== 718236-1.html 718236-1.html
== 718236-2.html 718236-2.html
== 718236-3.html 718236-3.html
skip-if(B2G||Mulet) == 726420-1.html 726420-1.html
# Initial mulet triage: parity with B2G/B2G Desktop
== 726460-1.html 726460-1.html
== 729047-1.html 729047-1.html
== 730562-1.html 730562-1.html
== 746987-1.html 746987-1.html
== 746987-2.html 746987-2.html
== 746987-3.html 746987-3.html
== 746987-4.html 746987-4.html
== 779003-1.html 779003-1.html
== 779003-1-dynamic.html 779003-1-dynamic.html
== 817406-1.html 817406-1.html
== 817406-2.html 817406-2.html
== 817406-3.html 817406-3.html
== 817406-4.html 817406-4.html
== 847242-1.html 847242-1.html
skip-if((B2G&&browserIsRemote)||Mulet) fuzzy-if(xulRuntime.widgetToolkit=="gtk3",1,11) == 869833-1.xul 869833-1.xul
# Initial mulet triage: parity with B2G/B2G Desktop
== 922530-1.html 922530-1.html
== 922550-1.html 922550-1.html
== 1067268-1.html 1067268-1.html
== 1069941-inline-bidi-border-1.html 1069941-inline-bidi-border-1.html
== 1069941-inline-bidi-margin-1.html 1069941-inline-bidi-margin-1.html
skip-if(B2G||Mulet) == 1155359-1.xul 1155359-1.xul
== 1157726-1.html 1157726-1.html
skip == 1161752.html 1161752.html
== 1161752-5-embed.html 1161752-5-embed.html
== brackets-1a-ltr.html brackets-1a-ltr.html
== brackets-1a-rtl.html brackets-1a-rtl.html
== brackets-1b-ltr.html brackets-1b-ltr.html
== brackets-1b-rtl.html brackets-1b-rtl.html
== brackets-1c-ltr.html brackets-1c-ltr.html
== brackets-1c-rtl.html brackets-1c-rtl.html
== brackets-2a-ltr.html brackets-2a-ltr.html
fuzzy-if(Android,254,557) == brackets-2a-rtl.html brackets-2a-rtl.html
== brackets-2b-ltr.html brackets-2b-ltr.html
== brackets-2b-rtl.html brackets-2b-rtl.html
== brackets-2c-ltr.html brackets-2c-ltr.html
fuzzy-if(Android,254,231) == brackets-2c-rtl.html brackets-2c-rtl.html
== brackets-3a-ltr.html brackets-3a-ltr.html
== brackets-3a-rtl.html brackets-3a-rtl.html
== brackets-3b-ltr.html brackets-3b-ltr.html
== brackets-3b-rtl.html brackets-3b-rtl.html
== 1217833-1.html 1217833-1.html
== 1217833-2.html 1217833-2.html
== 1231175-1.html 1231175-1.html

Some files were not shown because too many files have changed in this diff Show more