diff --git a/dom/base/ImageEncoder.cpp b/dom/base/ImageEncoder.cpp index 3f84e41eb3..410763c173 100644 --- a/dom/base/ImageEncoder.cpp +++ b/dom/base/ImageEncoder.cpp @@ -391,7 +391,8 @@ ImageEncoder::ExtractDataInternal(const nsAString& aType, aOptions); } else { RefPtr dataSurface; - dataSurface = GetBRGADataSourceSurfaceSync(aImage); + RefPtr image(aImage); + dataSurface = GetBRGADataSourceSurfaceSync(image.forget()); DataSourceSurface::MappedSurface map; if (!dataSurface->Map(gfx::DataSourceSurface::MapType::READ, &map)) { diff --git a/dom/base/moz.build b/dom/base/moz.build index 49e10fd823..4508d0e15c 100644 --- a/dom/base/moz.build +++ b/dom/base/moz.build @@ -416,7 +416,7 @@ LOCAL_INCLUDES += [ '/dom/xml', '/dom/xslt/xpath', '/dom/xul', - '/image/src', + '/image', '/js/xpconnect/src', '/js/xpconnect/wrappers', '/layout/base', diff --git a/dom/broadcastchannel/BroadcastChannel.h b/dom/broadcastchannel/BroadcastChannel.h index 920811475a..5695729914 100644 --- a/dom/broadcastchannel/BroadcastChannel.h +++ b/dom/broadcastchannel/BroadcastChannel.h @@ -11,7 +11,7 @@ #include "nsIIPCBackgroundChildCreateCallback.h" #include "nsIObserver.h" #include "nsTArray.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" class nsPIDOMWindow; diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp index 8c202f26b4..19a1c879db 100644 --- a/dom/canvas/CanvasRenderingContext2D.cpp +++ b/dom/canvas/CanvasRenderingContext2D.cpp @@ -4179,14 +4179,16 @@ ExtractSubrect(SourceSurface* aSurface, mgfx::Rect* aSourceRect, DrawTarget* aTa roundedOutSourceRect.RoundOut(); mgfx::IntRect roundedOutSourceRectInt; if (!roundedOutSourceRect.ToIntRect(&roundedOutSourceRectInt)) { - return aSurface; + RefPtr surface(aSurface); + return surface.forget(); } RefPtr subrectDT = aTargetDT->CreateSimilarDrawTarget(roundedOutSourceRectInt.Size(), SurfaceFormat::B8G8R8A8); if (!subrectDT) { - return aSurface; + RefPtr surface(aSurface); + return surface.forget(); } *aSourceRect -= roundedOutSourceRect.TopLeft(); @@ -5765,15 +5767,18 @@ CanvasPath::GetPath(const CanvasWindingRule& winding, const DrawTarget* aTarget) if (mPath && (mPath->GetBackendType() == aTarget->GetBackendType()) && (mPath->GetFillRule() == fillRule)) { - return mPath; + RefPtr path(mPath); + return path.forget(); } if (!mPath) { // if there is no path, there must be a pathbuilder MOZ_ASSERT(mPathBuilder); mPath = mPathBuilder->Finish(); - if (!mPath) - return mPath; + if (!mPath) { + RefPtr path(mPath); + return path.forget(); + } mPathBuilder = nullptr; } @@ -5788,7 +5793,8 @@ CanvasPath::GetPath(const CanvasWindingRule& winding, const DrawTarget* aTarget) mPath = tmpPathBuilder->Finish(); } - return mPath; + RefPtr path(mPath); + return path.forget(); } void diff --git a/dom/canvas/WebGLContextGL.cpp b/dom/canvas/WebGLContextGL.cpp index 7254d1bfe9..d74b63f72b 100644 --- a/dom/canvas/WebGLContextGL.cpp +++ b/dom/canvas/WebGLContextGL.cpp @@ -48,6 +48,7 @@ #include "mozilla/dom/ImageData.h" #include "mozilla/dom/ToJSValue.h" #include "mozilla/Endian.h" +#include "mozilla/nsRefPtr.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/dom/canvas/WebGLContextUnchecked.h b/dom/canvas/WebGLContextUnchecked.h index 364b0c3354..d061d12e5c 100644 --- a/dom/canvas/WebGLContextUnchecked.h +++ b/dom/canvas/WebGLContextUnchecked.h @@ -8,7 +8,7 @@ #define WEBGLCONTEXTUNCHECKED_H #include "GLDefs.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "WebGLTypes.h" namespace mozilla { diff --git a/dom/canvas/moz.build b/dom/canvas/moz.build index c44ac6e7ff..9c6c061fc1 100644 --- a/dom/canvas/moz.build +++ b/dom/canvas/moz.build @@ -146,7 +146,7 @@ LOCAL_INCLUDES += [ '/dom/svg', '/dom/xul', '/gfx/gl', - '/image/src', + '/image', '/js/xpconnect/src', '/layout/generic', '/layout/style', diff --git a/dom/fetch/FetchDriver.h b/dom/fetch/FetchDriver.h index 8b59e63c11..96cc10e24a 100644 --- a/dom/fetch/FetchDriver.h +++ b/dom/fetch/FetchDriver.h @@ -11,7 +11,7 @@ #include "nsIChannelEventSink.h" #include "nsIInterfaceRequestor.h" #include "nsIStreamListener.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "mozilla/DebugOnly.h" #include "mozilla/net/ReferrerPolicy.h" diff --git a/dom/media/AbstractThread.h b/dom/media/AbstractThread.h index 971ec94421..d149af37d0 100644 --- a/dom/media/AbstractThread.h +++ b/dom/media/AbstractThread.h @@ -11,7 +11,7 @@ #include "nsIRunnable.h" #include "nsISupportsImpl.h" #include "nsIThread.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "mozilla/ThreadLocal.h" diff --git a/dom/media/AudioSink.cpp b/dom/media/AudioSink.cpp index d51a653bfe..ee494dafdb 100644 --- a/dom/media/AudioSink.cpp +++ b/dom/media/AudioSink.cpp @@ -47,7 +47,8 @@ AudioSink::OnAudioEndTimeUpdateTask::Dispatch(int64_t aEndTime) { MutexAutoLock lock(mMutex); if (mStateMachine) { mEndTime = aEndTime; - mStateMachine->TaskQueue()->Dispatch(this); + nsRefPtr runnable(this); + mStateMachine->TaskQueue()->Dispatch(runnable.forget()); } } diff --git a/dom/media/DecodedStream.h b/dom/media/DecodedStream.h index 78166d18d7..b31f32374c 100644 --- a/dom/media/DecodedStream.h +++ b/dom/media/DecodedStream.h @@ -7,7 +7,7 @@ #ifndef DecodedStream_h_ #define DecodedStream_h_ -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsTArray.h" #include "mozilla/UniquePtr.h" #include "mozilla/gfx/Point.h" diff --git a/dom/media/MediaData.h b/dom/media/MediaData.h index 2ebafd3d17..6191e7c52d 100644 --- a/dom/media/MediaData.h +++ b/dom/media/MediaData.h @@ -12,7 +12,7 @@ #include "AudioSampleFormat.h" #include "nsIMemoryReporter.h" #include "SharedBuffer.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsTArray.h" namespace mozilla { diff --git a/dom/media/MediaDataDemuxer.h b/dom/media/MediaDataDemuxer.h index 91fd62111b..976094d6a7 100644 --- a/dom/media/MediaDataDemuxer.h +++ b/dom/media/MediaDataDemuxer.h @@ -13,7 +13,7 @@ #include "TimeUnits.h" #include "mozilla/UniquePtr.h" #include "nsISupportsImpl.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsTArray.h" namespace mozilla { diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp index 61b4e18974..4b50c59f87 100644 --- a/dom/media/MediaDecoder.cpp +++ b/dom/media/MediaDecoder.cpp @@ -220,7 +220,7 @@ void MediaDecoder::UpdateDormantState(bool aDormantTimeout, bool aActivity) mDecoderStateMachine, &MediaDecoderStateMachine::SetDormant, true); - mDecoderStateMachine->TaskQueue()->Dispatch(event); + mDecoderStateMachine->TaskQueue()->Dispatch(event.forget()); if (IsEnded()) { mWasEndedWhenEnteredDormant = true; @@ -236,7 +236,7 @@ void MediaDecoder::UpdateDormantState(bool aDormantTimeout, bool aActivity) mDecoderStateMachine, &MediaDecoderStateMachine::SetDormant, false); - mDecoderStateMachine->TaskQueue()->Dispatch(event); + mDecoderStateMachine->TaskQueue()->Dispatch(event.forget()); } } diff --git a/dom/media/MediaDecoderReader.cpp b/dom/media/MediaDecoderReader.cpp index 48c9193279..8d7a23f8e9 100644 --- a/dom/media/MediaDecoderReader.cpp +++ b/dom/media/MediaDecoderReader.cpp @@ -280,7 +280,7 @@ MediaDecoderReader::RequestVideoData(bool aSkipToNextKeyframe, // again. We don't just decode straight in a loop here, as that // would hog the decode task queue. RefPtr task(new ReRequestVideoWithSkipTask(this, aTimeThreshold)); - mTaskQueue->Dispatch(task); + mTaskQueue->Dispatch(task.forget()); return p; } } @@ -314,7 +314,7 @@ MediaDecoderReader::RequestAudioData() // (|mVideoSinkBufferCount| > 0) if (AudioQueue().GetSize() == 0 && mTaskQueue) { RefPtr task(new ReRequestAudioTask(this)); - mTaskQueue->Dispatch(task); + mTaskQueue->Dispatch(task.forget()); return p; } } diff --git a/dom/media/MediaDecoderStateMachine.h b/dom/media/MediaDecoderStateMachine.h index 8f1b8f8054..c2012943ce 100644 --- a/dom/media/MediaDecoderStateMachine.h +++ b/dom/media/MediaDecoderStateMachine.h @@ -185,7 +185,9 @@ public: void DispatchShutdown() { - TaskQueue()->Dispatch(NS_NewRunnableMethod(this, &MediaDecoderStateMachine::Shutdown)); + nsCOMPtr runnable = + NS_NewRunnableMethod(this, &MediaDecoderStateMachine::Shutdown); + TaskQueue()->Dispatch(runnable.forget()); } void ShutdownReader(); @@ -241,7 +243,9 @@ public: void DispatchStartBuffering() { - TaskQueue()->Dispatch(NS_NewRunnableMethod(this, &MediaDecoderStateMachine::StartBuffering)); + nsCOMPtr runnable = + NS_NewRunnableMethod(this, &MediaDecoderStateMachine::StartBuffering); + TaskQueue()->Dispatch(runnable.forget()); } // This is called on the state machine thread and audio thread. @@ -737,7 +741,9 @@ private: public: void DispatchOnAudioSinkComplete() { - TaskQueue()->Dispatch(NS_NewRunnableMethod(this, &MediaDecoderStateMachine::OnAudioSinkComplete)); + nsCOMPtr runnable = + NS_NewRunnableMethod(this, &MediaDecoderStateMachine::OnAudioSinkComplete); + TaskQueue()->Dispatch(runnable.forget()); } // Called by the AudioSink to signal errors. @@ -745,7 +751,9 @@ public: void DispatchOnAudioSinkError() { - TaskQueue()->Dispatch(NS_NewRunnableMethod(this, &MediaDecoderStateMachine::OnAudioSinkError)); + nsCOMPtr runnable = + NS_NewRunnableMethod(this, &MediaDecoderStateMachine::OnAudioSinkError); + TaskQueue()->Dispatch(runnable.forget()); } // Return true if the video decoder's decode speed can not catch up the diff --git a/dom/media/MediaFormatReader.cpp b/dom/media/MediaFormatReader.cpp index d4bd0e6d42..bf2d2e6149 100644 --- a/dom/media/MediaFormatReader.cpp +++ b/dom/media/MediaFormatReader.cpp @@ -1139,7 +1139,7 @@ MediaFormatReader::Output(TrackType aTrack, MediaData* aSample) RefPtr task = NS_NewRunnableMethodWithArgs( this, &MediaFormatReader::NotifyNewOutput, aTrack, aSample); - GetTaskQueue()->Dispatch(task); + GetTaskQueue()->Dispatch(task.forget()); } void @@ -1148,7 +1148,7 @@ MediaFormatReader::DrainComplete(TrackType aTrack) RefPtr task = NS_NewRunnableMethodWithArg( this, &MediaFormatReader::NotifyDrainComplete, aTrack); - GetTaskQueue()->Dispatch(task); + GetTaskQueue()->Dispatch(task.forget()); } void @@ -1157,7 +1157,7 @@ MediaFormatReader::InputExhausted(TrackType aTrack) RefPtr task = NS_NewRunnableMethodWithArg( this, &MediaFormatReader::NotifyInputExhausted, aTrack); - GetTaskQueue()->Dispatch(task); + GetTaskQueue()->Dispatch(task.forget()); } void @@ -1166,7 +1166,7 @@ MediaFormatReader::Error(TrackType aTrack) RefPtr task = NS_NewRunnableMethodWithArg( this, &MediaFormatReader::NotifyError, aTrack); - GetTaskQueue()->Dispatch(task); + GetTaskQueue()->Dispatch(task.forget()); } void @@ -1538,7 +1538,7 @@ MediaFormatReader::NotifyDataArrived(const char* aBuffer, uint32_t aLength, int6 NS_NewRunnableMethodWithArgs( this, &MediaFormatReader::NotifyDemuxer, aLength, aOffset); - GetTaskQueue()->Dispatch(task); + GetTaskQueue()->Dispatch(task.forget()); } void @@ -1561,7 +1561,7 @@ MediaFormatReader::NotifyDataRemoved() NS_NewRunnableMethodWithArgs( this, &MediaFormatReader::NotifyDemuxer, 0, 0); - GetTaskQueue()->Dispatch(task); + GetTaskQueue()->Dispatch(task.forget()); } int64_t diff --git a/dom/media/MediaInfo.h b/dom/media/MediaInfo.h index bc2022b3d3..abade3ef5b 100644 --- a/dom/media/MediaInfo.h +++ b/dom/media/MediaInfo.h @@ -8,7 +8,7 @@ #include "mozilla/UniquePtr.h" #include "nsRect.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsSize.h" #include "nsString.h" #include "nsTArray.h" diff --git a/dom/media/MediaStreamError.h b/dom/media/MediaStreamError.h index 936e59b1f3..cf7993e9ee 100644 --- a/dom/media/MediaStreamError.h +++ b/dom/media/MediaStreamError.h @@ -12,7 +12,7 @@ #include "nsWrapperCache.h" #include "js/TypeDecls.h" #include "nsPIDOMWindow.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #if defined(XP_WIN) && defined(GetMessage) #undef GetMessage diff --git a/dom/media/MediaTimer.h b/dom/media/MediaTimer.h index 6d34d433a0..11c8cf4af7 100644 --- a/dom/media/MediaTimer.h +++ b/dom/media/MediaTimer.h @@ -12,7 +12,7 @@ #include #include "nsITimer.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "mozilla/Monitor.h" #include "mozilla/TimeStamp.h" diff --git a/dom/media/directshow/AudioSinkInputPin.cpp b/dom/media/directshow/AudioSinkInputPin.cpp index 03f4b63b8e..5351414c10 100644 --- a/dom/media/directshow/AudioSinkInputPin.cpp +++ b/dom/media/directshow/AudioSinkInputPin.cpp @@ -143,7 +143,7 @@ AudioSinkInputPin::GetConnectedPinSeeking() return nullptr; RefPtr seeking; peer->QueryInterface(static_cast(byRef(seeking))); - return seeking; + return seeking.forget(); } HRESULT diff --git a/dom/media/directshow/DirectShowUtils.cpp b/dom/media/directshow/DirectShowUtils.cpp index 7758ccf4b1..27b37d4797 100644 --- a/dom/media/directshow/DirectShowUtils.cpp +++ b/dom/media/directshow/DirectShowUtils.cpp @@ -301,7 +301,7 @@ GetUnconnectedPin(IBaseFilter* aFilter, PIN_DIRECTION aPinDir) bool matches = FALSE; if (SUCCEEDED(MatchUnconnectedPin(pin, aPinDir, &matches)) && matches) { - return pin; + return pin.forget(); } } diff --git a/dom/media/mediasource/ContainerParser.h b/dom/media/mediasource/ContainerParser.h index e567723845..5b395a9e49 100644 --- a/dom/media/mediasource/ContainerParser.h +++ b/dom/media/mediasource/ContainerParser.h @@ -7,7 +7,7 @@ #ifndef MOZILLA_CONTAINERPARSER_H_ #define MOZILLA_CONTAINERPARSER_H_ -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsString.h" #include "MediaResource.h" diff --git a/dom/media/mediasource/TrackBuffer.cpp b/dom/media/mediasource/TrackBuffer.cpp index 0f50d83e0f..de974775ae 100644 --- a/dom/media/mediasource/TrackBuffer.cpp +++ b/dom/media/mediasource/TrackBuffer.cpp @@ -589,7 +589,7 @@ TrackBuffer::QueueInitializeDecoder(SourceBufferDecoder* aDecoder) &TrackBuffer::InitializeDecoder, aDecoder); // We need to initialize the reader on its own task queue - aDecoder->GetReader()->GetTaskQueue()->Dispatch(task); + aDecoder->GetReader()->GetTaskQueue()->Dispatch(task.forget()); return true; } @@ -1067,7 +1067,7 @@ TrackBuffer::RemoveDecoder(SourceBufferDecoder* aDecoder) mInitializedDecoders.RemoveElement(aDecoder); mDecoders.RemoveElement(aDecoder); } - aDecoder->GetReader()->GetTaskQueue()->Dispatch(task); + aDecoder->GetReader()->GetTaskQueue()->Dispatch(task.forget()); } nsRefPtr diff --git a/dom/media/omx/MediaCodecReader.cpp b/dom/media/omx/MediaCodecReader.cpp index 53af9d2793..a5b2d272cf 100644 --- a/dom/media/omx/MediaCodecReader.cpp +++ b/dom/media/omx/MediaCodecReader.cpp @@ -335,7 +335,7 @@ MediaCodecReader::DispatchAudioTask() RefPtr task = NS_NewRunnableMethod(this, &MediaCodecReader::DecodeAudioDataTask); - mAudioTrack.mTaskQueue->Dispatch(task); + mAudioTrack.mTaskQueue->Dispatch(task.forget()); } } @@ -347,7 +347,7 @@ MediaCodecReader::DispatchVideoTask(int64_t aTimeThreshold) NS_NewRunnableMethodWithArg(this, &MediaCodecReader::DecodeVideoFrameTask, aTimeThreshold); - mVideoTrack.mTaskQueue->Dispatch(task); + mVideoTrack.mTaskQueue->Dispatch(task.forget()); } } @@ -458,8 +458,13 @@ MediaCodecReader::DecodeAudioDataSync() void MediaCodecReader::DecodeAudioDataTask() { - DecodeAudioDataSync(); + if (AudioQueue().GetSize() == 0 && !AudioQueue().IsFinished()) { + DecodeAudioDataSync(); + } MonitorAutoLock al(mAudioTrack.mTrackMonitor); + if (mAudioTrack.mAudioPromise.IsEmpty()) { + return; + } if (AudioQueue().GetSize() > 0) { nsRefPtr a = AudioQueue().PopFront(); if (a) { @@ -802,7 +807,7 @@ MediaCodecReader::TextureClientRecycleCallback(TextureClient* aClient) RefPtr task = NS_NewRunnableMethod(this, &MediaCodecReader::WaitFenceAndReleaseOutputBuffer); - mVideoTrack.mReleaseBufferTaskQueue->Dispatch(task); + mVideoTrack.mReleaseBufferTaskQueue->Dispatch(task.forget()); } } @@ -1001,6 +1006,8 @@ MediaCodecReader::DecodeVideoFrameSync(int64_t aTimeThreshold) } if (v) { + // Notify mDecoder that we have decoded a video frame. + mDecoder->NotifyDecodedFrames(0, 1, 0); VideoQueue().Push(v); } else { NS_WARNING("Unable to create VideoData"); @@ -1814,6 +1821,10 @@ MediaCodecReader::GetCodecOutputData(Track& aTrack, } if (status == OK) { + // Notify mDecoder that we have parsed a video frame. + if (&aTrack == &mVideoTrack) { + mDecoder->NotifyDecodedFrames(1, 0, 0); + } if (!IsValidTimestampUs(aThreshold) || info.mTimeUs >= aThreshold) { // Get a valid output buffer. break; diff --git a/dom/media/omx/MediaOmxCommonDecoder.cpp b/dom/media/omx/MediaOmxCommonDecoder.cpp index 5445fbd4b0..ef761759dd 100644 --- a/dom/media/omx/MediaOmxCommonDecoder.cpp +++ b/dom/media/omx/MediaOmxCommonDecoder.cpp @@ -127,7 +127,7 @@ MediaOmxCommonDecoder::PauseStateMachine() GetStateMachine(), &MediaDecoderStateMachine::SetDormant, true); - GetStateMachine()->TaskQueue()->Dispatch(event); + GetStateMachine()->TaskQueue()->Dispatch(event.forget()); } void @@ -158,7 +158,7 @@ MediaOmxCommonDecoder::ResumeStateMachine() GetStateMachine(), &MediaDecoderStateMachine::SetDormant, false); - GetStateMachine()->TaskQueue()->Dispatch(event); + GetStateMachine()->TaskQueue()->Dispatch(event.forget()); UpdateLogicalPosition(); } diff --git a/dom/media/platforms/agnostic/BlankDecoderModule.cpp b/dom/media/platforms/agnostic/BlankDecoderModule.cpp index 057c5d8229..76ac3ad77a 100644 --- a/dom/media/platforms/agnostic/BlankDecoderModule.cpp +++ b/dom/media/platforms/agnostic/BlankDecoderModule.cpp @@ -69,7 +69,7 @@ public: // with it, so the OutputEvent stores it in an nsAutoPtr and deletes // it once it's run. RefPtr r(new OutputEvent(aSample, mCallback, mCreator)); - mTaskQueue->Dispatch(r); + mTaskQueue->Dispatch(r.forget()); return NS_OK; } diff --git a/dom/media/platforms/agnostic/gmp/MediaDataDecoderProxy.h b/dom/media/platforms/agnostic/gmp/MediaDataDecoderProxy.h index e6a2047778..50576a5e91 100644 --- a/dom/media/platforms/agnostic/gmp/MediaDataDecoderProxy.h +++ b/dom/media/platforms/agnostic/gmp/MediaDataDecoderProxy.h @@ -8,7 +8,7 @@ #define MediaDataDecoderProxy_h_ #include "PlatformDecoderModule.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsThreadUtils.h" #include "nscore.h" diff --git a/dom/media/platforms/apple/AppleATDecoder.cpp b/dom/media/platforms/apple/AppleATDecoder.cpp index df32a5d892..bd8db77ab7 100644 --- a/dom/media/platforms/apple/AppleATDecoder.cpp +++ b/dom/media/platforms/apple/AppleATDecoder.cpp @@ -76,11 +76,12 @@ AppleATDecoder::Input(MediaRawData* aSample) (unsigned long long)aSample->Size()); // Queue a task to perform the actual decoding on a separate thread. - mTaskQueue->Dispatch( + nsCOMPtr runnable = NS_NewRunnableMethodWithArg>( this, &AppleATDecoder::SubmitSample, - nsRefPtr(aSample))); + nsRefPtr(aSample)); + mTaskQueue->Dispatch(runnable.forget()); return NS_OK; } diff --git a/dom/media/platforms/apple/AppleVDADecoder.cpp b/dom/media/platforms/apple/AppleVDADecoder.cpp index 7d9353eefa..44ae6d93eb 100644 --- a/dom/media/platforms/apple/AppleVDADecoder.cpp +++ b/dom/media/platforms/apple/AppleVDADecoder.cpp @@ -106,11 +106,12 @@ AppleVDADecoder::Input(MediaRawData* aSample) aSample->mKeyframe ? " keyframe" : "", aSample->Size()); - mTaskQueue->Dispatch( + nsCOMPtr runnable = NS_NewRunnableMethodWithArg>( this, &AppleVDADecoder::SubmitFrame, - nsRefPtr(aSample))); + nsRefPtr(aSample)); + mTaskQueue->Dispatch(runnable.forget()); return NS_OK; } diff --git a/dom/media/platforms/apple/AppleVTDecoder.cpp b/dom/media/platforms/apple/AppleVTDecoder.cpp index a5bc05cf40..c35590d67a 100644 --- a/dom/media/platforms/apple/AppleVTDecoder.cpp +++ b/dom/media/platforms/apple/AppleVTDecoder.cpp @@ -100,11 +100,12 @@ AppleVTDecoder::Input(MediaRawData* aSample) LOG(" sha1 %s", digest.get()); #endif // LOG_MEDIA_SHA1 - mTaskQueue->Dispatch( + nsCOMPtr runnable = NS_NewRunnableMethodWithArg>( this, &AppleVTDecoder::SubmitFrame, - nsRefPtr(aSample))); + nsRefPtr(aSample)); + mTaskQueue->Dispatch(runnable.forget()); return NS_OK; } diff --git a/dom/media/platforms/ffmpeg/FFmpegAudioDecoder.cpp b/dom/media/platforms/ffmpeg/FFmpegAudioDecoder.cpp index 6c0b2c52cb..bdb9f9ac88 100644 --- a/dom/media/platforms/ffmpeg/FFmpegAudioDecoder.cpp +++ b/dom/media/platforms/ffmpeg/FFmpegAudioDecoder.cpp @@ -171,9 +171,9 @@ FFmpegAudioDecoder::DecodePacket(MediaRawData* aSample) nsresult FFmpegAudioDecoder::Input(MediaRawData* aSample) { - mTaskQueue->Dispatch(NS_NewRunnableMethodWithArg >( + nsCOMPtr runnable(NS_NewRunnableMethodWithArg>( this, &FFmpegAudioDecoder::DecodePacket, nsRefPtr(aSample))); - + mTaskQueue->Dispatch(runnable.forget()); return NS_OK; } diff --git a/dom/media/platforms/ffmpeg/FFmpegH264Decoder.cpp b/dom/media/platforms/ffmpeg/FFmpegH264Decoder.cpp index aa5b797e86..39329b4762 100644 --- a/dom/media/platforms/ffmpeg/FFmpegH264Decoder.cpp +++ b/dom/media/platforms/ffmpeg/FFmpegH264Decoder.cpp @@ -354,10 +354,11 @@ FFmpegH264Decoder::DecodeFrame(MediaRawData* aSample) nsresult FFmpegH264Decoder::Input(MediaRawData* aSample) { - mTaskQueue->Dispatch( + nsCOMPtr runnable( NS_NewRunnableMethodWithArg>( this, &FFmpegH264Decoder::DecodeFrame, nsRefPtr(aSample))); + mTaskQueue->Dispatch(runnable.forget()); return NS_OK; } @@ -374,8 +375,9 @@ FFmpegH264Decoder::DoDrain() nsresult FFmpegH264Decoder::Drain() { - mTaskQueue->Dispatch( + nsCOMPtr runnable( NS_NewRunnableMethod(this, &FFmpegH264Decoder::DoDrain)); + mTaskQueue->Dispatch(runnable.forget()); return NS_OK; } diff --git a/dom/media/platforms/gonk/GonkMediaDataDecoder.cpp b/dom/media/platforms/gonk/GonkMediaDataDecoder.cpp index b1527e4c21..42b3064f37 100644 --- a/dom/media/platforms/gonk/GonkMediaDataDecoder.cpp +++ b/dom/media/platforms/gonk/GonkMediaDataDecoder.cpp @@ -161,11 +161,12 @@ GonkMediaDataDecoder::Shutdown() nsresult GonkMediaDataDecoder::Input(MediaRawData* aSample) { - mTaskQueue->Dispatch( + nsCOMPtr runnable( NS_NewRunnableMethodWithArg>( this, &GonkMediaDataDecoder::ProcessDecode, nsRefPtr(aSample))); + mTaskQueue->Dispatch(runnable.forget()); return NS_OK; } @@ -258,7 +259,9 @@ GonkMediaDataDecoder::ProcessDrain() nsresult GonkMediaDataDecoder::Drain() { - mTaskQueue->Dispatch(NS_NewRunnableMethod(this, &GonkMediaDataDecoder::ProcessDrain)); + nsCOMPtr runnable = + NS_NewRunnableMethod(this, &GonkMediaDataDecoder::ProcessDrain); + mTaskQueue->Dispatch(runnable.forget()); return NS_OK; } diff --git a/dom/media/platforms/wmf/MFTDecoder.cpp b/dom/media/platforms/wmf/MFTDecoder.cpp index f706addd6d..d8dd31354d 100644 --- a/dom/media/platforms/wmf/MFTDecoder.cpp +++ b/dom/media/platforms/wmf/MFTDecoder.cpp @@ -48,7 +48,9 @@ MFTDecoder::Create(const GUID& aMFTClsID) HRESULT MFTDecoder::SetMediaTypes(IMFMediaType* aInputType, - IMFMediaType* aOutputType) + IMFMediaType* aOutputType, + ConfigureOutputCallback aCallback, + void* aData) { mOutputType = aOutputType; @@ -56,7 +58,7 @@ MFTDecoder::SetMediaTypes(IMFMediaType* aInputType, HRESULT hr = mDecoder->SetInputType(0, aInputType, 0); NS_ENSURE_TRUE(SUCCEEDED(hr), hr); - hr = SetDecoderOutputType(); + hr = SetDecoderOutputType(aCallback, aData); NS_ENSURE_TRUE(SUCCEEDED(hr), hr); hr = mDecoder->GetInputStreamInfo(0, &mInputStreamInfo); @@ -77,11 +79,11 @@ MFTDecoder::GetAttributes() RefPtr attr; HRESULT hr = mDecoder->GetAttributes(byRef(attr)); NS_ENSURE_TRUE(SUCCEEDED(hr), nullptr); - return attr; + return attr.forget(); } HRESULT -MFTDecoder::SetDecoderOutputType() +MFTDecoder::SetDecoderOutputType(ConfigureOutputCallback aCallback, void* aData) { NS_ENSURE_TRUE(mDecoder != nullptr, E_POINTER); @@ -94,6 +96,10 @@ MFTDecoder::SetDecoderOutputType() BOOL resultMatch; hr = mOutputType->Compare(outputType, MF_ATTRIBUTES_MATCH_OUR_ITEMS, &resultMatch); if (SUCCEEDED(hr) && resultMatch == TRUE) { + if (aCallback) { + hr = aCallback(outputType, aData); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + } hr = mDecoder->SetOutputType(0, outputType, 0); NS_ENSURE_TRUE(SUCCEEDED(hr), hr); @@ -200,8 +206,12 @@ MFTDecoder::Output(RefPtr* aOutput) MFT_OUTPUT_DATA_BUFFER output = {0}; + bool providedSample = false; RefPtr sample; - if (!mMFTProvidesOutputSamples) { + if (*aOutput) { + output.pSample = *aOutput; + providedSample = true; + } else if (!mMFTProvidesOutputSamples) { hr = CreateOutputSample(&sample); NS_ENSURE_TRUE(SUCCEEDED(hr), hr); output.pSample = sample; @@ -221,7 +231,7 @@ MFTDecoder::Output(RefPtr* aOutput) // Reconfigure decoder output type, so that GetOutputMediaType() // returns the new type, and return the error code to caller. // This is an expected failure, so don't warn on encountering it. - hr = SetDecoderOutputType(); + hr = SetDecoderOutputType(nullptr, nullptr); NS_ENSURE_TRUE(SUCCEEDED(hr), hr); // Return the error, so that the caller knows to retry. return MF_E_TRANSFORM_STREAM_CHANGE; @@ -243,7 +253,7 @@ MFTDecoder::Output(RefPtr* aOutput) } *aOutput = output.pSample; // AddRefs - if (mMFTProvidesOutputSamples) { + if (mMFTProvidesOutputSamples && !providedSample) { // If the MFT is providing samples, we must release the sample here. // Typically only the H.264 MFT provides samples when using DXVA, // and it always re-uses the same sample, so if we don't release it @@ -264,9 +274,15 @@ MFTDecoder::Input(const uint8_t* aData, RefPtr input; HRESULT hr = CreateInputSample(aData, aDataSize, aTimestamp, &input); - NS_ENSURE_TRUE(SUCCEEDED(hr) && input!=nullptr, hr); + NS_ENSURE_TRUE(SUCCEEDED(hr) && input != nullptr, hr); - hr = mDecoder->ProcessInput(0, input, 0); + return Input(input); +} + +HRESULT +MFTDecoder::Input(IMFSample* aSample) +{ + HRESULT hr = mDecoder->ProcessInput(0, aSample, 0); if (hr == MF_E_NOTACCEPTING) { // MFT *already* has enough data to produce a sample. Retrieve it. return MF_E_NOTACCEPTING; diff --git a/dom/media/platforms/wmf/MFTDecoder.h b/dom/media/platforms/wmf/MFTDecoder.h index 4bd8fbe0a4..b53257431f 100644 --- a/dom/media/platforms/wmf/MFTDecoder.h +++ b/dom/media/platforms/wmf/MFTDecoder.h @@ -36,8 +36,11 @@ public: // - aOutputType needs at least major and minor types set. // This is used to select the matching output type out // of all the available output types of the MFT. + typedef HRESULT (*ConfigureOutputCallback)(IMFMediaType* aOutputType, void* aData); HRESULT SetMediaTypes(IMFMediaType* aInputType, - IMFMediaType* aOutputType); + IMFMediaType* aOutputType, + ConfigureOutputCallback aCallback = nullptr, + void* aData = nullptr); // Returns the MFT's IMFAttributes object. TemporaryRef GetAttributes(); @@ -54,6 +57,7 @@ public: HRESULT Input(const uint8_t* aData, uint32_t aDataSize, int64_t aTimestampUsecs); + HRESULT Input(IMFSample* aSample); // Retrieves output from the MFT. Call this once Input() returns // MF_E_NOTACCEPTING. Some MFTs with hardware acceleration (the H.264 @@ -78,7 +82,7 @@ public: private: - HRESULT SetDecoderOutputType(); + HRESULT SetDecoderOutputType(ConfigureOutputCallback aCallback, void* aData); HRESULT CreateInputSample(const uint8_t* aData, uint32_t aDataSize, diff --git a/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp b/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp index b27e7b3079..52660469f6 100644 --- a/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp +++ b/dom/media/platforms/wmf/WMFMediaDataDecoder.cpp @@ -49,15 +49,16 @@ WMFMediaDataDecoder::Init() nsresult WMFMediaDataDecoder::Shutdown() { - mTaskQueue->Dispatch( - NS_NewRunnableMethod(this, &WMFMediaDataDecoder::ProcessShutdown)); -#ifdef DEBUG - { - MonitorAutoLock mon(mMonitor); - // The MP4Reader should have flushed before calling Shutdown(). - MOZ_ASSERT(!mIsDecodeTaskDispatched); + MOZ_DIAGNOSTIC_ASSERT(!mIsShutDown); + + if (mTaskQueue) { + nsCOMPtr runnable = + NS_NewRunnableMethod(this, &WMFMediaDataDecoder::ProcessShutdown); + mTaskQueue->Dispatch(runnable.forget()); + } else { + ProcessShutdown(); } -#endif + mIsShutDown = true; return NS_OK; } @@ -76,9 +77,9 @@ WMFMediaDataDecoder::EnsureDecodeTaskDispatched() { mMonitor.AssertCurrentThreadOwns(); if (!mIsDecodeTaskDispatched) { - mTaskQueue->Dispatch( - NS_NewRunnableMethod(this, - &WMFMediaDataDecoder::Decode)); + nsCOMPtr runnable = + NS_NewRunnableMethod(this, &WMFMediaDataDecoder::Decode); + mTaskQueue->Dispatch(runnable.forget()); mIsDecodeTaskDispatched = true; } } @@ -195,7 +196,9 @@ WMFMediaDataDecoder::ProcessDrain() nsresult WMFMediaDataDecoder::Drain() { - mTaskQueue->Dispatch(NS_NewRunnableMethod(this, &WMFMediaDataDecoder::ProcessDrain)); + nsCOMPtr runnable = + NS_NewRunnableMethod(this, &WMFMediaDataDecoder::ProcessDrain); + mTaskQueue->Dispatch(runnable.forget()); return NS_OK; } diff --git a/dom/media/platforms/wmf/WMFMediaDataDecoder.h b/dom/media/platforms/wmf/WMFMediaDataDecoder.h index 0b67defbb0..2edeca5bb7 100644 --- a/dom/media/platforms/wmf/WMFMediaDataDecoder.h +++ b/dom/media/platforms/wmf/WMFMediaDataDecoder.h @@ -104,6 +104,7 @@ private: std::queue> mInput; bool mIsDecodeTaskDispatched; bool mIsFlushing; + bool mIsShutDown; }; } // namespace mozilla diff --git a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp index 41658c1265..92a8829418 100644 --- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp +++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp @@ -19,6 +19,7 @@ #include "gfx2DGlue.h" #include "gfxWindowsPlatform.h" #include "IMFYCbCrImage.h" +#include "mozilla/WindowsVersion.h" #ifdef PR_LOGGING PRLogModuleInfo* GetDemuxerLog(); @@ -130,12 +131,22 @@ WMFVideoMFTManager::GetMediaSubtypeGUID() class CreateDXVAManagerEvent : public nsRunnable { public: + CreateDXVAManagerEvent(LayersBackend aBackend) + : mBackend(aBackend) + {} + NS_IMETHOD Run() { NS_ASSERTION(NS_IsMainThread(), "Must be on main thread."); - mDXVA2Manager = DXVA2Manager::Create(); + if (mBackend == LayersBackend::LAYERS_D3D11 && + IsWin8OrLater()) { + mDXVA2Manager = DXVA2Manager::CreateD3D11DXVA(); + } else { + mDXVA2Manager = DXVA2Manager::CreateD3D9DXVA(); + } return NS_OK; } nsAutoPtr mDXVA2Manager; + LayersBackend mBackend; }; bool @@ -159,7 +170,7 @@ WMFVideoMFTManager::InitializeDXVA() } // The DXVA manager must be created on the main thread. - nsRefPtr event(new CreateDXVAManagerEvent()); + nsRefPtr event(new CreateDXVAManagerEvent(mLayersBackend)); NS_DispatchToMainThread(event, NS_DISPATCH_SYNC); mDXVA2Manager = event->mDXVA2Manager; @@ -294,6 +305,11 @@ WMFVideoMFTManager::ConfigureVideoFrameGeometry() return E_FAIL; } + if (mDXVA2Manager) { + hr = mDXVA2Manager->ConfigureForSize(width, height); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + } + // Success! Save state. mVideoInfo.mDisplay = displaySize; GetDefaultStride(mediaType, &mVideoStride); diff --git a/dom/media/webaudio/MediaBufferDecoder.cpp b/dom/media/webaudio/MediaBufferDecoder.cpp index 49682f1bcb..66f4d4e329 100644 --- a/dom/media/webaudio/MediaBufferDecoder.cpp +++ b/dom/media/webaudio/MediaBufferDecoder.cpp @@ -505,7 +505,12 @@ AsyncDecodeWebAudio(const char* aContentType, uint8_t* aBuffer, WebAudioDecodeJob::UnknownError); NS_DispatchToMainThread(event); } else { - task->Reader()->GetTaskQueue()->Dispatch(task); + // If we did this without a temporary: + // task->Reader()->GetTaskQueue()->Dispatch(task.forget()) + // we might evaluate the task.forget() before calling Reader(). Enforce + // a non-crashy order-of-operations. + MediaTaskQueue* taskQueue = task->Reader()->GetTaskQueue(); + taskQueue->Dispatch(task.forget()); } } diff --git a/dom/media/webaudio/blink/HRTFDatabaseLoader.cpp b/dom/media/webaudio/blink/HRTFDatabaseLoader.cpp index 68c692d5cb..0c02728294 100644 --- a/dom/media/webaudio/blink/HRTFDatabaseLoader.cpp +++ b/dom/media/webaudio/blink/HRTFDatabaseLoader.cpp @@ -56,7 +56,7 @@ TemporaryRef HRTFDatabaseLoader::createAndLoadAsynchronously loader = entry->mLoader; if (loader) { // existing entry MOZ_ASSERT(sampleRate == loader->databaseSampleRate()); - return loader; + return loader.forget(); } loader = new HRTFDatabaseLoader(sampleRate); @@ -64,7 +64,7 @@ TemporaryRef HRTFDatabaseLoader::createAndLoadAsynchronously loader->loadAsynchronously(); - return loader; + return loader.forget(); } HRTFDatabaseLoader::HRTFDatabaseLoader(float sampleRate) diff --git a/dom/media/webrtc/RTCIdentityProviderRegistrar.h b/dom/media/webrtc/RTCIdentityProviderRegistrar.h index eb7f4b9fcc..1d7746cc4e 100644 --- a/dom/media/webrtc/RTCIdentityProviderRegistrar.h +++ b/dom/media/webrtc/RTCIdentityProviderRegistrar.h @@ -6,7 +6,7 @@ #ifndef RTCIDENTITYPROVIDER_H_ #define RTCIDENTITYPROVIDER_H_ -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsCOMPtr.h" #include "nsISupportsImpl.h" #include "nsIGlobalObject.h" diff --git a/dom/media/wmf/DXVA2Manager.cpp b/dom/media/wmf/DXVA2Manager.cpp index 52129b0c26..bf7841b48d 100644 --- a/dom/media/wmf/DXVA2Manager.cpp +++ b/dom/media/wmf/DXVA2Manager.cpp @@ -5,16 +5,41 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "DXVA2Manager.h" +#include #include "nsThreadUtils.h" #include "ImageContainer.h" +#include "gfxWindowsPlatform.h" #include "D3D9SurfaceImage.h" +#include "mozilla/layers/D3D11ShareHandleImage.h" #include "mozilla/Preferences.h" +#include "mfapi.h" +#include "MFTDecoder.h" + +const CLSID CLSID_VideoProcessorMFT = +{ + 0x88753b26, + 0x5b24, + 0x49bd, + { 0xb2, 0xe7, 0xc, 0x44, 0x5c, 0x78, 0xc9, 0x82 } +}; + +const GUID MF_XVP_PLAYBACK_MODE = +{ + 0x3c5d293f, + 0xad67, + 0x4e29, + { 0xaf, 0x12, 0xcf, 0x3e, 0x23, 0x8a, 0xcc, 0xe9 } +}; + +DEFINE_GUID(MF_LOW_LATENCY, + 0x9c27891a, 0xed7a, 0x40e1, 0x88, 0xe8, 0xb2, 0x27, 0x27, 0xa0, 0x24, 0xee); namespace mozilla { using layers::Image; using layers::ImageContainer; using layers::D3D9SurfaceImage; +using layers::D3D11ShareHandleImage; class D3D9DXVA2Manager : public DXVA2Manager { @@ -171,7 +196,7 @@ static uint32_t sDXVAVideosCount = 0; /* static */ DXVA2Manager* -DXVA2Manager::Create() +DXVA2Manager::CreateD3D9DXVA() { MOZ_ASSERT(NS_IsMainThread()); HRESULT hr; @@ -194,6 +219,253 @@ DXVA2Manager::Create() return nullptr; } +class D3D11DXVA2Manager : public DXVA2Manager +{ +public: + D3D11DXVA2Manager(); + virtual ~D3D11DXVA2Manager(); + + HRESULT Init(); + + IUnknown* GetDXVADeviceManager() override; + + // Copies a region (aRegion) of the video frame stored in aVideoSample + // into an image which is returned by aOutImage. + HRESULT CopyToImage(IMFSample* aVideoSample, + const nsIntRect& aRegion, + ImageContainer* aContainer, + Image** aOutImage) override; + + virtual HRESULT ConfigureForSize(uint32_t aWidth, uint32_t aHeight) override; + +private: + HRESULT CreateFormatConverter(); + + HRESULT CreateOutputSample(RefPtr& aSample, + RefPtr& aTexture); + + RefPtr mDevice; + RefPtr mContext; + RefPtr mDXGIDeviceManager; + RefPtr mTransform; + uint32_t mWidth; + uint32_t mHeight; + UINT mDeviceManagerToken; +}; + +D3D11DXVA2Manager::D3D11DXVA2Manager() + : mWidth(0) + , mHeight(0) + , mDeviceManagerToken(0) +{ +} + +D3D11DXVA2Manager::~D3D11DXVA2Manager() +{ +} + +IUnknown* +D3D11DXVA2Manager::GetDXVADeviceManager() +{ + MutexAutoLock lock(mLock); + return mDXGIDeviceManager; +} + +HRESULT +D3D11DXVA2Manager::Init() +{ + HRESULT hr; + + mDevice = gfxWindowsPlatform::GetPlatform()->CreateD3D11DecoderDevice(); + NS_ENSURE_TRUE(mDevice, E_FAIL); + + mDevice->GetImmediateContext(byRef(mContext)); + NS_ENSURE_TRUE(mContext, E_FAIL); + + hr = wmf::MFCreateDXGIDeviceManager(&mDeviceManagerToken, byRef(mDXGIDeviceManager)); + NS_ENSURE_TRUE(SUCCEEDED(hr),hr); + + hr = mDXGIDeviceManager->ResetDevice(mDevice, mDeviceManagerToken); + NS_ENSURE_TRUE(SUCCEEDED(hr),hr); + + mTransform = new MFTDecoder(); + hr = mTransform->Create(CLSID_VideoProcessorMFT); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + hr = mTransform->SendMFTMessage(MFT_MESSAGE_SET_D3D_MANAGER, ULONG_PTR(mDXGIDeviceManager.get())); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + return S_OK; +} + +HRESULT +D3D11DXVA2Manager::CreateOutputSample(RefPtr& aSample, RefPtr& aTexture) +{ + RefPtr sample; + HRESULT hr = wmf::MFCreateSample(byRef(sample)); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + D3D11_TEXTURE2D_DESC desc; + desc.Width = mWidth; + desc.Height = mHeight; + desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; + desc.MipLevels = 1; + desc.ArraySize = 1; + desc.SampleDesc.Count = 1; + desc.SampleDesc.Quality = 0; + desc.Usage = D3D11_USAGE_DEFAULT; + desc.BindFlags = D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET; + desc.CPUAccessFlags = 0; + desc.MiscFlags = D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX; + + RefPtr texture; + hr = mDevice->CreateTexture2D(&desc, nullptr, byRef(texture)); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + RefPtr buffer; + hr = wmf::MFCreateDXGISurfaceBuffer(__uuidof(ID3D11Texture2D), texture, 0, FALSE, byRef(buffer)); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + sample->AddBuffer(buffer); + + aSample = sample; + aTexture = texture; + return S_OK; +} + +HRESULT +D3D11DXVA2Manager::CopyToImage(IMFSample* aVideoSample, + const nsIntRect& aRegion, + ImageContainer* aContainer, + Image** aOutImage) +{ + NS_ENSURE_TRUE(aVideoSample, E_POINTER); + NS_ENSURE_TRUE(aContainer, E_POINTER); + NS_ENSURE_TRUE(aOutImage, E_POINTER); + + // Our video frame is stored in a non-sharable ID3D11Texture2D. We need + // to create a copy of that frame as a sharable resource, save its share + // handle, and put that handle into the rendering pipeline. + + HRESULT hr = mTransform->Input(aVideoSample); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + RefPtr sample; + RefPtr texture; + hr = CreateOutputSample(sample, texture); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + RefPtr keyedMutex; + hr = texture->QueryInterface(static_cast(byRef(keyedMutex))); + NS_ENSURE_TRUE(SUCCEEDED(hr) && keyedMutex, hr); + + hr = keyedMutex->AcquireSync(0, INFINITE); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + hr = mTransform->Output(&sample); + + keyedMutex->ReleaseSync(0); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + ImageFormat format = ImageFormat::D3D11_SHARE_HANDLE_TEXTURE; + nsRefPtr image(aContainer->CreateImage(format)); + NS_ENSURE_TRUE(image, E_FAIL); + NS_ASSERTION(image->GetFormat() == ImageFormat::D3D11_SHARE_HANDLE_TEXTURE, + "Wrong format?"); + + D3D11ShareHandleImage* videoImage = static_cast(image.get()); + hr = videoImage->SetData(D3D11ShareHandleImage::Data(texture, mDevice, mContext, aRegion)); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + image.forget(aOutImage); + + return S_OK; +} + +HRESULT ConfigureOutput(IMFMediaType* aOutput, void* aData) +{ + HRESULT hr = aOutput->SetUINT32(MF_MT_INTERLACE_MODE, MFVideoInterlace_Progressive); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + hr = aOutput->SetUINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + gfx::IntSize* size = reinterpret_cast(aData); + hr = MFSetAttributeSize(aOutput, MF_MT_FRAME_SIZE, size->width, size->height); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + return S_OK; +} + +HRESULT +D3D11DXVA2Manager::ConfigureForSize(uint32_t aWidth, uint32_t aHeight) +{ + mWidth = aWidth; + mHeight = aHeight; + + RefPtr inputType; + HRESULT hr = wmf::MFCreateMediaType(byRef(inputType)); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + hr = inputType->SetGUID(MF_MT_MAJOR_TYPE, MFMediaType_Video); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + hr = inputType->SetGUID(MF_MT_SUBTYPE, MFVideoFormat_NV12); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + hr = inputType->SetUINT32(MF_MT_INTERLACE_MODE, MFVideoInterlace_Progressive); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + hr = inputType->SetUINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + RefPtr attr = mTransform->GetAttributes(); + + hr = attr->SetUINT32(MF_XVP_PLAYBACK_MODE, TRUE); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + hr = attr->SetUINT32(MF_LOW_LATENCY, FALSE); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + hr = MFSetAttributeSize(inputType, MF_MT_FRAME_SIZE, aWidth, aHeight); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + RefPtr outputType; + hr = wmf::MFCreateMediaType(byRef(outputType)); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + hr = outputType->SetGUID(MF_MT_MAJOR_TYPE, MFMediaType_Video); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + hr = outputType->SetGUID(MF_MT_SUBTYPE, MFVideoFormat_ARGB32); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + gfx::IntSize size(mWidth, mHeight); + hr = mTransform->SetMediaTypes(inputType, outputType, ConfigureOutput, &size); + NS_ENSURE_TRUE(SUCCEEDED(hr), hr); + + return S_OK; +} + +/* static */ +DXVA2Manager* +DXVA2Manager::CreateD3D11DXVA() +{ + // DXVA processing takes up a lot of GPU resources, so limit the number of + // videos we use DXVA with at any one time. + const uint32_t dxvaLimit = + Preferences::GetInt("media.windows-media-foundation.max-dxva-videos", 8); + if (sDXVAVideosCount == dxvaLimit) { + return nullptr; + } + + nsAutoPtr manager(new D3D11DXVA2Manager()); + HRESULT hr = manager->Init(); + NS_ENSURE_TRUE(SUCCEEDED(hr), nullptr); + + return manager.forget(); +} + DXVA2Manager::DXVA2Manager() : mLock("DXVA2Manager") { diff --git a/dom/media/wmf/DXVA2Manager.h b/dom/media/wmf/DXVA2Manager.h index 7b0fb31891..84c1def13d 100644 --- a/dom/media/wmf/DXVA2Manager.h +++ b/dom/media/wmf/DXVA2Manager.h @@ -23,15 +23,15 @@ class ImageContainer; class DXVA2Manager { public: - // Creates and initializes a DXVA2Manager. Currently we always use D3D9Ex - // to access DXVA, but via this interface we can seamlessly support D3D11 - // DXVA integration if need be. - static DXVA2Manager* Create(); + // Creates and initializes a DXVA2Manager. We can use DXVA2 via either + // D3D9Ex or D3D11. + static DXVA2Manager* CreateD3D9DXVA(); + static DXVA2Manager* CreateD3D11DXVA(); // Returns a pointer to the D3D device manager responsible for managing the // device we're using for hardware accelerated video decoding. If we're using - // D3D9, this is an IDirect3DDeviceManager9. It is safe to call this on any - // thread. + // D3D9Ex, this is an IDirect3DDeviceManager9. For D3D11 this is an + // IMFDXGIDeviceManager. It is safe to call this on any thread. virtual IUnknown* GetDXVADeviceManager() = 0; // Creates an Image for the video frame stored in aVideoSample. @@ -40,6 +40,8 @@ public: layers::ImageContainer* aContainer, layers::Image** aOutImage) = 0; + virtual HRESULT ConfigureForSize(uint32_t aWidth, uint32_t aHeight) { return S_OK; } + virtual ~DXVA2Manager(); protected: diff --git a/dom/media/wmf/WMF.h b/dom/media/wmf/WMF.h index 2fdfb975c3..9e87f147a0 100644 --- a/dom/media/wmf/WMF.h +++ b/dom/media/wmf/WMF.h @@ -123,12 +123,21 @@ HRESULT MFGetService(IUnknown *punkObject, HRESULT DXVA2CreateDirect3DDeviceManager9(UINT *pResetToken, IDirect3DDeviceManager9 **ppDXVAManager); + +HRESULT MFCreateDXGIDeviceManager(UINT *pResetToken, IMFDXGIDeviceManager **ppDXVAManager); + HRESULT MFCreateSample(IMFSample **ppIMFSample); HRESULT MFCreateAlignedMemoryBuffer(DWORD cbMaxLength, DWORD fAlignmentFlags, IMFMediaBuffer **ppBuffer); +HRESULT MFCreateDXGISurfaceBuffer(REFIID riid, + IUnknown *punkSurface, + UINT uSubresourceIndex, + BOOL fButtomUpWhenLinear, + IMFMediaBuffer **ppBuffer); + } // end namespace wmf } // end namespace mozilla diff --git a/dom/media/wmf/WMFReader.cpp b/dom/media/wmf/WMFReader.cpp index 650f641806..c032039c92 100644 --- a/dom/media/wmf/WMFReader.cpp +++ b/dom/media/wmf/WMFReader.cpp @@ -116,7 +116,7 @@ WMFReader::InitializeDXVA() return false; } - mDXVA2Manager = DXVA2Manager::Create(); + mDXVA2Manager = DXVA2Manager::CreateD3D9DXVA(); return mDXVA2Manager != nullptr; } diff --git a/dom/media/wmf/WMFUtils.cpp b/dom/media/wmf/WMFUtils.cpp index 9b23f22a09..04d2f500b3 100644 --- a/dom/media/wmf/WMFUtils.cpp +++ b/dom/media/wmf/WMFUtils.cpp @@ -492,7 +492,7 @@ UnloadDLLs() #define ENSURE_FUNCTION_PTR_HELPER(FunctionType, FunctionName, DLL) \ static FunctionType FunctionName##Ptr = nullptr; \ if (!FunctionName##Ptr) { \ - FunctionName##Ptr = (FunctionType) GetProcAddress(GetModuleHandle(#DLL), #FunctionName); \ + FunctionName##Ptr = (FunctionType) GetProcAddress(GetModuleHandleW(L#DLL), #FunctionName); \ if (!FunctionName##Ptr) { \ NS_WARNING("Failed to get GetProcAddress of " #FunctionName " from " #DLL); \ return E_FAIL; \ @@ -676,5 +676,24 @@ MFCreateAlignedMemoryBuffer(DWORD cbMaxLength, return (MFCreateAlignedMemoryBufferPtr)(cbMaxLength, fAlignmentFlags, ppBuffer); } +HRESULT +MFCreateDXGIDeviceManager(UINT *pResetToken, IMFDXGIDeviceManager **ppDXVAManager) +{ + DECL_FUNCTION_PTR(MFCreateDXGIDeviceManager, UINT*, IMFDXGIDeviceManager**); + ENSURE_FUNCTION_PTR(MFCreateDXGIDeviceManager, mfplat.dll) + return (MFCreateDXGIDeviceManagerPtr)(pResetToken, ppDXVAManager); +} + +HRESULT +MFCreateDXGISurfaceBuffer(REFIID riid, + IUnknown *punkSurface, + UINT uSubresourceIndex, + BOOL fButtomUpWhenLinear, + IMFMediaBuffer **ppBuffer) +{ + ENSURE_FUNCTION_PTR(MFCreateDXGISurfaceBuffer, mfplat.dll) + return (MFCreateDXGISurfaceBufferPtr)(riid, punkSurface, uSubresourceIndex, fButtomUpWhenLinear, ppBuffer); +} + } // end namespace wmf } // end namespace mozilla diff --git a/dom/media/wmf/moz.build b/dom/media/wmf/moz.build index b54d90b885..1fc960a3ae 100644 --- a/dom/media/wmf/moz.build +++ b/dom/media/wmf/moz.build @@ -24,6 +24,8 @@ SOURCES += [ 'WMFUtils.cpp', ] +include('/ipc/chromium/chromium-config.mozbuild') + FAIL_ON_WARNINGS = True FINAL_LIBRARY = 'xul' diff --git a/dom/plugins/base/nsNPAPIPluginInstance.h b/dom/plugins/base/nsNPAPIPluginInstance.h index 9b23aad1e2..8f150be2bb 100644 --- a/dom/plugins/base/nsNPAPIPluginInstance.h +++ b/dom/plugins/base/nsNPAPIPluginInstance.h @@ -29,7 +29,7 @@ class SharedPluginTexture; #include "mozilla/TimeStamp.h" #include "mozilla/PluginLibrary.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" class nsPluginStreamListenerPeer; // browser-initiated stream class class nsNPAPIPluginStreamListener; // plugin-initiated stream class diff --git a/dom/promise/PromiseDebugging.h b/dom/promise/PromiseDebugging.h index 29e0d8392a..be960add79 100644 --- a/dom/promise/PromiseDebugging.h +++ b/dom/promise/PromiseDebugging.h @@ -9,7 +9,7 @@ #include "js/TypeDecls.h" #include "nsTArray.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" namespace mozilla { diff --git a/dom/svg/nsSVGPathGeometryElement.cpp b/dom/svg/nsSVGPathGeometryElement.cpp index 33a5f8fa80..704824a459 100644 --- a/dom/svg/nsSVGPathGeometryElement.cpp +++ b/dom/svg/nsSVGPathGeometryElement.cpp @@ -88,7 +88,8 @@ nsSVGPathGeometryElement::GetOrBuildPath(const DrawTarget& aDrawTarget, // looking at the global variable that the pref's stored in. if (cacheable && mCachedPath) { if (aDrawTarget.GetBackendType() == mCachedPath->GetBackendType()) { - return mCachedPath; + RefPtr path(mCachedPath); + return path.forget(); } } RefPtr builder = aDrawTarget.CreatePathBuilder(aFillRule); diff --git a/dom/system/gonk/MozMtpDatabase.cpp b/dom/system/gonk/MozMtpDatabase.cpp index 311ec17a6a..9855ecf662 100644 --- a/dom/system/gonk/MozMtpDatabase.cpp +++ b/dom/system/gonk/MozMtpDatabase.cpp @@ -164,7 +164,7 @@ MozMtpDatabase::GetEntry(MtpObjectHandle aHandle) if (aHandle > 0 && aHandle < mDb.Length()) { entry = mDb[aHandle]; } - return entry; + return entry.forget(); } void diff --git a/dom/system/gonk/VolumeManager.cpp b/dom/system/gonk/VolumeManager.cpp index bd6c58c0e4..a822089e32 100644 --- a/dom/system/gonk/VolumeManager.cpp +++ b/dom/system/gonk/VolumeManager.cpp @@ -75,7 +75,8 @@ TemporaryRef VolumeManager::GetVolume(size_t aIndex) { MOZ_ASSERT(aIndex < NumVolumes()); - return sVolumeManager->mVolumeArray[aIndex]; + RefPtr vol = sVolumeManager->mVolumeArray[aIndex]; + return vol.forget(); } //static @@ -135,7 +136,7 @@ VolumeManager::FindVolumeByName(const nsCSubstring& aName) for (volIndex = 0; volIndex < numVolumes; volIndex++) { RefPtr vol = GetVolume(volIndex); if (vol->Name().Equals(aName)) { - return vol; + return vol.forget(); } } return nullptr; @@ -147,12 +148,12 @@ VolumeManager::FindAddVolumeByName(const nsCSubstring& aName) { RefPtr vol = FindVolumeByName(aName); if (vol) { - return vol; + return vol.forget(); } // No volume found, create and add a new one. vol = new Volume(aName); sVolumeManager->mVolumeArray.AppendElement(vol); - return vol; + return vol.forget(); } //static diff --git a/dom/webidl/Event.webidl b/dom/webidl/Event.webidl index feed043685..aebbdc8e36 100644 --- a/dom/webidl/Event.webidl +++ b/dom/webidl/Event.webidl @@ -17,6 +17,8 @@ interface Event { readonly attribute DOMString type; [Pure] readonly attribute EventTarget? target; + [Pure, BinaryName="target"] + readonly attribute EventTarget? srcElement; [Pure] readonly attribute EventTarget? currentTarget; diff --git a/dom/workers/WorkerThread.h b/dom/workers/WorkerThread.h index 1a4b61e00c..aa8dba0d69 100644 --- a/dom/workers/WorkerThread.h +++ b/dom/workers/WorkerThread.h @@ -11,7 +11,7 @@ #include "mozilla/CondVar.h" #include "mozilla/DebugOnly.h" #include "nsISupportsImpl.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsThread.h" class nsIRunnable; diff --git a/gfx/2d/DataSourceSurface.cpp b/gfx/2d/DataSourceSurface.cpp index 573ae034a3..b9a63d45ba 100644 --- a/gfx/2d/DataSourceSurface.cpp +++ b/gfx/2d/DataSourceSurface.cpp @@ -12,7 +12,9 @@ namespace gfx { TemporaryRef DataSourceSurface::GetDataSurface() { - return (GetType() == SurfaceType::DATA) ? this : new DataSourceSurfaceWrapper(this); + RefPtr surface = + (GetType() == SurfaceType::DATA) ? this : new DataSourceSurfaceWrapper(this); + return surface.forget(); } } diff --git a/gfx/2d/DrawTarget.cpp b/gfx/2d/DrawTarget.cpp index 63f7289938..21b8512562 100644 --- a/gfx/2d/DrawTarget.cpp +++ b/gfx/2d/DrawTarget.cpp @@ -21,7 +21,7 @@ DrawTarget::CreateCaptureDT(const IntSize& aSize) return nullptr; } - return dt; + return dt.forget(); } void diff --git a/gfx/2d/DrawTargetCG.cpp b/gfx/2d/DrawTargetCG.cpp index 1bd92f2125..640fcc4110 100644 --- a/gfx/2d/DrawTargetCG.cpp +++ b/gfx/2d/DrawTargetCG.cpp @@ -190,13 +190,14 @@ DrawTargetCG::Snapshot() { if (!mSnapshot) { if (GetContextType(mCg) == CG_CONTEXT_TYPE_IOSURFACE) { - return new SourceSurfaceCGIOSurfaceContext(this); + return MakeAndAddRef(this); } Flush(); mSnapshot = new SourceSurfaceCGBitmapContext(this); } - return mSnapshot; + RefPtr snapshot(mSnapshot); + return snapshot.forget(); } TemporaryRef @@ -261,7 +262,8 @@ GetRetainedImageFromSourceSurface(SourceSurface *aSurface) TemporaryRef DrawTargetCG::OptimizeSourceSurface(SourceSurface *aSurface) const { - return aSurface; + RefPtr surface(aSurface); + return surface.forget(); } class UnboundnessFixer @@ -464,7 +466,7 @@ DrawTargetCG::CreateGradientStops(GradientStop *aStops, uint32_t aNumStops, ExtendMode aExtendMode) const { std::vector stops(aStops, aStops+aNumStops); - return new GradientStopsCG(mColorSpace, stops, aExtendMode); + return MakeAndAddRef(mColorSpace, stops, aExtendMode); } static void @@ -1734,7 +1736,7 @@ DrawTargetCG::Init(BackendType aType, const IntSize &aSize, SurfaceFormat &aForm TemporaryRef DrawTargetCG::CreatePathBuilder(FillRule aFillRule) const { - return new PathBuilderCG(aFillRule); + return MakeAndAddRef(aFillRule); } void* diff --git a/gfx/2d/DrawTargetCairo.cpp b/gfx/2d/DrawTargetCairo.cpp index 441068a3dc..c2833014ec 100644 --- a/gfx/2d/DrawTargetCairo.cpp +++ b/gfx/2d/DrawTargetCairo.cpp @@ -656,7 +656,8 @@ TemporaryRef DrawTargetCairo::Snapshot() { if (mSnapshot) { - return mSnapshot; + RefPtr snapshot(mSnapshot); + return snapshot.forget(); } IntSize size = GetSize(); @@ -665,7 +666,8 @@ DrawTargetCairo::Snapshot() size, GfxFormatForCairoSurface(mSurface), this); - return mSnapshot; + RefPtr snapshot(mSnapshot); + return snapshot.forget(); } bool @@ -1324,7 +1326,7 @@ DrawTargetCairo::PopClip() TemporaryRef DrawTargetCairo::CreatePathBuilder(FillRule aFillRule /* = FillRule::FILL_WINDING */) const { - return new PathBuilderCairo(aFillRule); + return MakeAndAddRef(aFillRule); } void @@ -1344,7 +1346,7 @@ TemporaryRef DrawTargetCairo::CreateGradientStops(GradientStop *aStops, uint32_t aNumStops, ExtendMode aExtendMode) const { - return new GradientStopsCairo(aStops, aNumStops, aExtendMode); + return MakeAndAddRef(aStops, aNumStops, aExtendMode); } TemporaryRef @@ -1398,21 +1400,22 @@ DestroyPixmap(void *data) TemporaryRef DrawTargetCairo::OptimizeSourceSurface(SourceSurface *aSurface) const { + RefPtr surface(aSurface); #ifdef CAIRO_HAS_XLIB_SURFACE cairo_surface_type_t ctype = cairo_surface_get_type(mSurface); if (aSurface->GetType() == SurfaceType::CAIRO && cairo_surface_get_type( static_cast(aSurface)->GetSurface()) == ctype) { - return aSurface; + return surface.forget(); } if (ctype != CAIRO_SURFACE_TYPE_XLIB) { - return aSurface; + return surface.forget(); } IntSize size = aSurface->GetSize(); if (!size.width || !size.height) { - return aSurface; + return surface.forget(); } // Although the dimension parameters in the xCreatePixmapReq wire protocol are @@ -1422,7 +1425,7 @@ DrawTargetCairo::OptimizeSourceSurface(SourceSurface *aSurface) const if (size.width > XLIB_IMAGE_SIDE_SIZE_LIMIT || size.height > XLIB_IMAGE_SIDE_SIZE_LIMIT) { - return aSurface; + return surface.forget(); } SurfaceFormat format = aSurface->GetFormat(); @@ -1440,17 +1443,17 @@ DrawTargetCairo::OptimizeSourceSurface(SourceSurface *aSurface) const xrenderFormat = XRenderFindStandardFormat(dpy, PictStandardA8); break; default: - return aSurface; + return surface.forget(); } if (!xrenderFormat) { - return aSurface; + return surface.forget(); } Drawable pixmap = XCreatePixmap(dpy, RootWindowOfScreen(screen), size.width, size.height, xrenderFormat->depth); if (!pixmap) { - return aSurface; + return surface.forget(); } ScopedDeletePtr closure( @@ -1461,7 +1464,7 @@ DrawTargetCairo::OptimizeSourceSurface(SourceSurface *aSurface) const screen, xrenderFormat, size.width, size.height)); if (!csurf || cairo_surface_status(csurf)) { - return aSurface; + return surface.forget(); } cairo_surface_set_user_data(csurf, &gDestroyPixmapKey, @@ -1469,7 +1472,7 @@ DrawTargetCairo::OptimizeSourceSurface(SourceSurface *aSurface) const RefPtr dt = new DrawTargetCairo(); if (!dt->Init(csurf, size, &format)) { - return aSurface; + return surface.forget(); } dt->CopySurface(aSurface, @@ -1477,10 +1480,10 @@ DrawTargetCairo::OptimizeSourceSurface(SourceSurface *aSurface) const IntPoint(0, 0)); dt->Flush(); - return new SourceSurfaceCairo(csurf, size, format); + surface = new SourceSurfaceCairo(csurf, size, format); #endif - return aSurface; + return surface.forget(); } TemporaryRef @@ -1493,7 +1496,7 @@ DrawTargetCairo::CreateSourceSurfaceFromNativeSurface(const NativeSurface &aSurf return nullptr; } cairo_surface_t* surf = static_cast(aSurface.mSurface); - return new SourceSurfaceCairo(surf, aSurface.mSize, aSurface.mFormat); + return MakeAndAddRef(surf, aSurface.mSize, aSurface.mFormat); } return nullptr; diff --git a/gfx/2d/DrawTargetD2D.cpp b/gfx/2d/DrawTargetD2D.cpp index 2d80f2a7a7..8d03efcf8f 100644 --- a/gfx/2d/DrawTargetD2D.cpp +++ b/gfx/2d/DrawTargetD2D.cpp @@ -223,7 +223,8 @@ DrawTargetD2D::Snapshot() Flush(); } - return mSnapshot; + RefPtr snapshot(mSnapshot); + return snapshot.forget(); } void @@ -317,7 +318,7 @@ DrawTargetD2D::GetBitmapForSurface(SourceSurface *aSurface, break; } - return bitmap; + return bitmap.forget(); } TemporaryRef @@ -328,7 +329,7 @@ DrawTargetD2D::GetImageForSurface(SourceSurface *aSurface) Rect r(Point(), Size(aSurface->GetSize())); image = GetBitmapForSurface(aSurface, r); - return image; + return image.forget(); } void @@ -1198,7 +1199,8 @@ DrawTargetD2D::OptimizeSourceSurface(SourceSurface *aSurface) const { if (aSurface->GetType() == SurfaceType::D2D1_BITMAP || aSurface->GetType() == SurfaceType::D2D1_DRAWTARGET) { - return aSurface; + RefPtr surface(aSurface); + return surface.forget(); } RefPtr data = aSurface->GetDataSurface(); @@ -1275,7 +1277,7 @@ DrawTargetD2D::CreatePathBuilder(FillRule aFillRule) const sink->SetFillMode(D2D1_FILL_MODE_WINDING); } - return new PathBuilderD2D(sink, path, aFillRule, BackendType::DIRECT2D); + return MakeAndAddRef(sink, path, aFillRule, BackendType::DIRECT2D); } TemporaryRef @@ -1301,7 +1303,7 @@ DrawTargetD2D::CreateGradientStops(GradientStop *rawStops, uint32_t aNumStops, E return nullptr; } - return new GradientStopsD2D(stopCollection, Factory::GetDirect3D11Device()); + return MakeAndAddRef(stopCollection, Factory::GetDirect3D11Device()); } TemporaryRef @@ -1858,7 +1860,8 @@ DrawTargetD2D::GetClippedGeometry(IntRect *aClipBounds) { if (mCurrentClippedGeometry) { *aClipBounds = mCurrentClipBounds; - return mCurrentClippedGeometry; + RefPtr clippedGeometry(mCurrentClippedGeometry); + return clippedGeometry.forget(); } mCurrentClipBounds = IntRect(IntPoint(0, 0), mSize); @@ -1937,7 +1940,8 @@ DrawTargetD2D::GetClippedGeometry(IntRect *aClipBounds) } mCurrentClippedGeometry = pathGeom.forget(); *aClipBounds = mCurrentClipBounds; - return mCurrentClippedGeometry; + RefPtr clippedGeometry(mCurrentClippedGeometry); + return clippedGeometry.forget(); } TemporaryRef diff --git a/gfx/2d/DrawTargetD2D1.cpp b/gfx/2d/DrawTargetD2D1.cpp index c949716f08..5098a627a2 100644 --- a/gfx/2d/DrawTargetD2D1.cpp +++ b/gfx/2d/DrawTargetD2D1.cpp @@ -69,7 +69,8 @@ TemporaryRef DrawTargetD2D1::Snapshot() { if (mSnapshot) { - return mSnapshot; + RefPtr snapshot(mSnapshot); + return snapshot.forget(); } PopAllClips(); @@ -77,7 +78,8 @@ DrawTargetD2D1::Snapshot() mSnapshot = new SourceSurfaceD2D1(mBitmap, mDC, mFormat, mSize, this); - return mSnapshot; + RefPtr snapshot(mSnapshot); + return snapshot.forget(); } void @@ -657,7 +659,7 @@ DrawTargetD2D1::CreateSourceSurfaceFromData(unsigned char *aData, return nullptr; } - return new SourceSurfaceD2D1(bitmap.get(), mDC, aFormat, aSize); + return MakeAndAddRef(bitmap.get(), mDC, aFormat, aSize); } TemporaryRef @@ -694,7 +696,7 @@ DrawTargetD2D1::CreatePathBuilder(FillRule aFillRule) const sink->SetFillMode(D2D1_FILL_MODE_WINDING); } - return new PathBuilderD2D(sink, path, aFillRule, BackendType::DIRECT2D1_1); + return MakeAndAddRef(sink, path, aFillRule, BackendType::DIRECT2D1_1); } TemporaryRef @@ -725,7 +727,7 @@ DrawTargetD2D1::CreateGradientStops(GradientStop *rawStops, uint32_t aNumStops, return nullptr; } - return new GradientStopsD2D(stopCollection, Factory::GetDirect3D11Device()); + return MakeAndAddRef(stopCollection, Factory::GetDirect3D11Device()); } TemporaryRef @@ -783,9 +785,21 @@ DrawTargetD2D1::Init(ID3D11Texture2D* aTexture, SurfaceFormat aFormat) return false; } + // This single solid color brush system is not very 'threadsafe', however, + // issueing multiple drawing commands simultaneously to a single drawtarget + // from multiple threads is unexpected since there's no way to guarantee + // ordering in that situation anyway. + hr = mDC->CreateSolidColorBrush(D2D1::ColorF(0, 0), byRef(mSolidColorBrush)); + + if (FAILED(hr)) { + gfxCriticalError() << "[D2D1.1] Failure creating solid color brush."; + return false; + } + mDC->SetTarget(mBitmap); mDC->BeginDraw(); + return true; } @@ -833,6 +847,13 @@ DrawTargetD2D1::Init(const IntSize &aSize, SurfaceFormat aFormat) mDC->SetTarget(mBitmap); + hr = mDC->CreateSolidColorBrush(D2D1::ColorF(0, 0), byRef(mSolidColorBrush)); + + if (FAILED(hr)) { + gfxCriticalError() << "[D2D1.1] Failure creating solid color brush."; + return false; + } + mDC->BeginDraw(); mDC->Clear(); @@ -1093,7 +1114,8 @@ DrawTargetD2D1::GetClippedGeometry(IntRect *aClipBounds) { if (mCurrentClippedGeometry) { *aClipBounds = mCurrentClipBounds; - return mCurrentClippedGeometry; + RefPtr clippedGeometry(mCurrentClippedGeometry); + return clippedGeometry.forget(); } MOZ_ASSERT(mPushedClips.size()); @@ -1174,7 +1196,8 @@ DrawTargetD2D1::GetClippedGeometry(IntRect *aClipBounds) } mCurrentClippedGeometry = pathGeom.forget(); *aClipBounds = mCurrentClipBounds; - return mCurrentClippedGeometry; + RefPtr clippedGeometry(mCurrentClippedGeometry); + return clippedGeometry.forget(); } TemporaryRef @@ -1192,7 +1215,7 @@ DrawTargetD2D1::GetInverseClippedGeometry() rectGeom->CombineWithGeometry(geom, D2D1_COMBINE_MODE_EXCLUDE, D2D1::IdentityMatrix(), sink); sink->Close(); - return inverseGeom; + return inverseGeom.forget(); } void @@ -1246,28 +1269,27 @@ DrawTargetD2D1::PopClipsFromDC(ID2D1DeviceContext *aDC) TemporaryRef DrawTargetD2D1::CreateTransparentBlackBrush() { - RefPtr brush; - mDC->CreateSolidColorBrush(D2D1::ColorF(0, 0), byRef(brush)); - return brush; + return GetSolidColorBrush(D2D1::ColorF(0, 0)); +} + +TemporaryRef +DrawTargetD2D1::GetSolidColorBrush(const D2D_COLOR_F& aColor) +{ + RefPtr brush = mSolidColorBrush; + brush->SetColor(aColor); + return brush.forget(); } TemporaryRef DrawTargetD2D1::CreateBrushForPattern(const Pattern &aPattern, Float aAlpha) { if (!IsPatternSupportedByD2D(aPattern)) { - RefPtr colBrush; - mDC->CreateSolidColorBrush(D2D1::ColorF(1.0f, 1.0f, 1.0f, 1.0f), byRef(colBrush)); - return colBrush.forget(); + return GetSolidColorBrush(D2D1::ColorF(1.0f, 1.0f, 1.0f, 1.0f)); } if (aPattern.GetType() == PatternType::COLOR) { - RefPtr colBrush; Color color = static_cast(&aPattern)->mColor; - mDC->CreateSolidColorBrush(D2D1::ColorF(color.r, color.g, - color.b, color.a), - D2D1::BrushProperties(aAlpha), - byRef(colBrush)); - return colBrush.forget(); + return GetSolidColorBrush(D2D1::ColorF(color.r, color.g, color.b, color.a * aAlpha)); } if (aPattern.GetType() == PatternType::LINEAR_GRADIENT) { RefPtr gradBrush; @@ -1282,14 +1304,11 @@ DrawTargetD2D1::CreateBrushForPattern(const Pattern &aPattern, Float aAlpha) } if (pat->mBegin == pat->mEnd) { - RefPtr colBrush; uint32_t stopCount = stops->mStopCollection->GetGradientStopCount(); vector d2dStops(stopCount); stops->mStopCollection->GetGradientStops(&d2dStops.front(), stopCount); - mDC->CreateSolidColorBrush(d2dStops.back().color, - D2D1::BrushProperties(aAlpha), - byRef(colBrush)); - return colBrush.forget(); + d2dStops.back().color.a *= aAlpha; + return GetSolidColorBrush(d2dStops.back().color); } mDC->CreateLinearGradientBrush(D2D1::LinearGradientBrushProperties(D2DPoint(pat->mBegin), @@ -1375,6 +1394,12 @@ DrawTargetD2D1::CreateBrushForPattern(const Pattern &aPattern, Float aAlpha) D2DInterpolationMode(pat->mFilter)), D2D1::BrushProperties(aAlpha, D2DMatrix(mat)), byRef(imageBrush)); + + if (!imageBrush) { + gfxWarning() << "Couldn't create image brush!"; + return CreateTransparentBlackBrush(); + } + return imageBrush.forget(); } @@ -1416,7 +1441,8 @@ TemporaryRef DrawTargetD2D1::OptimizeSourceSurface(SourceSurface* aSurface) const { if (aSurface->GetType() == SurfaceType::D2D1_1_IMAGE) { - return aSurface; + RefPtr surface(aSurface); + return surface.forget(); } RefPtr data = aSurface->GetDataSurface(); @@ -1441,7 +1467,7 @@ DrawTargetD2D1::OptimizeSourceSurface(SourceSurface* aSurface) const return data.forget(); } - return new SourceSurfaceD2D1(bitmap.get(), mDC, data->GetFormat(), data->GetSize()); + return MakeAndAddRef(bitmap.get(), mDC, data->GetFormat(), data->GetSize()); } void diff --git a/gfx/2d/DrawTargetD2D1.h b/gfx/2d/DrawTargetD2D1.h index f769e0a2b4..dd1b453aaa 100644 --- a/gfx/2d/DrawTargetD2D1.h +++ b/gfx/2d/DrawTargetD2D1.h @@ -185,6 +185,7 @@ private: void PopClipsFromDC(ID2D1DeviceContext *aDC); TemporaryRef CreateTransparentBlackBrush(); + TemporaryRef GetSolidColorBrush(const D2D_COLOR_F& aColor); TemporaryRef CreateBrushForPattern(const Pattern &aPattern, Float aAlpha = 1.0f); void PushD2DLayer(ID2D1DeviceContext *aDC, ID2D1Geometry *aGeometry, const D2D1_MATRIX_3X2_F &aTransform); @@ -203,6 +204,8 @@ private: RefPtr mTempBitmap; RefPtr mBlendEffect; + RefPtr mSolidColorBrush; + // We store this to prevent excessive SetTextRenderingParams calls. RefPtr mTextRenderingParams; diff --git a/gfx/2d/DrawTargetDual.cpp b/gfx/2d/DrawTargetDual.cpp index e971337b2c..86ad04d7f3 100644 --- a/gfx/2d/DrawTargetDual.cpp +++ b/gfx/2d/DrawTargetDual.cpp @@ -192,7 +192,7 @@ DrawTargetDual::CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFor return nullptr; } - return new DrawTargetDual(dtA, dtB); + return MakeAndAddRef(dtA, dtB); } } diff --git a/gfx/2d/DrawTargetDual.h b/gfx/2d/DrawTargetDual.h index 0cb0fe420c..591b7da755 100644 --- a/gfx/2d/DrawTargetDual.h +++ b/gfx/2d/DrawTargetDual.h @@ -45,7 +45,9 @@ public: virtual DrawTargetType GetType() const override { return mA->GetType(); } virtual BackendType GetBackendType() const override { return mA->GetBackendType(); } - virtual TemporaryRef Snapshot() override { return new SourceSurfaceDual(mA, mB); } + virtual TemporaryRef Snapshot() override { + return MakeAndAddRef(mA, mB); + } virtual IntSize GetSize() override { return mA->GetSize(); } FORWARD_FUNCTION(Flush) diff --git a/gfx/2d/DrawTargetRecording.cpp b/gfx/2d/DrawTargetRecording.cpp index a39f978449..b437229fa9 100644 --- a/gfx/2d/DrawTargetRecording.cpp +++ b/gfx/2d/DrawTargetRecording.cpp @@ -541,14 +541,14 @@ TemporaryRef DrawTargetRecording::CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFormat) const { RefPtr dt = mFinalDT->CreateSimilarDrawTarget(aSize, aFormat); - return new DrawTargetRecording(mRecorder.get(), dt); + return MakeAndAddRef(mRecorder.get(), dt); } TemporaryRef DrawTargetRecording::CreatePathBuilder(FillRule aFillRule) const { RefPtr builder = mFinalDT->CreatePathBuilder(aFillRule); - return new PathBuilderRecording(builder, aFillRule); + return MakeAndAddRef(builder, aFillRule); } TemporaryRef diff --git a/gfx/2d/DrawTargetSkia.cpp b/gfx/2d/DrawTargetSkia.cpp index 837cf99228..017449062a 100644 --- a/gfx/2d/DrawTargetSkia.cpp +++ b/gfx/2d/DrawTargetSkia.cpp @@ -649,7 +649,8 @@ TemporaryRef DrawTargetSkia::OptimizeSourceSurface(SourceSurface *aSurface) const { if (aSurface->GetType() == SurfaceType::SKIA) { - return aSurface; + RefPtr surface(aSurface); + return surface.forget(); } if (!UsingSkiaGPU()) { @@ -686,13 +687,13 @@ DrawTargetSkia::CreateSourceSurfaceFromNativeSurface(const NativeSurface &aSurfa return nullptr; } cairo_surface_t* surf = static_cast(aSurface.mSurface); - return new SourceSurfaceCairo(surf, aSurface.mSize, aSurface.mFormat); + return MakeAndAddRef(surf, aSurface.mSize, aSurface.mFormat); #if USE_SKIA_GPU } else if (aSurface.mType == NativeSurfaceType::OPENGL_TEXTURE) { RefPtr newSurf = new SourceSurfaceSkia(); unsigned int texture = (unsigned int)((uintptr_t)aSurface.mSurface); if (UsingSkiaGPU() && newSurf->InitFromTexture((DrawTargetSkia*)this, texture, aSurface.mSize, aSurface.mFormat)) { - return newSurf; + return newSurf.forget(); } return nullptr; #endif @@ -873,7 +874,7 @@ DrawTargetSkia::GetNativeSurface(NativeSurfaceType aType) TemporaryRef DrawTargetSkia::CreatePathBuilder(FillRule aFillRule) const { - return new PathBuilderSkia(aFillRule); + return MakeAndAddRef(aFillRule); } void @@ -926,7 +927,7 @@ DrawTargetSkia::CreateGradientStops(GradientStop *aStops, uint32_t aNumStops, Ex } std::stable_sort(stops.begin(), stops.end()); - return new GradientStopsSkia(stops, aNumStops, aExtendMode); + return MakeAndAddRef(stops, aNumStops, aExtendMode); } TemporaryRef diff --git a/gfx/2d/DrawTargetTiled.cpp b/gfx/2d/DrawTargetTiled.cpp index 641b3cef70..739ae6a26e 100644 --- a/gfx/2d/DrawTargetTiled.cpp +++ b/gfx/2d/DrawTargetTiled.cpp @@ -53,7 +53,7 @@ DrawTargetTiled::Init(const TileSet& aTiles) TemporaryRef DrawTargetTiled::Snapshot() { - return new SnapshotTiled(mTiles, mRect); + return MakeAndAddRef(mTiles, mRect); } // Skip the mClippedOut check since this is only used for Flush() which diff --git a/gfx/2d/Factory.cpp b/gfx/2d/Factory.cpp index 6750c28f85..9ada63c691 100644 --- a/gfx/2d/Factory.cpp +++ b/gfx/2d/Factory.cpp @@ -387,7 +387,7 @@ Factory::CreateDrawTarget(BackendType aBackend, const IntSize &aSize, SurfaceFor } if (mRecorder && retVal) { - return new DrawTargetRecording(mRecorder, retVal); + return MakeAndAddRef(mRecorder, retVal); } if (!retVal) { @@ -401,7 +401,7 @@ Factory::CreateDrawTarget(BackendType aBackend, const IntSize &aSize, SurfaceFor TemporaryRef Factory::CreateRecordingDrawTarget(DrawEventRecorder *aRecorder, DrawTarget *aDT) { - return new DrawTargetRecording(aRecorder, aDT); + return MakeAndAddRef(aRecorder, aDT); } TemporaryRef @@ -456,7 +456,7 @@ Factory::CreateDrawTargetForData(BackendType aBackend, } if (mRecorder && retVal) { - return new DrawTargetRecording(mRecorder, retVal, true); + return MakeAndAddRef(mRecorder, retVal, true); } if (!retVal) { @@ -528,25 +528,25 @@ Factory::CreateScaledFontForNativeFont(const NativeFont &aNativeFont, Float aSiz #ifdef WIN32 case NativeFontType::DWRITE_FONT_FACE: { - return new ScaledFontDWrite(static_cast(aNativeFont.mFont), aSize); + return MakeAndAddRef(static_cast(aNativeFont.mFont), aSize); } #if defined(USE_CAIRO) || defined(USE_SKIA) case NativeFontType::GDI_FONT_FACE: { - return new ScaledFontWin(static_cast(aNativeFont.mFont), aSize); + return MakeAndAddRef(static_cast(aNativeFont.mFont), aSize); } #endif #endif #ifdef XP_MACOSX case NativeFontType::MAC_FONT_FACE: { - return new ScaledFontMac(static_cast(aNativeFont.mFont), aSize); + return MakeAndAddRef(static_cast(aNativeFont.mFont), aSize); } #endif #if defined(USE_CAIRO) || defined(USE_SKIA_FREETYPE) case NativeFontType::CAIRO_FONT_FACE: { - return new ScaledFontCairo(static_cast(aNativeFont.mFont), aSize); + return MakeAndAddRef(static_cast(aNativeFont.mFont), aSize); } #endif default: @@ -564,7 +564,7 @@ Factory::CreateScaledFontForTrueTypeData(uint8_t *aData, uint32_t aSize, #ifdef WIN32 case FontType::DWRITE: { - return new ScaledFontDWrite(aData, aSize, aFaceIndex, aGlyphSize); + return MakeAndAddRef(aData, aSize, aFaceIndex, aGlyphSize); } #endif default: @@ -702,7 +702,7 @@ Factory::CreateDrawTargetForD3D11Texture(ID3D11Texture2D *aTexture, SurfaceForma retVal = new DrawTargetRecording(mRecorder, retVal, true); } - return retVal; + return retVal.forget(); } gfxWarning() << "Failed to create draw target for D3D11 texture."; @@ -753,7 +753,7 @@ Factory::SupportsD2D1() TemporaryRef Factory::CreateDWriteGlyphRenderingOptions(IDWriteRenderingParams *aParams) { - return new GlyphRenderingOptionsDWrite(aParams); + return MakeAndAddRef(aParams); } uint64_t @@ -827,8 +827,7 @@ Factory::CreateDrawTargetForCairoSurface(cairo_surface_t* aSurface, const IntSiz } if (mRecorder && retVal) { - RefPtr recordDT = new DrawTargetRecording(mRecorder, retVal, true); - return recordDT.forget(); + return MakeAndAddRef(mRecorder, retVal, true); } #endif return retVal.forget(); @@ -847,7 +846,7 @@ Factory::CreateDrawTargetForCairoCGContext(CGContextRef cg, const IntSize& aSize } if (mRecorder && retVal) { - return new DrawTargetRecording(mRecorder, retVal); + return MakeAndAddRef(mRecorder, retVal); } return retVal.forget(); } @@ -855,7 +854,7 @@ Factory::CreateDrawTargetForCairoCGContext(CGContextRef cg, const IntSize& aSize TemporaryRef Factory::CreateCGGlyphRenderingOptions(const Color &aFontSmoothingBackgroundColor) { - return new GlyphRenderingOptionsCG(aFontSmoothingBackgroundColor); + return MakeAndAddRef(aFontSmoothingBackgroundColor); } #endif @@ -920,7 +919,7 @@ Factory::CreateDataSourceSurfaceWithStride(const IntSize &aSize, TemporaryRef Factory::CreateEventRecorderForFile(const char *aFilename) { - return new DrawEventRecorderFile(aFilename); + return MakeAndAddRef(aFilename); } void diff --git a/gfx/2d/FilterNodeD2D1.cpp b/gfx/2d/FilterNodeD2D1.cpp index 37992546a5..58f132269f 100644 --- a/gfx/2d/FilterNodeD2D1.cpp +++ b/gfx/2d/FilterNodeD2D1.cpp @@ -541,7 +541,7 @@ TemporaryRef FilterNodeD2D1::Create(ID2D1DeviceContext *aDC, FilterType aType) { if (aType == FilterType::CONVOLVE_MATRIX) { - return new FilterNodeConvolveD2D1(aDC); + return MakeAndAddRef(aDC); } RefPtr effect; diff --git a/gfx/2d/FilterNodeSoftware.cpp b/gfx/2d/FilterNodeSoftware.cpp index 6fd6aeb11d..ead4990ee0 100644 --- a/gfx/2d/FilterNodeSoftware.cpp +++ b/gfx/2d/FilterNodeSoftware.cpp @@ -1299,7 +1299,8 @@ static TemporaryRef Premultiply(DataSourceSurface* aSurface) { if (aSurface->GetFormat() == SurfaceFormat::A8) { - return aSurface; + RefPtr surface(aSurface); + return surface.forget(); } IntSize size = aSurface->GetSize(); @@ -1324,7 +1325,8 @@ static TemporaryRef Unpremultiply(DataSourceSurface* aSurface) { if (aSurface->GetFormat() == SurfaceFormat::A8) { - return aSurface; + RefPtr surface(aSurface); + return surface.forget(); } IntSize size = aSurface->GetSize(); diff --git a/gfx/2d/FilterProcessingSIMD-inl.h b/gfx/2d/FilterProcessingSIMD-inl.h index 8f58809ece..48646b40e4 100644 --- a/gfx/2d/FilterProcessingSIMD-inl.h +++ b/gfx/2d/FilterProcessingSIMD-inl.h @@ -95,7 +95,7 @@ ConvertToB8G8R8A8_SIMD(SourceSurface* aSurface) output = nullptr; break; } - return output; + return output.forget(); } template @@ -334,7 +334,7 @@ ApplyBlending_SIMD(DataSourceSurface* aInput1, DataSourceSurface* aInput2) } } - return target; + return target.forget(); } template @@ -608,7 +608,7 @@ ApplyColorMatrix_SIMD(DataSourceSurface* aInput, const Matrix5x4 &aMatrix) } } - return target; + return target.forget(); } // source / dest: bgra bgra @@ -1074,7 +1074,7 @@ ApplyArithmeticCombine_SIMD(DataSourceSurface* aInput1, DataSourceSurface* aInpu } } - return target; + return target.forget(); } } // namespace mozilla diff --git a/gfx/2d/PathCG.cpp b/gfx/2d/PathCG.cpp index 0798a6ee3c..6d5dfa36e6 100644 --- a/gfx/2d/PathCG.cpp +++ b/gfx/2d/PathCG.cpp @@ -130,14 +130,14 @@ PathBuilderCG::EnsureActive(const Point &aPoint) TemporaryRef PathBuilderCG::Finish() { - return new PathCG(mCGPath, mFillRule); + return MakeAndAddRef(mCGPath, mFillRule); } TemporaryRef PathCG::CopyToBuilder(FillRule aFillRule) const { CGMutablePathRef path = CGPathCreateMutableCopy(mPath); - return new PathBuilderCG(path, aFillRule); + return MakeAndAddRef(path, aFillRule); } @@ -197,7 +197,7 @@ PathCG::TransformedCopyToBuilder(const Matrix &aTransform, FillRule aFillRule) c ta.transform = GfxMatrixToCGAffineTransform(aTransform); CGPathApply(mPath, &ta, TransformApplier::TranformCGPathApplierFunc); - return new PathBuilderCG(ta.path, aFillRule); + return MakeAndAddRef(ta.path, aFillRule); } static void diff --git a/gfx/2d/PathCairo.cpp b/gfx/2d/PathCairo.cpp index d0c9d056dc..b0c9f8b41b 100644 --- a/gfx/2d/PathCairo.cpp +++ b/gfx/2d/PathCairo.cpp @@ -125,7 +125,7 @@ PathBuilderCairo::CurrentPoint() const TemporaryRef PathBuilderCairo::Finish() { - return new PathCairo(mFillRule, mPathData, mCurrentPoint); + return MakeAndAddRef(mFillRule, mPathData, mCurrentPoint); } PathCairo::PathCairo(FillRule aFillRule, std::vector &aPathData, const Point &aCurrentPoint) diff --git a/gfx/2d/PathD2D.cpp b/gfx/2d/PathD2D.cpp index e18dae8a59..bd20d31899 100644 --- a/gfx/2d/PathD2D.cpp +++ b/gfx/2d/PathD2D.cpp @@ -303,7 +303,7 @@ PathBuilderD2D::Finish() return nullptr; } - return new PathD2D(mGeometry, mFigureActive, mCurrentPoint, mFillRule, mBackendType); + return MakeAndAddRef(mGeometry, mFigureActive, mCurrentPoint, mFillRule, mBackendType); } TemporaryRef diff --git a/gfx/2d/PathRecording.cpp b/gfx/2d/PathRecording.cpp index e438712903..ad6700db33 100644 --- a/gfx/2d/PathRecording.cpp +++ b/gfx/2d/PathRecording.cpp @@ -73,7 +73,7 @@ TemporaryRef PathBuilderRecording::Finish() { RefPtr path = mPathBuilder->Finish(); - return new PathRecording(path, mPathOps, mFillRule); + return MakeAndAddRef(path, mPathOps, mFillRule); } PathRecording::~PathRecording() diff --git a/gfx/2d/PathSkia.cpp b/gfx/2d/PathSkia.cpp index efa0c6f56b..a3345881a7 100644 --- a/gfx/2d/PathSkia.cpp +++ b/gfx/2d/PathSkia.cpp @@ -105,7 +105,7 @@ PathBuilderSkia::CurrentPoint() const TemporaryRef PathBuilderSkia::Finish() { - return new PathSkia(mPath, mFillRule); + return MakeAndAddRef(mPath, mFillRule); } void @@ -123,7 +123,7 @@ PathSkia::CopyToBuilder(FillRule aFillRule) const TemporaryRef PathSkia::TransformedCopyToBuilder(const Matrix &aTransform, FillRule aFillRule) const { - return new PathBuilderSkia(aTransform, mPath, aFillRule); + return MakeAndAddRef(aTransform, mPath, aFillRule); } bool diff --git a/gfx/2d/SVGTurbulenceRenderer-inl.h b/gfx/2d/SVGTurbulenceRenderer-inl.h index 006f842e38..2ea92c6019 100644 --- a/gfx/2d/SVGTurbulenceRenderer-inl.h +++ b/gfx/2d/SVGTurbulenceRenderer-inl.h @@ -353,7 +353,7 @@ SVGTurbulenceRenderer::Render(const IntSize } } - return target; + return target.forget(); } } // namespace gfx diff --git a/gfx/2d/ScaledFontBase.cpp b/gfx/2d/ScaledFontBase.cpp index f0eb74d39b..a81d6e5574 100644 --- a/gfx/2d/ScaledFontBase.cpp +++ b/gfx/2d/ScaledFontBase.cpp @@ -80,7 +80,7 @@ ScaledFontBase::GetPathForGlyphs(const GlyphBuffer &aBuffer, const DrawTarget *a #ifdef USE_SKIA if (aTarget->GetBackendType() == BackendType::SKIA) { SkPath path = GetSkiaPathForGlyphs(aBuffer); - return new PathSkia(path, FillRule::FILL_WINDING); + return MakeAndAddRef(path, FillRule::FILL_WINDING); } #endif #ifdef USE_CAIRO diff --git a/gfx/2d/ScaledFontMac.cpp b/gfx/2d/ScaledFontMac.cpp index 5babcec54b..4679cf5970 100644 --- a/gfx/2d/ScaledFontMac.cpp +++ b/gfx/2d/ScaledFontMac.cpp @@ -94,9 +94,9 @@ ScaledFontMac::GetPathForGlyphs(const GlyphBuffer &aBuffer, const DrawTarget *aT CGPathAddPath(path, &matrix, glyphPath); CGPathRelease(glyphPath); } - TemporaryRef ret = new PathCG(path, FillRule::FILL_WINDING); + RefPtr ret = new PathCG(path, FillRule::FILL_WINDING); CGPathRelease(path); - return ret; + return ret.forget(); } return ScaledFontBase::GetPathForGlyphs(aBuffer, aTarget); } diff --git a/gfx/2d/SourceSurfaceCG.cpp b/gfx/2d/SourceSurfaceCG.cpp index 12b038c20d..d2f785ab57 100644 --- a/gfx/2d/SourceSurfaceCG.cpp +++ b/gfx/2d/SourceSurfaceCG.cpp @@ -45,7 +45,7 @@ SourceSurfaceCG::GetDataSurface() // We also need to make sure that the returned surface has // surface->GetType() == SurfaceType::DATA. - return new DataSourceSurfaceWrapper(dataSurf); + return MakeAndAddRef(dataSurf); } static void releaseCallback(void *info, const void *data, size_t size) { diff --git a/gfx/2d/SourceSurfaceCG.h b/gfx/2d/SourceSurfaceCG.h index 9e1798490e..fccf57c383 100644 --- a/gfx/2d/SourceSurfaceCG.h +++ b/gfx/2d/SourceSurfaceCG.h @@ -127,7 +127,8 @@ public: // // For more information see bug 925448. DrawTargetWillChange(); - return this; + RefPtr copy(this); + return copy.forget(); } CGImageRef GetImage() { EnsureImage(); return mImage; } diff --git a/gfx/2d/SourceSurfaceCairo.cpp b/gfx/2d/SourceSurfaceCairo.cpp index a1ecfe51d4..93bdc9f27b 100644 --- a/gfx/2d/SourceSurfaceCairo.cpp +++ b/gfx/2d/SourceSurfaceCairo.cpp @@ -81,7 +81,7 @@ SourceSurfaceCairo::GetDataSurface() // We also need to make sure that the returned surface has // surface->GetType() == SurfaceType::DATA. - return new DataSourceSurfaceWrapper(dataSurf); + return MakeAndAddRef(dataSurf); } cairo_surface_t* diff --git a/gfx/2d/SourceSurfaceD2D1.cpp b/gfx/2d/SourceSurfaceD2D1.cpp index ee742777f9..1f26d26b75 100644 --- a/gfx/2d/SourceSurfaceD2D1.cpp +++ b/gfx/2d/SourceSurfaceD2D1.cpp @@ -66,7 +66,7 @@ SourceSurfaceD2D1::GetDataSurface() return nullptr; } - return new DataSourceSurfaceD2D1(softwareBitmap, mFormat); + return MakeAndAddRef(softwareBitmap, mFormat); } void diff --git a/gfx/gl/SharedSurface.cpp b/gfx/gl/SharedSurface.cpp index b16eef98ee..b6725cd370 100644 --- a/gfx/gl/SharedSurface.cpp +++ b/gfx/gl/SharedSurface.cpp @@ -343,7 +343,7 @@ SurfaceFactory::NewShSurfHandle(const gfx::IntSize& size) if (!surf) return nullptr; - return new ShSurfHandle(this, Move(surf)); + return MakeAndAddRef(this, Move(surf)); } // Auto-deletes surfs of the wrong type. diff --git a/gfx/layers/D3D11ShareHandleImage.cpp b/gfx/layers/D3D11ShareHandleImage.cpp new file mode 100644 index 0000000000..fc8e694539 --- /dev/null +++ b/gfx/layers/D3D11ShareHandleImage.cpp @@ -0,0 +1,144 @@ +/* -*- Mode: C++; tab-width: 20; 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 "WMF.h" +#include "D3D11ShareHandleImage.h" +#include "gfxImageSurface.h" +#include "gfxWindowsPlatform.h" +#include "mozilla/layers/TextureClient.h" +#include "mozilla/layers/TextureD3D11.h" +#include "mozilla/layers/CompositableClient.h" +#include "mozilla/layers/CompositableForwarder.h" +#include "d3d11.h" + +namespace mozilla { +namespace layers { + +HRESULT +D3D11ShareHandleImage::SetData(const Data& aData) +{ + NS_ENSURE_TRUE(aData.mTexture, E_POINTER); + mTexture = aData.mTexture; + mPictureRect = aData.mRegion; + + D3D11_TEXTURE2D_DESC frameDesc; + mTexture->GetDesc(&frameDesc); + + mFormat = gfx::SurfaceFormat::B8G8R8A8; + mSize.width = frameDesc.Width; + mSize.height = frameDesc.Height; + + return S_OK; +} + +gfx::IntSize +D3D11ShareHandleImage::GetSize() +{ + return mSize; +} + +TextureClient* +D3D11ShareHandleImage::GetTextureClient(CompositableClient* aClient) +{ + if (!mTextureClient) { + mTextureClient = TextureClientD3D11::Create(aClient->GetForwarder(), + mFormat, + TextureFlags::DEFAULT, + mTexture, + mSize); + } + return mTextureClient; +} + +TemporaryRef +D3D11ShareHandleImage::GetAsSourceSurface() +{ + if (!mTexture) { + NS_WARNING("Cannot readback from shared texture because no texture is available."); + return nullptr; + } + + RefPtr device; + mTexture->GetDevice(byRef(device)); + + RefPtr keyedMutex; + if (FAILED(mTexture->QueryInterface(static_cast(byRef(keyedMutex))))) { + NS_WARNING("Failed to QueryInterface for IDXGIKeyedMutex, strange."); + return nullptr; + } + + if (FAILED(keyedMutex->AcquireSync(0, 0))) { + NS_WARNING("Failed to acquire sync for keyedMutex, plugin failed to release?"); + return nullptr; + } + + D3D11_TEXTURE2D_DESC desc; + mTexture->GetDesc(&desc); + + CD3D11_TEXTURE2D_DESC softDesc(desc.Format, desc.Width, desc.Height); + softDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ; + softDesc.BindFlags = 0; + softDesc.MiscFlags = 0; + softDesc.MipLevels = 1; + softDesc.Usage = D3D11_USAGE_STAGING; + + RefPtr softTexture; + HRESULT hr = device->CreateTexture2D(&softDesc, + NULL, + static_cast(byRef(softTexture))); + + if (FAILED(hr)) { + NS_WARNING("Failed to create 2D staging texture."); + keyedMutex->ReleaseSync(0); + return nullptr; + } + + RefPtr context; + device->GetImmediateContext(byRef(context)); + if (!context) { + keyedMutex->ReleaseSync(0); + return nullptr; + } + + context->CopyResource(softTexture, mTexture); + keyedMutex->ReleaseSync(0); + + RefPtr surface = + gfx::Factory::CreateDataSourceSurface(mSize, gfx::SurfaceFormat::B8G8R8X8); + if (NS_WARN_IF(!surface)) { + return nullptr; + } + + gfx::DataSourceSurface::MappedSurface mappedSurface; + if (!surface->Map(gfx::DataSourceSurface::WRITE, &mappedSurface)) { + return nullptr; + } + + D3D11_MAPPED_SUBRESOURCE map; + hr = context->Map(softTexture, 0, D3D11_MAP_READ, 0, &map); + if (!SUCCEEDED(hr)) { + surface->Unmap(); + return nullptr; + } + + for (int y = 0; y < mSize.height; y++) { + memcpy(mappedSurface.mData + mappedSurface.mStride * y, + (unsigned char*)(map.pData) + map.RowPitch * y, + mSize.width * 4); + } + + context->Unmap(softTexture, 0); + surface->Unmap(); + + return surface.forget(); +} + +ID3D11Texture2D* +D3D11ShareHandleImage::GetTexture() const { + return mTexture; +} + +} /* layers */ +} /* mozilla */ diff --git a/gfx/layers/D3D11ShareHandleImage.h b/gfx/layers/D3D11ShareHandleImage.h new file mode 100644 index 0000000000..005a65a815 --- /dev/null +++ b/gfx/layers/D3D11ShareHandleImage.h @@ -0,0 +1,71 @@ +/* -*- Mode: C++; tab-width: 20; 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 GFX_D311_SHARE_HANDLE_IMAGE_H +#define GFX_D311_SHARE_HANDLE_IMAGE_H + +#include "mozilla/RefPtr.h" +#include "ImageContainer.h" +#include "nsAutoPtr.h" +#include "d3d11.h" +#include "mozilla/layers/TextureClient.h" + +namespace mozilla { +namespace layers { + +// Image class that wraps a ID3D11Texture2D. This class copies the image +// passed into SetData(), so that it can be accessed from other D3D devices. +// This class also manages the synchronization of the copy, to ensure the +// resource is ready to use. +class D3D11ShareHandleImage : public Image { +public: + + struct Data { + Data(ID3D11Texture2D* aTexture, + ID3D11Device* aDevice, + ID3D11DeviceContext* aContext, + const nsIntRect& aRegion) + : mTexture(aTexture), + mDevice(aDevice), + mContext(aContext), + mRegion(aRegion) {} + RefPtr mTexture; + RefPtr mDevice; + RefPtr mContext; + nsIntRect mRegion; + }; + + D3D11ShareHandleImage() : Image(NULL, ImageFormat::D3D11_SHARE_HANDLE_TEXTURE), mSize(0, 0) {} + virtual ~D3D11ShareHandleImage() {} + + // Copies the surface into a sharable texture's surface, and initializes + // the image. + HRESULT SetData(const Data& aData); + + gfx::IntSize GetSize() override; + + virtual TemporaryRef GetAsSourceSurface() override; + + virtual TextureClient* GetTextureClient(CompositableClient* aClient) override; + + ID3D11Texture2D* GetTexture() const; + + virtual nsIntRect GetPictureRect() override { return mPictureRect; } + +private: + + gfx::IntSize mSize; + nsIntRect mPictureRect; + RefPtr mTexture; + RefPtr mTextureClient; + HANDLE mShareHandle; + gfx::SurfaceFormat mFormat; + +}; + +} // namepace layers +} // namespace mozilla + +#endif // GFX_D3DSURFACEIMAGE_H diff --git a/gfx/layers/D3D9SurfaceImage.cpp b/gfx/layers/D3D9SurfaceImage.cpp index cc60103325..9381aa5e9d 100644 --- a/gfx/layers/D3D9SurfaceImage.cpp +++ b/gfx/layers/D3D9SurfaceImage.cpp @@ -202,12 +202,12 @@ D3D9SurfaceImage::GetTextureClient(CompositableClient* aClient) { EnsureSynchronized(); if (!mTextureClient) { - RefPtr textureClient = - new SharedTextureClientD3D9(aClient->GetForwarder(), - gfx::SurfaceFormat::B8G8R8X8, - TextureFlags::DEFAULT); - textureClient->InitWith(mTexture, mShareHandle, mDesc); - mTextureClient = textureClient; + mTextureClient = SharedTextureClientD3D9::Create(aClient->GetForwarder(), + gfx::SurfaceFormat::B8G8R8X8, + TextureFlags::DEFAULT, + mTexture, + mShareHandle, + mDesc); } return mTextureClient; } @@ -269,7 +269,7 @@ D3D9SurfaceImage::GetAsSourceSurface() systemMemorySurface->UnlockRect(); surface->Unmap(); - return surface; + return surface.forget(); } } /* layers */ diff --git a/gfx/layers/Effects.h b/gfx/layers/Effects.h index 8a09b98779..f32098d9a3 100644 --- a/gfx/layers/Effects.h +++ b/gfx/layers/Effects.h @@ -268,7 +268,7 @@ CreateTexturedEffect(gfx::SurfaceFormat aFormat, break; } - return result; + return result.forget(); } /** @@ -287,7 +287,7 @@ CreateTexturedEffect(TextureSource* aSource, if (aSourceOnWhite) { MOZ_ASSERT(aSource->GetFormat() == gfx::SurfaceFormat::R8G8B8X8 || aSourceOnWhite->GetFormat() == gfx::SurfaceFormat::B8G8R8X8); - return new EffectComponentAlpha(aSource, aSourceOnWhite, aFilter); + return MakeAndAddRef(aSource, aSourceOnWhite, aFilter); } return CreateTexturedEffect(aSource->GetFormat(), diff --git a/gfx/layers/GrallocImages.cpp b/gfx/layers/GrallocImages.cpp index 652348fe8b..d072a095a7 100644 --- a/gfx/layers/GrallocImages.cpp +++ b/gfx/layers/GrallocImages.cpp @@ -274,10 +274,11 @@ static status_t ConvertOmxYUVFormatToRGB565(android::sp& aBuffer, gfx::DataSourceSurface *aSurface, gfx::DataSourceSurface::MappedSurface *aMappedSurface, - const layers::PlanarYCbCrData& aYcbcrData, - int aOmxFormat) + const layers::PlanarYCbCrData& aYcbcrData) { - if (!aOmxFormat) { + uint32_t omxFormat = + GrallocImage::GetOmxFormat(aBuffer->getPixelFormat()); + if (!omxFormat) { NS_WARNING("Unknown color format"); return BAD_VALUE; } @@ -359,7 +360,7 @@ ConvertOmxYUVFormatToRGB565(android::sp& aBuffer, return OK; } - android::ColorConverter colorConverter((OMX_COLOR_FORMATTYPE)aOmxFormat, + android::ColorConverter colorConverter((OMX_COLOR_FORMATTYPE)omxFormat, OMX_COLOR_Format16bitRGB565); if (!colorConverter.isValid()) { NS_WARNING("Invalid color conversion"); @@ -402,29 +403,20 @@ GrallocImage::GetAsSourceSurface() } int32_t rv; - uint32_t omxFormat = 0; - - omxFormat = GrallocImage::GetOmxFormat(graphicBuffer->getPixelFormat()); - if (!omxFormat) { - rv = ConvertVendorYUVFormatToRGB565(graphicBuffer, surface, &mappedSurface); + rv = ConvertOmxYUVFormatToRGB565(graphicBuffer, surface, &mappedSurface, mData); + if (rv == OK) { surface->Unmap(); - - if (rv != OK) { - NS_WARNING("Unknown color format"); - return nullptr; - } - - return surface; + return surface.forget(); } - rv = ConvertOmxYUVFormatToRGB565(graphicBuffer, surface, &mappedSurface, mData, omxFormat); + rv = ConvertVendorYUVFormatToRGB565(graphicBuffer, surface, &mappedSurface); surface->Unmap(); - if (rv != OK) { + NS_WARNING("Unknown color format"); return nullptr; } - return surface; + return surface.forget(); } android::sp diff --git a/gfx/layers/IMFYCbCrImage.cpp b/gfx/layers/IMFYCbCrImage.cpp new file mode 100644 index 0000000000..80deb251f0 --- /dev/null +++ b/gfx/layers/IMFYCbCrImage.cpp @@ -0,0 +1,293 @@ +/* -*- Mode: C++; tab-width: 20; 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 "IMFYCbCrImage.h" +#include "mozilla/layers/TextureD3D11.h" +#include "mozilla/layers/CompositableClient.h" +#include "mozilla/layers/CompositableForwarder.h" +#include "mozilla/gfx/Types.h" +#include "mozilla/layers/TextureClient.h" +#include "d3d9.h" + +namespace mozilla { +namespace layers { + +IMFYCbCrImage::IMFYCbCrImage(IMFMediaBuffer* aBuffer, IMF2DBuffer* a2DBuffer) + : PlanarYCbCrImage(nullptr) + , mBuffer(aBuffer) + , m2DBuffer(a2DBuffer) +{} + +IMFYCbCrImage::~IMFYCbCrImage() +{ + if (m2DBuffer) { + m2DBuffer->Unlock2D(); + } + else { + mBuffer->Unlock(); + } +} + +struct AutoLockTexture +{ + AutoLockTexture(ID3D11Texture2D* aTexture) + { + aTexture->QueryInterface((IDXGIKeyedMutex**)byRef(mMutex)); + HRESULT hr = mMutex->AcquireSync(0, 10000); + if (hr == WAIT_TIMEOUT) { + MOZ_CRASH(); + } + + if (FAILED(hr)) { + NS_WARNING("Failed to lock the texture"); + } + } + + ~AutoLockTexture() + { + HRESULT hr = mMutex->ReleaseSync(0); + if (FAILED(hr)) { + NS_WARNING("Failed to unlock the texture"); + } + } + + RefPtr mMutex; +}; + +static TemporaryRef +InitTextures(IDirect3DDevice9* aDevice, + const IntSize &aSize, + _D3DFORMAT aFormat, + RefPtr& aSurface, + HANDLE& aHandle, + D3DLOCKED_RECT& aLockedRect) +{ + if (!aDevice) { + return nullptr; + } + + RefPtr result; + if (FAILED(aDevice->CreateTexture(aSize.width, aSize.height, + 1, 0, aFormat, D3DPOOL_DEFAULT, + byRef(result), &aHandle))) { + return nullptr; + } + if (!result) { + return nullptr; + } + + RefPtr tmpTexture; + if (FAILED(aDevice->CreateTexture(aSize.width, aSize.height, + 1, 0, aFormat, D3DPOOL_SYSTEMMEM, + byRef(tmpTexture), nullptr))) { + return nullptr; + } + if (!tmpTexture) { + return nullptr; + } + + tmpTexture->GetSurfaceLevel(0, byRef(aSurface)); + aSurface->LockRect(&aLockedRect, nullptr, 0); + if (!aLockedRect.pBits) { + NS_WARNING("Could not lock surface"); + return nullptr; + } + + return result.forget(); +} + +static void +FinishTextures(IDirect3DDevice9* aDevice, + IDirect3DTexture9* aTexture, + IDirect3DSurface9* aSurface) +{ + if (!aDevice) { + return; + } + + aSurface->UnlockRect(); + nsRefPtr dstSurface; + aTexture->GetSurfaceLevel(0, getter_AddRefs(dstSurface)); + aDevice->UpdateSurface(aSurface, nullptr, dstSurface, nullptr); +} + +static bool UploadData(IDirect3DDevice9* aDevice, + RefPtr& aTexture, + HANDLE& aHandle, + uint8_t* aSrc, + const gfx::IntSize& aSrcSize, + int32_t aSrcStride) +{ + RefPtr surf; + D3DLOCKED_RECT rect; + aTexture = InitTextures(aDevice, aSrcSize, D3DFMT_A8, surf, aHandle, rect); + if (!aTexture) { + return false; + } + + if (aSrcStride == rect.Pitch) { + memcpy(rect.pBits, aSrc, rect.Pitch * aSrcSize.height); + } else { + for (int i = 0; i < aSrcSize.height; i++) { + memcpy((uint8_t*)rect.pBits + i * rect.Pitch, + aSrc + i * aSrcStride, + aSrcSize.width); + } + } + + FinishTextures(aDevice, aTexture, surf); + return true; +} + +TextureClient* +IMFYCbCrImage::GetD3D9TextureClient(CompositableClient* aClient) +{ + IDirect3DDevice9* device = gfxWindowsPlatform::GetPlatform()->GetD3D9Device(); + + RefPtr textureY; + HANDLE shareHandleY = 0; + if (!UploadData(device, textureY, shareHandleY, + mData.mYChannel, mData.mYSize, mData.mYStride)) { + return nullptr; + } + + RefPtr textureCb; + HANDLE shareHandleCb = 0; + if (!UploadData(device, textureCb, shareHandleCb, + mData.mCbChannel, mData.mCbCrSize, mData.mCbCrStride)) { + return nullptr; + } + + RefPtr textureCr; + HANDLE shareHandleCr = 0; + if (!UploadData(device, textureCr, shareHandleCr, + mData.mCrChannel, mData.mCbCrSize, mData.mCbCrStride)) { + return nullptr; + } + + RefPtr query; + HRESULT hr = device->CreateQuery(D3DQUERYTYPE_EVENT, byRef(query)); + hr = query->Issue(D3DISSUE_END); + + int iterations = 0; + bool valid = false; + while (iterations < 10) { + HRESULT hr = query->GetData(nullptr, 0, D3DGETDATA_FLUSH); + if (hr == S_FALSE) { + Sleep(1); + iterations++; + continue; + } + if (hr == S_OK) { + valid = true; + } + break; + } + + if (!valid) { + return nullptr; + } + + mTextureClient = DXGIYCbCrTextureClient::Create(aClient->GetForwarder(), + TextureFlags::DEFAULT, + textureY, + textureCb, + textureCr, + shareHandleY, + shareHandleCb, + shareHandleCr, + GetSize(), + mData.mYSize, + mData.mCbCrSize); + + return mTextureClient; +} + +TextureClient* +IMFYCbCrImage::GetTextureClient(CompositableClient* aClient) +{ + ID3D11Device* device = gfxWindowsPlatform::GetPlatform()->GetD3D11MediaDevice(); + if (!device || + aClient->GetForwarder()->GetCompositorBackendType() != LayersBackend::LAYERS_D3D11) { + + IDirect3DDevice9* d3d9device = gfxWindowsPlatform::GetPlatform()->GetD3D9Device(); + if (d3d9device && aClient->GetForwarder()->GetCompositorBackendType() == LayersBackend::LAYERS_D3D9) { + return GetD3D9TextureClient(aClient); + } + return nullptr; + } + + if (mTextureClient) { + return mTextureClient; + } + + RefPtr ctx; + device->GetImmediateContext(byRef(ctx)); + + CD3D11_TEXTURE2D_DESC newDesc(DXGI_FORMAT_A8_UNORM, + mData.mYSize.width, mData.mYSize.height, 1, 1); + + newDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX; + + RefPtr textureY; + HRESULT hr = device->CreateTexture2D(&newDesc, nullptr, byRef(textureY)); + NS_ENSURE_TRUE(SUCCEEDED(hr), nullptr); + + newDesc.Width = mData.mCbCrSize.width; + newDesc.Height = mData.mCbCrSize.height; + + RefPtr textureCb; + hr = device->CreateTexture2D(&newDesc, nullptr, byRef(textureCb)); + NS_ENSURE_TRUE(SUCCEEDED(hr), nullptr); + + RefPtr textureCr; + hr = device->CreateTexture2D(&newDesc, nullptr, byRef(textureCr)); + NS_ENSURE_TRUE(SUCCEEDED(hr), nullptr); + + { + AutoLockTexture lockY(textureY); + AutoLockTexture lockCb(textureCb); + AutoLockTexture lockCr(textureCr); + + ctx->UpdateSubresource(textureY, 0, nullptr, mData.mYChannel, + mData.mYStride, mData.mYStride * mData.mYSize.height); + ctx->UpdateSubresource(textureCb, 0, nullptr, mData.mCbChannel, + mData.mCbCrStride, mData.mCbCrStride * mData.mCbCrSize.height); + ctx->UpdateSubresource(textureCr, 0, nullptr, mData.mCrChannel, + mData.mCbCrStride, mData.mCbCrStride * mData.mCbCrSize.height); + } + + RefPtr resource; + + HANDLE shareHandleY; + textureY->QueryInterface((IDXGIResource**)byRef(resource)); + hr = resource->GetSharedHandle(&shareHandleY); + + HANDLE shareHandleCb; + textureCb->QueryInterface((IDXGIResource**)byRef(resource)); + hr = resource->GetSharedHandle(&shareHandleCb); + + HANDLE shareHandleCr; + textureCr->QueryInterface((IDXGIResource**)byRef(resource)); + hr = resource->GetSharedHandle(&shareHandleCr); + + mTextureClient = DXGIYCbCrTextureClient::Create(aClient->GetForwarder(), + TextureFlags::DEFAULT, + textureY, + textureCb, + textureCr, + shareHandleY, + shareHandleCb, + shareHandleCr, + GetSize(), + mData.mYSize, + mData.mCbCrSize); + + return mTextureClient; +} + + +} /* layers */ +} /* mozilla */ diff --git a/gfx/layers/IMFYCbCrImage.h b/gfx/layers/IMFYCbCrImage.h index 5d863b42f5..95dec144f3 100644 --- a/gfx/layers/IMFYCbCrImage.h +++ b/gfx/layers/IMFYCbCrImage.h @@ -16,32 +16,21 @@ namespace layers { class IMFYCbCrImage : public PlanarYCbCrImage { public: - IMFYCbCrImage(IMFMediaBuffer* aBuffer, IMF2DBuffer* a2DBuffer) - : PlanarYCbCrImage(nullptr) - , mBuffer(aBuffer) - , m2DBuffer(a2DBuffer) - {} + IMFYCbCrImage(IMFMediaBuffer* aBuffer, IMF2DBuffer* a2DBuffer); virtual bool IsValid() { return true; } -protected: - virtual uint8_t* AllocateBuffer(uint32_t aSize) override { - MOZ_CRASH("Can't do manual allocations with IMFYCbCrImage"); - return nullptr; - } + virtual TextureClient* GetTextureClient(CompositableClient* aClient) override; - ~IMFYCbCrImage() - { - if (m2DBuffer) { - m2DBuffer->Unlock2D(); - } - else { - mBuffer->Unlock(); - } - } +protected: + + TextureClient* GetD3D9TextureClient(CompositableClient* aClient); + + ~IMFYCbCrImage(); RefPtr mBuffer; RefPtr m2DBuffer; + RefPtr mTextureClient; }; } // namepace layers diff --git a/gfx/layers/ImageContainer.cpp b/gfx/layers/ImageContainer.cpp index db3ecbf3e7..38f1d0c182 100644 --- a/gfx/layers/ImageContainer.cpp +++ b/gfx/layers/ImageContainer.cpp @@ -37,6 +37,7 @@ #include "gfxWindowsPlatform.h" #include #include "D3D9SurfaceImage.h" +#include "D3D11ShareHandleImage.h" #endif namespace mozilla { @@ -95,6 +96,10 @@ ImageFactory::CreateImage(ImageFormat aFormat, } #endif #ifdef XP_WIN + if (aFormat == ImageFormat::D3D11_SHARE_HANDLE_TEXTURE) { + img = new D3D11ShareHandleImage(); + return img.forget(); + } if (aFormat == ImageFormat::D3D9_RGB32_TEXTURE) { img = new D3D9SurfaceImage(); return img.forget(); @@ -464,7 +469,8 @@ TemporaryRef PlanarYCbCrImage::GetAsSourceSurface() { if (mSourceSurface) { - return mSourceSurface.get(); + RefPtr surface(mSourceSurface); + return surface.forget(); } gfx::IntSize size(mSize); diff --git a/gfx/layers/ImageContainer.h b/gfx/layers/ImageContainer.h index 9c9d7d8bbd..ea9cec2ee9 100644 --- a/gfx/layers/ImageContainer.h +++ b/gfx/layers/ImageContainer.h @@ -807,7 +807,8 @@ public: virtual TemporaryRef GetAsSourceSurface() override { - return mSourceSurface.get(); + RefPtr surface(mSourceSurface); + return surface.forget(); } virtual TextureClient* GetTextureClient(CompositableClient* aClient) override; diff --git a/gfx/layers/ImageTypes.h b/gfx/layers/ImageTypes.h index 2a3c1c6489..0d789e1dc8 100644 --- a/gfx/layers/ImageTypes.h +++ b/gfx/layers/ImageTypes.h @@ -81,7 +81,12 @@ enum class ImageFormat { * An Image type carries an opaque handle once for each stream. * The opaque handle would be a platform specific identifier. */ - OVERLAY_IMAGE + OVERLAY_IMAGE, + + /** + * A share handle to a ID3D11Texture2D. + */ + D3D11_SHARE_HANDLE_TEXTURE }; enum class StereoMode { diff --git a/gfx/layers/MacIOSurfaceImage.cpp b/gfx/layers/MacIOSurfaceImage.cpp index 000a308686..c6559dbf3c 100644 --- a/gfx/layers/MacIOSurfaceImage.cpp +++ b/gfx/layers/MacIOSurfaceImage.cpp @@ -15,10 +15,9 @@ TextureClient* MacIOSurfaceImage::GetTextureClient(CompositableClient* aClient) { if (!mTextureClient) { - RefPtr buffer = - new MacIOSurfaceTextureClientOGL(aClient->GetForwarder(), TextureFlags::DEFAULT); - buffer->InitWith(mSurface); - mTextureClient = buffer; + mTextureClient = MacIOSurfaceTextureClientOGL::Create(aClient->GetForwarder(), + TextureFlags::DEFAULT, + mSurface); } return mTextureClient; } @@ -52,5 +51,5 @@ MacIOSurfaceImage::GetAsSourceSurface() dataSurface->Unmap(); mSurface->Unlock(); - return dataSurface; + return dataSurface.forget(); } diff --git a/gfx/layers/RotatedBuffer.cpp b/gfx/layers/RotatedBuffer.cpp index 13e031ea5f..dfd81e6c10 100644 --- a/gfx/layers/RotatedBuffer.cpp +++ b/gfx/layers/RotatedBuffer.cpp @@ -191,7 +191,7 @@ SourceRotatedBuffer::GetSourceSurface(ContextSource aSource) const } MOZ_ASSERT(surf); - return surf; + return surf.forget(); } /* static */ bool diff --git a/gfx/layers/TextureDIB.cpp b/gfx/layers/TextureDIB.cpp index 4cd3b72f8f..3e283db775 100644 --- a/gfx/layers/TextureDIB.cpp +++ b/gfx/layers/TextureDIB.cpp @@ -38,7 +38,7 @@ DIBTextureClient::CreateSimilar(TextureFlags aFlags, return nullptr; } - return tex; + return tex.forget(); } bool @@ -193,4 +193,4 @@ DIBTextureHost::DeallocateDeviceData() } } -} \ No newline at end of file +} diff --git a/gfx/layers/apz/src/HitTestingTreeNode.h b/gfx/layers/apz/src/HitTestingTreeNode.h index 5fba91e009..01a7dfe245 100644 --- a/gfx/layers/apz/src/HitTestingTreeNode.h +++ b/gfx/layers/apz/src/HitTestingTreeNode.h @@ -12,7 +12,7 @@ #include "mozilla/gfx/Matrix.h" // for Matrix4x4 #include "mozilla/layers/LayersTypes.h" // for EventRegions #include "mozilla/Maybe.h" // for Maybe -#include "nsRefPtr.h" // for nsRefPtr +#include "mozilla/nsRefPtr.h" // for nsRefPtr namespace mozilla { namespace layers { diff --git a/gfx/layers/apz/util/APZEventState.h b/gfx/layers/apz/util/APZEventState.h index 7173d053c8..4a8cea4b05 100644 --- a/gfx/layers/apz/util/APZEventState.h +++ b/gfx/layers/apz/util/APZEventState.h @@ -15,7 +15,7 @@ #include "nsCOMPtr.h" #include "nsISupportsImpl.h" // for NS_INLINE_DECL_REFCOUNTING #include "nsIWeakReferenceUtils.h" // for nsWeakPtr -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" template class nsCOMPtr; class nsIDOMWindowUtils; diff --git a/gfx/layers/apz/util/ChromeProcessController.h b/gfx/layers/apz/util/ChromeProcessController.h index 101272cf84..618bbf7263 100644 --- a/gfx/layers/apz/util/ChromeProcessController.h +++ b/gfx/layers/apz/util/ChromeProcessController.h @@ -8,7 +8,7 @@ #include "mozilla/layers/GoannaContentController.h" #include "nsCOMPtr.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" class nsIDOMWindowUtils; class nsIDocument; diff --git a/gfx/layers/basic/BasicImages.cpp b/gfx/layers/basic/BasicImages.cpp index 8bd4097c92..2d7019d6d1 100644 --- a/gfx/layers/basic/BasicImages.cpp +++ b/gfx/layers/basic/BasicImages.cpp @@ -143,7 +143,8 @@ BasicPlanarYCbCrImage::GetAsSourceSurface() NS_ASSERTION(NS_IsMainThread(), "Must be main thread"); if (mSourceSurface) { - return mSourceSurface.get(); + RefPtr surface(mSourceSurface); + return surface.forget(); } if (!mDecodedBuffer) { @@ -172,7 +173,7 @@ BasicPlanarYCbCrImage::GetAsSourceSurface() mRecycleBin->RecycleBuffer(mDecodedBuffer.forget(), mSize.height * mStride); mSourceSurface = surface; - return mSourceSurface.get(); + return surface.forget(); } diff --git a/gfx/layers/basic/TextureClientX11.cpp b/gfx/layers/basic/TextureClientX11.cpp index 6d752b82cb..dc23923264 100644 --- a/gfx/layers/basic/TextureClientX11.cpp +++ b/gfx/layers/basic/TextureClientX11.cpp @@ -46,7 +46,7 @@ TextureClientX11::CreateSimilar(TextureFlags aFlags, return nullptr; } - return tex; + return tex.forget(); } bool diff --git a/gfx/layers/basic/TextureHostBasic.cpp b/gfx/layers/basic/TextureHostBasic.cpp index 5d9f332b95..b5aeab5d14 100644 --- a/gfx/layers/basic/TextureHostBasic.cpp +++ b/gfx/layers/basic/TextureHostBasic.cpp @@ -23,8 +23,7 @@ CreateTextureHostBasic(const SurfaceDescriptor& aDesc, if (aDesc.type() == SurfaceDescriptor::TSurfaceDescriptorMacIOSurface) { const SurfaceDescriptorMacIOSurface& desc = aDesc.get_SurfaceDescriptorMacIOSurface(); - RefPtr result = new MacIOSurfaceTextureHostBasic(aFlags, desc); - return result; + return MakeAndAddRef(aFlags, desc); } #endif return CreateBackendIndependentTextureHost(aDesc, aDeallocator, aFlags); diff --git a/gfx/layers/client/CanvasClient.cpp b/gfx/layers/client/CanvasClient.cpp index 3efd50d3bd..df7e395345 100644 --- a/gfx/layers/client/CanvasClient.cpp +++ b/gfx/layers/client/CanvasClient.cpp @@ -40,16 +40,18 @@ CanvasClient::CreateCanvasClient(CanvasClientType aType, #ifndef MOZ_WIDGET_GONK if (XRE_GetProcessType() != GoannaProcessType_Default) { NS_WARNING("Most platforms still need an optimized way to share GL cross process."); - return new CanvasClient2D(aForwarder, aFlags); + return MakeAndAddRef(aForwarder, aFlags); } #endif switch (aType) { case CanvasClientTypeShSurf: - return new CanvasClientSharedSurface(aForwarder, aFlags); + return MakeAndAddRef(aForwarder, aFlags); + break; default: - return new CanvasClient2D(aForwarder, aFlags); + return MakeAndAddRef(aForwarder, aFlags); + break; } } @@ -168,7 +170,7 @@ TexClientFromShSurf(ISurfaceAllocator* aAllocator, SharedSurface* surf, #endif default: - return new SharedSurfaceTextureClient(aAllocator, flags, surf); + return MakeAndAddRef(aAllocator, flags, surf); } } diff --git a/gfx/layers/client/ContentClient.cpp b/gfx/layers/client/ContentClient.cpp index 05fa3f79f6..3db4f9d8e7 100644 --- a/gfx/layers/client/ContentClient.cpp +++ b/gfx/layers/client/ContentClient.cpp @@ -91,14 +91,14 @@ ContentClient::CreateContentClient(CompositableForwarder* aForwarder) } if (useDoubleBuffering || PR_GetEnv("MOZ_FORCE_DOUBLE_BUFFERING")) { - return new ContentClientDoubleBuffered(aForwarder); + return MakeAndAddRef(aForwarder); } #ifdef XP_MACOSX if (backend == LayersBackend::LAYERS_OPENGL) { - return new ContentClientIncremental(aForwarder); + return MakeAndAddRef(aForwarder); } #endif - return new ContentClientSingleBuffered(aForwarder); + return MakeAndAddRef(aForwarder); } void diff --git a/gfx/layers/client/ImageClient.cpp b/gfx/layers/client/ImageClient.cpp index 4bd1d7ea04..c787a025a2 100644 --- a/gfx/layers/client/ImageClient.cpp +++ b/gfx/layers/client/ImageClient.cpp @@ -120,8 +120,7 @@ TextureInfo ImageClientSingle::GetTextureInfo() const TemporaryRef ImageClientSingle::PrepareFlushAllImages() { - RefPtr status = new RemoveTextureFromCompositableTracker(); - return status; + return MakeAndAddRef(); } void diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp index 6ae7cbf0c3..ecc28b6346 100644 --- a/gfx/layers/client/TextureClient.cpp +++ b/gfx/layers/client/TextureClient.cpp @@ -389,7 +389,7 @@ TextureClient::CreateForDrawing(ISurfaceAllocator* aAllocator, MOZ_ASSERT(!texture || texture->CanExposeDrawTarget(), "texture cannot expose a DrawTarget?"); if (texture && texture->AllocateForSurface(aSize, aAllocFlags)) { - return texture; + return texture.forget(); } if (aAllocFlags & ALLOC_DISALLOW_BUFFERTEXTURECLIENT) { @@ -407,7 +407,7 @@ TextureClient::CreateForDrawing(ISurfaceAllocator* aAllocator, return nullptr; } - return texture; + return texture.forget(); } // static @@ -431,7 +431,7 @@ TextureClient::CreateForRawBufferAccess(ISurfaceAllocator* aAllocator, return nullptr; } } - return texture; + return texture.forget(); } // static @@ -461,7 +461,7 @@ TextureClient::CreateForYCbCr(ISurfaceAllocator* aAllocator, return nullptr; } - return texture; + return texture.forget(); } // static @@ -486,7 +486,7 @@ TextureClient::CreateWithBufferSize(ISurfaceAllocator* aAllocator, return nullptr; } - return texture; + return texture.forget(); } TextureClient::TextureClient(ISurfaceAllocator* aAllocator, TextureFlags aFlags) @@ -740,8 +740,7 @@ BufferTextureClient::CreateSimilar(TextureFlags aFlags, mAllocator, mFormat, mSize, mBackend, mFlags | aFlags, aAllocFlags ); - RefPtr newTex = newBufferTex.get(); - return newTex; + return newBufferTex.forget(); } bool @@ -928,8 +927,7 @@ SyncObject::CreateSyncObject(SyncHandle aHandle) } #ifdef XP_WIN - RefPtr syncObject = new SyncObjectD3D11(aHandle); - return syncObject; + return MakeAndAddRef(aHandle); #else MOZ_ASSERT_UNREACHABLE(); return nullptr; diff --git a/gfx/layers/client/TextureClient.h b/gfx/layers/client/TextureClient.h index 296973c236..c7f54b8d54 100644 --- a/gfx/layers/client/TextureClient.h +++ b/gfx/layers/client/TextureClient.h @@ -291,7 +291,7 @@ public: RefPtr surf = BorrowDrawTarget()->Snapshot(); RefPtr data = surf->GetDataSurface(); Unlock(); - return data; + return data.forget(); } virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix); diff --git a/gfx/layers/client/TextureClientPool.cpp b/gfx/layers/client/TextureClientPool.cpp index 555405c61d..1ca3399fb1 100644 --- a/gfx/layers/client/TextureClientPool.cpp +++ b/gfx/layers/client/TextureClientPool.cpp @@ -11,6 +11,9 @@ #include "nsComponentManagerUtils.h" +#define TCP_LOG(...) +//#define TCP_LOG(...) printf_stderr(__VA_ARGS__); + namespace mozilla { namespace layers { @@ -32,6 +35,8 @@ TextureClientPool::TextureClientPool(gfx::SurfaceFormat aFormat, , mOutstandingClients(0) , mSurfaceAllocator(aAllocator) { + TCP_LOG("TexturePool %p created with max size %u and timeout %u\n", + this, mMaxTextureClients, aShrinkTimeoutMsec); mTimer = do_CreateInstance("@mozilla.org/timer;1"); if (aFormat == gfx::SurfaceFormat::UNKNOWN) { gfxWarning() << "Creating texture pool for SurfaceFormat::UNKNOWN format"; @@ -89,7 +94,9 @@ TextureClientPool::GetTextureClient() DebugOnly ok = TestClientPool("fetch", textureClient, this); MOZ_ASSERT(ok); #endif - return textureClient; + TCP_LOG("TexturePool %p giving %p from pool; size %u outstanding %u\n", + this, textureClient.get(), mTextureClients.size(), mOutstandingClients); + return textureClient.forget(); } // We're increasing the number of outstanding TextureClients without reusing a @@ -113,7 +120,9 @@ TextureClientPool::GetTextureClient() textureClient->mPoolTracker = this; } #endif - return textureClient; + TCP_LOG("TexturePool %p giving new %p; size %u outstanding %u\n", + this, textureClient.get(), mTextureClients.size(), mOutstandingClients); + return textureClient.forget(); } void @@ -130,6 +139,8 @@ TextureClientPool::ReturnTextureClient(TextureClient *aClient) MOZ_ASSERT(mOutstandingClients > mTextureClientsDeferred.size()); mOutstandingClients--; mTextureClients.push(aClient); + TCP_LOG("TexturePool %p had client %p returned; size %u outstanding %u\n", + this, aClient, mTextureClients.size(), mOutstandingClients); // Shrink down if we're beyond our maximum size ShrinkToMaximumSize(); @@ -137,6 +148,7 @@ TextureClientPool::ReturnTextureClient(TextureClient *aClient) // Kick off the pool shrinking timer if there are still more unused texture // clients than our desired minimum cache size. if (mTextureClients.size() > sMinCacheSize) { + TCP_LOG("TexturePool %p scheduling a shrink-to-min-size\n", this); mTimer->InitWithFuncCallback(ShrinkCallback, this, mShrinkTimeoutMsec, nsITimer::TYPE_ONE_SHOT); } @@ -153,6 +165,8 @@ TextureClientPool::ReturnTextureClientDeferred(TextureClient *aClient) MOZ_ASSERT(ok); #endif mTextureClientsDeferred.push(aClient); + TCP_LOG("TexturePool %p had client %p defer-returned, size %u outstanding %u\n", + this, aClient, mTextureClientsDeferred.size(), mOutstandingClients); ShrinkToMaximumSize(); } @@ -160,6 +174,8 @@ void TextureClientPool::ShrinkToMaximumSize() { uint32_t totalClientsOutstanding = mTextureClients.size() + mOutstandingClients; + TCP_LOG("TexturePool %p shrinking to max size %u; total outstanding %u\n", + this, mMaxTextureClients, totalClientsOutstanding); // We're over our desired maximum size, immediately shrink down to the // maximum, or zero if we have too many outstanding texture clients. @@ -169,6 +185,9 @@ TextureClientPool::ShrinkToMaximumSize() if (mTextureClientsDeferred.size()) { MOZ_ASSERT(mOutstandingClients > 0); mOutstandingClients--; + TCP_LOG("TexturePool %p dropped deferred client %p; %u remaining\n", + this, mTextureClientsDeferred.top().get(), + mTextureClientsDeferred.size() - 1); mTextureClientsDeferred.pop(); } else { if (!mTextureClients.size()) { @@ -176,8 +195,11 @@ TextureClientPool::ShrinkToMaximumSize() // with none in the pool. This can happen for pathological cases, or // it could mean that mMaxTextureClients needs adjusting for whatever // device we're running on. + TCP_LOG("TexturePool %p encountering pathological case!\n", this); break; } + TCP_LOG("TexturePool %p dropped non-deferred client %p; %u remaining\n", + this, mTextureClients.top().get(), mTextureClients.size() - 1); mTextureClients.pop(); } totalClientsOutstanding--; @@ -187,7 +209,10 @@ TextureClientPool::ShrinkToMaximumSize() void TextureClientPool::ShrinkToMinimumSize() { + TCP_LOG("TexturePool %p shrinking to minimum size %u\n", this, sMinCacheSize); while (mTextureClients.size() > sMinCacheSize) { + TCP_LOG("TexturePool %p popped %p; shrunk to %u\n", + this, mTextureClients.top().get(), mTextureClients.size() - 1); mTextureClients.pop(); } } @@ -195,6 +220,8 @@ TextureClientPool::ShrinkToMinimumSize() void TextureClientPool::ReturnDeferredClients() { + TCP_LOG("TexturePool %p returning %u deferred clients to pool\n", + this, mTextureClientsDeferred.size()); while (!mTextureClientsDeferred.empty()) { mTextureClients.push(mTextureClientsDeferred.top()); mTextureClientsDeferred.pop(); @@ -207,20 +234,35 @@ TextureClientPool::ReturnDeferredClients() // Kick off the pool shrinking timer if there are still more unused texture // clients than our desired minimum cache size. if (mTextureClients.size() > sMinCacheSize) { + TCP_LOG("TexturePool %p kicking off shrink-to-min timer\n", this); mTimer->InitWithFuncCallback(ShrinkCallback, this, mShrinkTimeoutMsec, nsITimer::TYPE_ONE_SHOT); } } +void +TextureClientPool::ReportClientLost() +{ + MOZ_ASSERT(mOutstandingClients > mTextureClientsDeferred.size()); + mOutstandingClients--; + TCP_LOG("TexturePool %p getting report client lost; down to %u outstanding\n", + this, mOutstandingClients); +} + void TextureClientPool::Clear() { + TCP_LOG("TexturePool %p getting cleared\n", this); while (!mTextureClients.empty()) { + TCP_LOG("TexturePool %p releasing client %p\n", + this, mTextureClients.top().get()); mTextureClients.pop(); } while (!mTextureClientsDeferred.empty()) { MOZ_ASSERT(mOutstandingClients > 0); mOutstandingClients--; + TCP_LOG("TexturePool %p releasing deferred client %p\n", + this, mTextureClientsDeferred.top().get()); mTextureClientsDeferred.pop(); } } diff --git a/gfx/layers/client/TextureClientPool.h b/gfx/layers/client/TextureClientPool.h index 619f0e3905..b491b45c88 100644 --- a/gfx/layers/client/TextureClientPool.h +++ b/gfx/layers/client/TextureClientPool.h @@ -75,10 +75,7 @@ public: * Report that a client retrieved via GetTextureClient() has become * unusable, so that it will no longer be tracked. */ - void ReportClientLost() { - MOZ_ASSERT(mOutstandingClients > mTextureClientsDeferred.size()); - mOutstandingClients--; - } + void ReportClientLost(); /** * Calling this will cause the pool to attempt to relinquish any unused diff --git a/gfx/layers/client/TextureClientRecycleAllocator.cpp b/gfx/layers/client/TextureClientRecycleAllocator.cpp index ce871a0f22..f15dad955d 100644 --- a/gfx/layers/client/TextureClientRecycleAllocator.cpp +++ b/gfx/layers/client/TextureClientRecycleAllocator.cpp @@ -193,7 +193,8 @@ TextureClientRecycleAllocatorImp::CreateOrRecycleForDrawing( mInUseClients[textureHolder->GetTextureClient()] = textureHolder; } textureHolder->GetTextureClient()->SetRecycleCallback(TextureClientRecycleAllocatorImp::RecycleCallback, this); - return textureHolder->GetTextureClient(); + RefPtr client(textureHolder->GetTextureClient()); + return client.forget(); } void diff --git a/gfx/layers/composite/CompositableHost.cpp b/gfx/layers/composite/CompositableHost.cpp index ed1b2a664a..0d5f932883 100644 --- a/gfx/layers/composite/CompositableHost.cpp +++ b/gfx/layers/composite/CompositableHost.cpp @@ -204,7 +204,7 @@ CompositableHost::Create(const TextureInfo& aTextureInfo) default: NS_ERROR("Unknown CompositableType"); } - return result; + return result.forget(); } void diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp index 4409562658..6d7529bdf2 100644 --- a/gfx/layers/composite/TextureHost.cpp +++ b/gfx/layers/composite/TextureHost.cpp @@ -210,7 +210,7 @@ TextureHost::Create(const SurfaceDescriptor& aDesc, return CreateTextureHostOGL(aDesc, aDeallocator, aFlags); case SurfaceDescriptor::TSharedSurfaceDescriptor: - return new SharedSurfaceTextureHost(aFlags, aDesc.get_SharedSurfaceDescriptor()); + return MakeAndAddRef(aFlags, aDesc.get_SharedSurfaceDescriptor()); case SurfaceDescriptor::TSurfaceDescriptorMacIOSurface: if (Compositor::GetBackend() == LayersBackend::LAYERS_OPENGL) { @@ -222,8 +222,7 @@ TextureHost::Create(const SurfaceDescriptor& aDesc, #ifdef MOZ_X11 case SurfaceDescriptor::TSurfaceDescriptorX11: { const SurfaceDescriptorX11& desc = aDesc.get_SurfaceDescriptorX11(); - RefPtr result = new X11TextureHost(aFlags, desc); - return result; + return MakeAndAddRef(aFlags, desc); } #endif @@ -232,6 +231,7 @@ TextureHost::Create(const SurfaceDescriptor& aDesc, return CreateTextureHostD3D9(aDesc, aDeallocator, aFlags); case SurfaceDescriptor::TSurfaceDescriptorD3D10: + case SurfaceDescriptor::TSurfaceDescriptorDXGIYCbCr: if (Compositor::GetBackend() == LayersBackend::LAYERS_D3D9) { return CreateTextureHostD3D9(aDesc, aDeallocator, aFlags); } else { @@ -275,7 +275,7 @@ CreateBackendIndependentTextureHost(const SurfaceDescriptor& aDesc, NS_WARNING("No backend independent TextureHost for this descriptor type"); } } - return result; + return result.forget(); } void diff --git a/gfx/layers/d3d11/CompositorD3D11.cpp b/gfx/layers/d3d11/CompositorD3D11.cpp index 8f3926ed3a..1f9e055017 100644 --- a/gfx/layers/d3d11/CompositorD3D11.cpp +++ b/gfx/layers/d3d11/CompositorD3D11.cpp @@ -454,7 +454,7 @@ CompositorD3D11::CreateRenderTarget(const gfx::IntRect& aRect, mContext->ClearRenderTargetView(rt->mRTView, clear); } - return rt; + return rt.forget(); } TemporaryRef @@ -513,7 +513,7 @@ CompositorD3D11::CreateRenderTargetFromSource(const gfx::IntRect &aRect, new CompositingRenderTargetD3D11(texture, aRect.TopLeft()); rt->SetSize(aRect.Size()); - return rt; + return rt.forget(); } void diff --git a/gfx/layers/d3d11/TextureD3D11.cpp b/gfx/layers/d3d11/TextureD3D11.cpp index 6cfc762f82..07cc79f79e 100644 --- a/gfx/layers/d3d11/TextureD3D11.cpp +++ b/gfx/layers/d3d11/TextureD3D11.cpp @@ -158,11 +158,16 @@ CreateTextureHostD3D11(const SurfaceDescriptor& aDesc, aDesc.get_SurfaceDescriptorD3D10()); break; } + case SurfaceDescriptor::TSurfaceDescriptorDXGIYCbCr: { + result = new DXGIYCbCrTextureHostD3D11(aFlags, + aDesc.get_SurfaceDescriptorDXGIYCbCr()); + break; + } default: { NS_WARNING("Unsupported SurfaceDescriptor type"); } } - return result; + return result.forget(); } TextureClientD3D11::TextureClientD3D11(ISurfaceAllocator* aAllocator, @@ -207,6 +212,22 @@ TextureClientD3D11::~TextureClientD3D11() #endif } +// static +TemporaryRef +TextureClientD3D11::Create(ISurfaceAllocator* aAllocator, + gfx::SurfaceFormat aFormat, + TextureFlags aFlags, + ID3D11Texture2D* aTexture, + gfx::IntSize aSize) +{ + RefPtr texture = new TextureClientD3D11(aAllocator, + aFormat, + aFlags); + texture->mTexture = aTexture; + texture->mSize = aSize; + return texture.forget(); +} + TemporaryRef TextureClientD3D11::CreateSimilar(TextureFlags aFlags, TextureAllocationFlags aAllocFlags) const @@ -218,7 +239,7 @@ TextureClientD3D11::CreateSimilar(TextureFlags aFlags, return nullptr; } - return tex; + return tex.forget(); } void @@ -496,6 +517,95 @@ TextureClientD3D11::ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor) return true; } +DXGIYCbCrTextureClient::DXGIYCbCrTextureClient(ISurfaceAllocator* aAllocator, + TextureFlags aFlags) + : TextureClient(aAllocator, aFlags) + , mIsLocked(false) +{ + MOZ_COUNT_CTOR(DXGIYCbCrTextureClient); +} + +class YCbCrKeepAliveD3D11 : public KeepAlive +{ +public: + YCbCrKeepAliveD3D11(RefPtr aTextures[3]) + { + mTextures[0] = aTextures[0]; + mTextures[1] = aTextures[1]; + mTextures[2] = aTextures[2]; + } + +protected: + RefPtr mTextures[3]; +}; + +DXGIYCbCrTextureClient::~DXGIYCbCrTextureClient() +{ + if (mHoldRefs[0] && mActor) { + KeepUntilFullDeallocation(MakeUnique(mHoldRefs)); + } + MOZ_COUNT_DTOR(DXGIYCbCrTextureClient); +} + +// static +TemporaryRef +DXGIYCbCrTextureClient::Create(ISurfaceAllocator* aAllocator, + TextureFlags aFlags, + IUnknown* aTextureY, + IUnknown* aTextureCb, + IUnknown* aTextureCr, + HANDLE aHandleY, + HANDLE aHandleCb, + HANDLE aHandleCr, + const gfx::IntSize& aSize, + const gfx::IntSize& aSizeY, + const gfx::IntSize& aSizeCbCr) +{ + RefPtr texture = + new DXGIYCbCrTextureClient(aAllocator, aFlags); + texture->mHandles[0] = aHandleY; + texture->mHandles[1] = aHandleCb; + texture->mHandles[2] = aHandleCr; + texture->mHoldRefs[0] = aTextureY; + texture->mHoldRefs[1] = aTextureCb; + texture->mHoldRefs[2] = aTextureCr; + texture->mSize = aSize; + texture->mSizeY = aSizeY; + texture->mSizeCbCr = aSizeCbCr; + return texture.forget(); +} + +bool +DXGIYCbCrTextureClient::Lock(OpenMode) +{ + MOZ_ASSERT(!mIsLocked); + if (!IsValid()) { + return false; + } + mIsLocked = true; + return true; +} + +void +DXGIYCbCrTextureClient::Unlock() +{ + MOZ_ASSERT(mIsLocked, "Unlock called while the texture is not locked!"); + mIsLocked = false; +} + +bool +DXGIYCbCrTextureClient::ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor) +{ + MOZ_ASSERT(IsValid()); + if (!IsAllocated()) { + return false; + } + + aOutDescriptor = SurfaceDescriptorDXGIYCbCr((WindowsHandle)mHandles[0], (WindowsHandle)mHandles[1], (WindowsHandle)mHandles[2], + GetSize(), mSizeY, mSizeCbCr); + return true; +} + DXGITextureHostD3D11::DXGITextureHostD3D11(TextureFlags aFlags, const SurfaceDescriptorD3D10& aDescriptor) : TextureHost(aFlags) @@ -576,6 +686,108 @@ DXGITextureHostD3D11::GetTextureSources() return mTextureSource.get(); } +DXGIYCbCrTextureHostD3D11::DXGIYCbCrTextureHostD3D11(TextureFlags aFlags, + const SurfaceDescriptorDXGIYCbCr& aDescriptor) + : TextureHost(aFlags) + , mSize(aDescriptor.size()) + , mIsLocked(false) +{ + mHandles[0] = aDescriptor.handleY(); + mHandles[1] = aDescriptor.handleCb(); + mHandles[2] = aDescriptor.handleCr(); +} + +bool +DXGIYCbCrTextureHostD3D11::OpenSharedHandle() +{ + if (!GetDevice()) { + return false; + } + + HRESULT hr = GetDevice()->OpenSharedResource((HANDLE)mHandles[0], + __uuidof(ID3D11Texture2D), + (void**)(ID3D11Texture2D**)byRef(mTextures[0])); + if (FAILED(hr)) { + NS_WARNING("Failed to open shared texture for Y Plane"); + return false; + } + + hr = GetDevice()->OpenSharedResource((HANDLE)mHandles[1], + __uuidof(ID3D11Texture2D), + (void**)(ID3D11Texture2D**)byRef(mTextures[1])); + if (FAILED(hr)) { + NS_WARNING("Failed to open shared texture for Cb Plane"); + return false; + } + + hr = GetDevice()->OpenSharedResource((HANDLE)mHandles[2], + __uuidof(ID3D11Texture2D), + (void**)(ID3D11Texture2D**)byRef(mTextures[2])); + if (FAILED(hr)) { + NS_WARNING("Failed to open shared texture for Cr Plane"); + return false; + } + + return true; +} + +ID3D11Device* +DXGIYCbCrTextureHostD3D11::GetDevice() +{ + return gfxWindowsPlatform::GetPlatform()->GetD3D11Device(); +} + +void +DXGIYCbCrTextureHostD3D11::SetCompositor(Compositor* aCompositor) +{ + mCompositor = static_cast(aCompositor); +} + +bool +DXGIYCbCrTextureHostD3D11::Lock() +{ + if (!GetDevice()) { + NS_WARNING("trying to lock a TextureHost without a D3D device"); + return false; + } + if (!mTextureSources[0]) { + if (!mTextures[0] && !OpenSharedHandle()) { + return false; + } + + mTextureSources[0] = new DataTextureSourceD3D11(SurfaceFormat::A8, mCompositor, mTextures[0]); + mTextureSources[1] = new DataTextureSourceD3D11(SurfaceFormat::A8, mCompositor, mTextures[1]); + mTextureSources[2] = new DataTextureSourceD3D11(SurfaceFormat::A8, mCompositor, mTextures[2]); + mTextureSources[0]->SetNextSibling(mTextureSources[1]); + mTextureSources[1]->SetNextSibling(mTextureSources[2]); + } + + mIsLocked = LockD3DTexture(mTextureSources[0]->GetD3D11Texture()) && + LockD3DTexture(mTextureSources[1]->GetD3D11Texture()) && + LockD3DTexture(mTextureSources[2]->GetD3D11Texture()); + + return mIsLocked; +} + +void +DXGIYCbCrTextureHostD3D11::Unlock() +{ + MOZ_ASSERT(mIsLocked); + UnlockD3DTexture(mTextureSources[0]->GetD3D11Texture()); + UnlockD3DTexture(mTextureSources[1]->GetD3D11Texture()); + UnlockD3DTexture(mTextureSources[2]->GetD3D11Texture()); + mIsLocked = false; +} + +TextureSource* +DXGIYCbCrTextureHostD3D11::GetTextureSources() +{ + MOZ_ASSERT(mIsLocked); + // If Lock was successful we must have a valid TextureSource. + MOZ_ASSERT(mTextureSources[0] && mTextureSources[1] && mTextureSources[2]); + return mTextureSources[0].get(); +} + bool DataTextureSourceD3D11::Update(DataSourceSurface* aSurface, nsIntRegion* aDestRegion, diff --git a/gfx/layers/d3d11/TextureD3D11.h b/gfx/layers/d3d11/TextureD3D11.h index 51425c0335..0dcab0454b 100644 --- a/gfx/layers/d3d11/TextureD3D11.h +++ b/gfx/layers/d3d11/TextureD3D11.h @@ -34,6 +34,14 @@ public: virtual ~TextureClientD3D11(); + // Creates a TextureClient and init width. + static TemporaryRef + Create(ISurfaceAllocator* aAllocator, + gfx::SurfaceFormat aFormat, + TextureFlags aFlags, + ID3D11Texture2D* aTexture, + gfx::IntSize aSize); + // TextureClient virtual bool IsAllocated() const override { return mTexture || mTexture10; } @@ -78,6 +86,63 @@ protected: bool mNeedsClearWhite; }; +class DXGIYCbCrTextureClient : public TextureClient +{ +public: + DXGIYCbCrTextureClient(ISurfaceAllocator* aAllocator, + TextureFlags aFlags); + + virtual ~DXGIYCbCrTextureClient(); + + // Creates a TextureClient and init width. + static TemporaryRef + Create(ISurfaceAllocator* aAllocator, + TextureFlags aFlags, + IUnknown* aTextureY, + IUnknown* aTextureCb, + IUnknown* aTextureCr, + HANDLE aHandleY, + HANDLE aHandleCb, + HANDLE aHandleCr, + const gfx::IntSize& aSize, + const gfx::IntSize& aSizeY, + const gfx::IntSize& aSizeCbCr); + + // TextureClient + + virtual bool IsAllocated() const MOZ_OVERRIDE{ return !!mHoldRefs[0]; } + + virtual bool Lock(OpenMode aOpenMode) MOZ_OVERRIDE; + + virtual void Unlock() MOZ_OVERRIDE; + + virtual bool IsLocked() const MOZ_OVERRIDE{ return mIsLocked; } + + virtual bool ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor) MOZ_OVERRIDE; + + virtual gfx::IntSize GetSize() const + { + return mSize; + } + + virtual bool HasInternalBuffer() const MOZ_OVERRIDE{ return true; } + + // This TextureClient should not be used in a context where we use CreateSimilar + // (ex. component alpha) because the underlying texture data is always created by + // an external producer. + virtual TemporaryRef + CreateSimilar(TextureFlags, TextureAllocationFlags) const MOZ_OVERRIDE{ return nullptr; } + +private: + RefPtr mHoldRefs[3]; + HANDLE mHandles[3]; + gfx::IntSize mSize; + gfx::IntSize mSizeY; + gfx::IntSize mSizeCbCr; + bool mIsLocked; +}; + + /** * TextureSource that provides with the necessary APIs to be composited by a * CompositorD3D11. @@ -213,6 +278,45 @@ protected: bool mIsLocked; }; +class DXGIYCbCrTextureHostD3D11 : public TextureHost +{ +public: + DXGIYCbCrTextureHostD3D11(TextureFlags aFlags, + const SurfaceDescriptorDXGIYCbCr& aDescriptor); + + virtual TextureSource* GetTextureSources() MOZ_OVERRIDE; + + virtual void DeallocateDeviceData() MOZ_OVERRIDE{} + + virtual void SetCompositor(Compositor* aCompositor) MOZ_OVERRIDE; + + virtual gfx::SurfaceFormat GetFormat() const MOZ_OVERRIDE{ return gfx::SurfaceFormat::YUV; } + + virtual bool Lock() MOZ_OVERRIDE; + + virtual void Unlock() MOZ_OVERRIDE; + + virtual gfx::IntSize GetSize() const MOZ_OVERRIDE{ return mSize; } + + virtual TemporaryRef GetAsSurface() MOZ_OVERRIDE + { + return nullptr; + } + +protected: + ID3D11Device* GetDevice(); + + bool OpenSharedHandle(); + + RefPtr mTextures[3]; + RefPtr mTextureSources[3]; + + RefPtr mCompositor; + gfx::IntSize mSize; + WindowsHandle mHandles[3]; + bool mIsLocked; +}; + class CompositingRenderTargetD3D11 : public CompositingRenderTarget, public TextureSourceD3D11 { diff --git a/gfx/layers/d3d9/CompositorD3D9.cpp b/gfx/layers/d3d9/CompositorD3D9.cpp index b88ce72764..523eccf148 100644 --- a/gfx/layers/d3d9/CompositorD3D9.cpp +++ b/gfx/layers/d3d9/CompositorD3D9.cpp @@ -92,7 +92,7 @@ CompositorD3D9::GetMaxTextureSize() const TemporaryRef CompositorD3D9::CreateDataTextureSource(TextureFlags aFlags) { - return new DataTextureSourceD3D9(SurfaceFormat::UNKNOWN, this, aFlags); + return MakeAndAddRef(SurfaceFormat::UNKNOWN, this, aFlags); } TemporaryRef @@ -120,10 +120,7 @@ CompositorD3D9::CreateRenderTarget(const gfx::IntRect &aRect, return nullptr; } - RefPtr rt = - new CompositingRenderTargetD3D9(texture, aInit, aRect); - - return rt; + return MakeAndAddRef(texture, aInit, aRect); } TemporaryRef @@ -187,12 +184,9 @@ CompositorD3D9::CreateRenderTargetFromSource(const gfx::IntRect &aRect, } } - RefPtr rt = - new CompositingRenderTargetD3D9(texture, - INIT_MODE_NONE, - aRect); - - return rt; + return MakeAndAddRef(texture, + INIT_MODE_NONE, + aRect); } void diff --git a/gfx/layers/d3d9/DeviceManagerD3D9.cpp b/gfx/layers/d3d9/DeviceManagerD3D9.cpp index 2581c8eb69..297c9fc275 100644 --- a/gfx/layers/d3d9/DeviceManagerD3D9.cpp +++ b/gfx/layers/d3d9/DeviceManagerD3D9.cpp @@ -844,7 +844,7 @@ DeviceManagerD3D9::CreateTexture(const IntSize &aSize, RegisterTextureHost(aTextureHost); } - return result; + return result.forget(); } #ifdef DEBUG diff --git a/gfx/layers/d3d9/TextureD3D9.cpp b/gfx/layers/d3d9/TextureD3D9.cpp index 423d928c0c..544210a8ec 100644 --- a/gfx/layers/d3d9/TextureD3D9.cpp +++ b/gfx/layers/d3d9/TextureD3D9.cpp @@ -66,6 +66,10 @@ CreateTextureHostD3D9(const SurfaceDescriptor& aDesc, result = new DXGITextureHostD3D9(aFlags, aDesc); break; } + case SurfaceDescriptor::TSurfaceDescriptorDXGIYCbCr: { + result = new DXGIYCbCrTextureHostD3D9(aFlags, aDesc.get_SurfaceDescriptorDXGIYCbCr()); + break; + } default: { NS_WARNING("Unsupported SurfaceDescriptor type"); } @@ -195,7 +199,7 @@ TextureSourceD3D9::InitTextures(DeviceManagerD3D9* aDeviceManager, return nullptr; } - return result; + return result.forget(); } /** @@ -243,7 +247,7 @@ TextureSourceD3D9::DataToTexture(DeviceManagerD3D9* aDeviceManager, FinishTextures(aDeviceManager, texture, surface); - return texture; + return texture.forget(); } TemporaryRef @@ -267,7 +271,7 @@ TextureSourceD3D9::TextureToTexture(DeviceManagerD3D9* aDeviceManager, return nullptr; } - return texture; + return texture.forget(); } TemporaryRef @@ -306,7 +310,7 @@ TextureSourceD3D9::SurfaceToTexture(DeviceManagerD3D9* aDeviceManager, FinishTextures(aDeviceManager, texture, surface); - return texture; + return texture.forget(); } DataTextureSourceD3D9::DataTextureSourceD3D9(gfx::SurfaceFormat aFormat, @@ -579,7 +583,7 @@ CairoTextureClientD3D9::CreateSimilar(TextureFlags aFlags, TextureAllocationFlag return nullptr; } - return tex; + return tex.forget(); } bool @@ -752,6 +756,29 @@ SharedTextureClientD3D9::~SharedTextureClientD3D9() MOZ_COUNT_DTOR(SharedTextureClientD3D9); } +// static +TemporaryRef +SharedTextureClientD3D9::Create(ISurfaceAllocator* aAllocator, + gfx::SurfaceFormat aFormat, + TextureFlags aFlags, + IDirect3DTexture9* aTexture, + HANDLE aSharedHandle, + D3DSURFACE_DESC aDesc) +{ + RefPtr texture = + new SharedTextureClientD3D9(aAllocator, + aFormat, + aFlags); + MOZ_ASSERT(!texture->mTexture); + texture->mTexture = aTexture; + texture->mHandle = aSharedHandle; + texture->mDesc = aDesc; + if (texture->mTexture) { + gfxWindowsPlatform::sD3D9SharedTextureUsed += texture->mDesc.Width * texture->mDesc.Height * 4; + } + return texture.forget(); +} + bool SharedTextureClientD3D9::Lock(OpenMode) { @@ -1021,5 +1048,87 @@ DXGITextureHostD3D9::DeallocateDeviceData() mTextureSource = nullptr; } +DXGIYCbCrTextureHostD3D9::DXGIYCbCrTextureHostD3D9(TextureFlags aFlags, + const SurfaceDescriptorDXGIYCbCr& aDescriptor) + : TextureHost(aFlags) + , mSize(aDescriptor.size()) + , mSizeY(aDescriptor.sizeY()) + , mSizeCbCr(aDescriptor.sizeCbCr()) + , mIsLocked(false) +{ + mHandles[0] = reinterpret_cast(aDescriptor.handleY()); + mHandles[1] = reinterpret_cast(aDescriptor.handleCb()); + mHandles[2] = reinterpret_cast(aDescriptor.handleCr()); +} + +IDirect3DDevice9* +DXGIYCbCrTextureHostD3D9::GetDevice() +{ + return mCompositor ? mCompositor->device() : nullptr; +} + +void +DXGIYCbCrTextureHostD3D9::SetCompositor(Compositor* aCompositor) +{ + mCompositor = static_cast(aCompositor); +} + +bool +DXGIYCbCrTextureHostD3D9::Lock() +{ + if (!GetDevice()) { + NS_WARNING("trying to lock a TextureHost without a D3D device"); + return false; + } + if (!mTextureSources[0]) { + if (!mHandles[0]) { + return false; + } + + if (FAILED(GetDevice()->CreateTexture(mSizeY.width, mSizeY.height, + 1, 0, D3DFMT_A8, D3DPOOL_DEFAULT, + byRef(mTextures[0]), &mHandles[0]))) { + return false; + } + + if (FAILED(GetDevice()->CreateTexture(mSizeCbCr.width, mSizeCbCr.height, + 1, 0, D3DFMT_A8, D3DPOOL_DEFAULT, + byRef(mTextures[1]), &mHandles[1]))) { + return false; + } + + if (FAILED(GetDevice()->CreateTexture(mSizeCbCr.width, mSizeCbCr.height, + 1, 0, D3DFMT_A8, D3DPOOL_DEFAULT, + byRef(mTextures[2]), &mHandles[2]))) { + return false; + } + + mTextureSources[0] = new DataTextureSourceD3D9(SurfaceFormat::A8, mSize, mCompositor, mTextures[0]); + mTextureSources[1] = new DataTextureSourceD3D9(SurfaceFormat::A8, mSize, mCompositor, mTextures[1]); + mTextureSources[2] = new DataTextureSourceD3D9(SurfaceFormat::A8, mSize, mCompositor, mTextures[2]); + mTextureSources[0]->SetNextSibling(mTextureSources[1]); + mTextureSources[1]->SetNextSibling(mTextureSources[2]); + } + + mIsLocked = true; + return mIsLocked; +} + +void +DXGIYCbCrTextureHostD3D9::Unlock() +{ + MOZ_ASSERT(mIsLocked); + mIsLocked = false; +} + +TextureSource* +DXGIYCbCrTextureHostD3D9::GetTextureSources() +{ + MOZ_ASSERT(mIsLocked); + // If Lock was successful we must have a valid TextureSource. + MOZ_ASSERT(mTextureSources[0] && mTextureSources[1] && mTextureSources[2]); + return mTextureSources[0].get(); +} + } } diff --git a/gfx/layers/d3d9/TextureD3D9.h b/gfx/layers/d3d9/TextureD3D9.h index 138da5e0c8..d63f545da8 100644 --- a/gfx/layers/d3d9/TextureD3D9.h +++ b/gfx/layers/d3d9/TextureD3D9.h @@ -248,6 +248,15 @@ public: virtual ~SharedTextureClientD3D9(); + // Creates a TextureClient and init width. + static TemporaryRef + Create(ISurfaceAllocator* aAllocator, + gfx::SurfaceFormat aFormat, + TextureFlags aFlags, + IDirect3DTexture9* aTexture, + HANDLE aSharedHandle, + D3DSURFACE_DESC aDesc); + // TextureClient virtual bool IsAllocated() const override { return !!mTexture; } @@ -260,17 +269,6 @@ public: virtual bool ToSurfaceDescriptor(SurfaceDescriptor& aOutDescriptor) override; - void InitWith(IDirect3DTexture9* aTexture, HANDLE aSharedHandle, D3DSURFACE_DESC aDesc) - { - MOZ_ASSERT(!mTexture); - mTexture = aTexture; - mHandle = aSharedHandle; - mDesc = aDesc; - if (mTexture) { - gfxWindowsPlatform::sD3D9SharedTextureUsed += mDesc.Width * mDesc.Height * 4; - } - } - virtual gfx::IntSize GetSize() const { return gfx::IntSize(mDesc.Width, mDesc.Height); @@ -370,6 +368,43 @@ protected: bool mIsLocked; }; +class DXGIYCbCrTextureHostD3D9 : public TextureHost +{ +public: + DXGIYCbCrTextureHostD3D9(TextureFlags aFlags, + const SurfaceDescriptorDXGIYCbCr& aDescriptor); + + virtual TextureSource* GetTextureSources() override; + + virtual void DeallocateDeviceData() override {} + + virtual void SetCompositor(Compositor* aCompositor) override; + + virtual gfx::SurfaceFormat GetFormat() const override { return gfx::SurfaceFormat::YUV; } + + virtual bool Lock() override; + virtual void Unlock() override; + virtual gfx::IntSize GetSize() const override { return mSize; } + + virtual TemporaryRef GetAsSurface() override + { + return nullptr; + } + + protected: + IDirect3DDevice9* GetDevice(); + + HANDLE mHandles[3]; + RefPtr mTextures[3]; + RefPtr mTextureSources[3]; + + RefPtr mCompositor; + gfx::IntSize mSize; + gfx::IntSize mSizeY; + gfx::IntSize mSizeCbCr; + bool mIsLocked; + }; + class CompositingRenderTargetD3D9 : public CompositingRenderTarget, public TextureSourceD3D9 { diff --git a/gfx/layers/ipc/CompositorBench.cpp b/gfx/layers/ipc/CompositorBench.cpp index 5f708a67bf..ef74ff6b50 100644 --- a/gfx/layers/ipc/CompositorBench.cpp +++ b/gfx/layers/ipc/CompositorBench.cpp @@ -135,10 +135,10 @@ public: red = modf(i * 0.03f, &tmp); EffectChain effects; gfxRGBA color(red, 0.4f, 0.4f, 1.0f); - return new EffectSolidColor(gfx::Color(color.r, - color.g, - color.b, - color.a)); + return MakeAndAddRef(gfx::Color(color.r, + color.g, + color.b, + color.a)); } }; @@ -161,10 +161,10 @@ public: red = modf(i * 0.03f, &tmp); EffectChain effects; gfxRGBA color(red, 0.4f, 0.4f, 1.0f); - return new EffectSolidColor(gfx::Color(color.r, - color.g, - color.b, - color.a)); + return MakeAndAddRef(gfx::Color(color.r, + color.g, + color.b, + color.a)); } }; @@ -241,8 +241,7 @@ public: } TemporaryRef CreateEffect(size_t i) { - RefPtr effect = CreateTexturedEffect(SurfaceFormat::B8G8R8A8, mTexture, Filter::POINT, true); - return effect; + return CreateTexturedEffect(SurfaceFormat::B8G8R8A8, mTexture, Filter::POINT, true); } }; @@ -285,8 +284,7 @@ public: } virtual TemporaryRef CreateEffect(size_t i) { - RefPtr effect = CreateTexturedEffect(SurfaceFormat::B8G8R8A8, mTexture, Filter::POINT, true); - return effect; + return CreateTexturedEffect(SurfaceFormat::B8G8R8A8, mTexture, Filter::POINT, true); } }; @@ -328,8 +326,7 @@ public: } virtual TemporaryRef CreateEffect(size_t i) { - RefPtr effect = CreateTexturedEffect(SurfaceFormat::B8G8R8A8, mTexture, Filter::POINT); - return effect; + return CreateTexturedEffect(SurfaceFormat::B8G8R8A8, mTexture, Filter::POINT); } }; @@ -370,8 +367,7 @@ public: } virtual TemporaryRef CreateEffect(size_t i) { - RefPtr effect = CreateTexturedEffect(SurfaceFormat::B8G8R8A8, mTexture, Filter::POINT); - return effect; + return CreateTexturedEffect(SurfaceFormat::B8G8R8A8, mTexture, Filter::POINT); } }; #endif diff --git a/gfx/layers/ipc/LayersSurfaces.ipdlh b/gfx/layers/ipc/LayersSurfaces.ipdlh index a85284f61b..a8de2948af 100644 --- a/gfx/layers/ipc/LayersSurfaces.ipdlh +++ b/gfx/layers/ipc/LayersSurfaces.ipdlh @@ -50,6 +50,15 @@ struct SurfaceDescriptorD3D10 { IntSize size; }; +struct SurfaceDescriptorDXGIYCbCr { + WindowsHandle handleY; + WindowsHandle handleCb; + WindowsHandle handleCr; + IntSize size; + IntSize sizeY; + IntSize sizeCbCr; +}; + struct SurfaceDescriptorMacIOSurface { uint32_t surface; double scaleFactor; @@ -104,6 +113,7 @@ union SurfaceDescriptor { SurfaceDescriptorD3D9; SurfaceDescriptorDIB; SurfaceDescriptorD3D10; + SurfaceDescriptorDXGIYCbCr; SurfaceDescriptorX11; SurfaceTextureDescriptor; EGLImageDescriptor; diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build index 13f9d94e8f..c1968cdb07 100644 --- a/gfx/layers/moz.build +++ b/gfx/layers/moz.build @@ -43,8 +43,12 @@ EXPORTS += [ ] if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': + SOURCES += [ + 'D3D11ShareHandleImage.cpp', + ] UNIFIED_SOURCES += [ 'D3D9SurfaceImage.cpp', + 'IMFYCbCrImage.cpp', 'TextureDIB.cpp', ] EXPORTS.mozilla.layers += [ @@ -123,6 +127,7 @@ EXPORTS.mozilla.layers += [ 'composite/TextureHost.h', 'Compositor.h', 'CompositorTypes.h', + 'D3D11ShareHandleImage.h', 'D3D9SurfaceImage.h', 'Effects.h', 'ImageDataSerializer.h', diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp index ef616773f8..2c8bd6430f 100644 --- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -1413,9 +1413,7 @@ CompositorOGL::Resume() TemporaryRef CompositorOGL::CreateDataTextureSource(TextureFlags aFlags) { - RefPtr result = - new TextureImageTextureSourceOGL(this, aFlags); - return result; + return MakeAndAddRef(this, aFlags); } bool diff --git a/gfx/layers/opengl/GrallocTextureClient.cpp b/gfx/layers/opengl/GrallocTextureClient.cpp index f86df1fbc9..98fae523bf 100644 --- a/gfx/layers/opengl/GrallocTextureClient.cpp +++ b/gfx/layers/opengl/GrallocTextureClient.cpp @@ -56,17 +56,7 @@ GrallocTextureClientOGL::CreateSimilar(TextureFlags aFlags, return nullptr; } - return tex; -} - -void -GrallocTextureClientOGL::InitWith(MaybeMagicGrallocBufferHandle aHandle, gfx::IntSize aSize) -{ - MOZ_ASSERT(!IsAllocated()); - MOZ_ASSERT(IsValid()); - mGrallocHandle = aHandle; - mGraphicBuffer = GetGraphicBufferFrom(aHandle); - mSize = aSize; + return tex.forget(); } bool diff --git a/gfx/layers/opengl/GrallocTextureClient.h b/gfx/layers/opengl/GrallocTextureClient.h index b031766e0a..a352d51d48 100644 --- a/gfx/layers/opengl/GrallocTextureClient.h +++ b/gfx/layers/opengl/GrallocTextureClient.h @@ -60,8 +60,6 @@ public: virtual void WaitForBufferOwnership(bool aWaitReleaseFence = true) override; - void InitWith(MaybeMagicGrallocBufferHandle aDesc, gfx::IntSize aSize); - void SetTextureFlags(TextureFlags aFlags) { AddFlags(aFlags); } gfx::IntSize GetSize() const override { return mSize; } diff --git a/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.cpp b/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.cpp index aad857671c..344df16755 100644 --- a/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.cpp +++ b/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.cpp @@ -22,12 +22,18 @@ MacIOSurfaceTextureClientOGL::~MacIOSurfaceTextureClientOGL() } } -void -MacIOSurfaceTextureClientOGL::InitWith(MacIOSurface* aSurface) +// static +TemporaryRef +MacIOSurfaceTextureClientOGL::Create(ISurfaceAllocator* aAllocator, + TextureFlags aFlags, + MacIOSurface* aSurface) { - MOZ_ASSERT(IsValid()); - MOZ_ASSERT(!IsAllocated()); - mSurface = aSurface; + RefPtr texture = + new MacIOSurfaceTextureClientOGL(aAllocator, aFlags); + MOZ_ASSERT(texture->IsValid()); + MOZ_ASSERT(!texture->IsAllocated()); + texture->mSurface = aSurface; + return texture.forget(); } bool diff --git a/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.h b/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.h index 80d5135cd6..b7e2fa0550 100644 --- a/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.h +++ b/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.h @@ -21,7 +21,11 @@ public: virtual ~MacIOSurfaceTextureClientOGL(); - void InitWith(MacIOSurface* aSurface); + // Creates a TextureClient and init width. + static TemporaryRef + Create(ISurfaceAllocator* aAllocator, + TextureFlags aFlags, + MacIOSurface* aSurface); virtual bool Lock(OpenMode aMode) override; diff --git a/gfx/src/FilterSupport.cpp b/gfx/src/FilterSupport.cpp index 18174a3888..acdffb6a7b 100644 --- a/gfx/src/FilterSupport.cpp +++ b/gfx/src/FilterSupport.cpp @@ -103,7 +103,7 @@ namespace FilterWrappers { { RefPtr filter = aDT->CreateFilter(FilterType::UNPREMULTIPLY); filter->SetInput(IN_UNPREMULTIPLY_IN, aInput); - return filter; + return filter.forget(); } static TemporaryRef @@ -111,7 +111,7 @@ namespace FilterWrappers { { RefPtr filter = aDT->CreateFilter(FilterType::PREMULTIPLY); filter->SetInput(IN_PREMULTIPLY_IN, aInput); - return filter; + return filter.forget(); } static TemporaryRef @@ -126,7 +126,7 @@ namespace FilterWrappers { transfer->SetAttribute(ATT_DISCRETE_TRANSFER_TABLE_B, glinearRGBTosRGBMap, 256); transfer->SetAttribute(ATT_DISCRETE_TRANSFER_DISABLE_A, true); transfer->SetInput(IN_DISCRETE_TRANSFER_IN, aInput); - return transfer; + return transfer.forget(); } static TemporaryRef @@ -141,7 +141,7 @@ namespace FilterWrappers { transfer->SetAttribute(ATT_DISCRETE_TRANSFER_TABLE_B, gsRGBToLinearRGBMap, 256); transfer->SetAttribute(ATT_DISCRETE_TRANSFER_DISABLE_A, true); transfer->SetInput(IN_DISCRETE_TRANSFER_IN, aInput); - return transfer; + return transfer.forget(); } static TemporaryRef @@ -150,7 +150,7 @@ namespace FilterWrappers { RefPtr filter = aDT->CreateFilter(FilterType::CROP); filter->SetAttribute(ATT_CROP_RECT, Rect(aRect)); filter->SetInput(IN_CROP_IN, aInputFilter); - return filter; + return filter.forget(); } static TemporaryRef @@ -159,7 +159,7 @@ namespace FilterWrappers { RefPtr filter = aDT->CreateFilter(FilterType::TRANSFORM); filter->SetAttribute(ATT_TRANSFORM_MATRIX, Matrix::Translation(aOffset.x, aOffset.y)); filter->SetInput(IN_TRANSFORM_IN, aInputFilter); - return filter; + return filter.forget(); } static TemporaryRef @@ -171,7 +171,7 @@ namespace FilterWrappers { RefPtr filter = aDT->CreateFilter(FilterType::GAUSSIAN_BLUR); filter->SetAttribute(ATT_GAUSSIAN_BLUR_STD_DEVIATION, stdX); filter->SetInput(IN_GAUSSIAN_BLUR_IN, aInputFilter); - return filter; + return filter.forget(); } RefPtr filterH = aDT->CreateFilter(FilterType::DIRECTIONAL_BLUR); RefPtr filterV = aDT->CreateFilter(FilterType::DIRECTIONAL_BLUR); @@ -181,7 +181,7 @@ namespace FilterWrappers { filterV->SetAttribute(ATT_DIRECTIONAL_BLUR_STD_DEVIATION, stdY); filterH->SetInput(IN_DIRECTIONAL_BLUR_IN, aInputFilter); filterV->SetInput(IN_DIRECTIONAL_BLUR_IN, filterH); - return filterV; + return filterV.forget(); } static TemporaryRef @@ -189,7 +189,7 @@ namespace FilterWrappers { { RefPtr filter = aDT->CreateFilter(FilterType::FLOOD); filter->SetAttribute(ATT_FLOOD_COLOR, Color(0,0,0,0)); - return filter; + return filter.forget(); } static TemporaryRef @@ -200,7 +200,7 @@ namespace FilterWrappers { filter->SetAttribute(ATT_TRANSFORM_MATRIX, Matrix::Translation(aSurfacePosition.x, aSurfacePosition.y)); filter->SetInput(IN_TRANSFORM_IN, aSurface); - return filter; + return filter.forget(); } static TemporaryRef @@ -216,7 +216,7 @@ namespace FilterWrappers { transfer->SetAttribute(ATT_DISCRETE_TRANSFER_TABLE_B, &zero, 1); transfer->SetAttribute(ATT_DISCRETE_TRANSFER_DISABLE_A, true); transfer->SetInput(IN_DISCRETE_TRANSFER_IN, aInput); - return transfer; + return transfer.forget(); } } @@ -280,7 +280,8 @@ FilterCachedColorModels::ForColorModel(ColorModel aColorModel) if (!mFilterForColorModel[aColorModel.ToIndex()]) { mFilterForColorModel[aColorModel.ToIndex()] = WrapForColorModel(aColorModel); } - return mFilterForColorModel[aColorModel.ToIndex()]; + RefPtr filter(mFilterForColorModel[aColorModel.ToIndex()]); + return filter.forget(); } TemporaryRef @@ -698,7 +699,7 @@ FilterNodeFromPrimitiveDescription(const FilterPrimitiveDescription& aDescriptio filter->SetInput(IN_BLEND_IN, aSources[0]); filter->SetInput(IN_BLEND_IN2, aSources[1]); } - return filter; + return filter.forget(); } case PrimitiveType::ColorMatrix: @@ -707,7 +708,8 @@ FilterNodeFromPrimitiveDescription(const FilterPrimitiveDescription& aDescriptio uint32_t type = atts.GetUint(eColorMatrixType); const nsTArray& values = atts.GetFloats(eColorMatrixValues); if (NS_FAILED(ComputeColorMatrix(type, values, colorMatrix))) { - return aSources[0]; + RefPtr filter(aSources[0]); + return filter.forget(); } Matrix5x4 matrix(colorMatrix[0], colorMatrix[5], colorMatrix[10], colorMatrix[15], colorMatrix[1], colorMatrix[6], colorMatrix[11], colorMatrix[16], @@ -718,7 +720,7 @@ FilterNodeFromPrimitiveDescription(const FilterPrimitiveDescription& aDescriptio filter->SetAttribute(ATT_COLOR_MATRIX_MATRIX, matrix); filter->SetAttribute(ATT_COLOR_MATRIX_ALPHA_MODE, (uint32_t)ALPHA_MODE_STRAIGHT); filter->SetInput(IN_COLOR_MATRIX_IN, aSources[0]); - return filter; + return filter.forget(); } case PrimitiveType::Morphology: @@ -745,7 +747,7 @@ FilterNodeFromPrimitiveDescription(const FilterPrimitiveDescription& aDescriptio filter->SetAttribute(ATT_MORPHOLOGY_RADII, IntSize(rx, ry)); filter->SetAttribute(ATT_MORPHOLOGY_OPERATOR, (uint32_t)op); filter->SetInput(IN_MORPHOLOGY_IN, aSources[0]); - return filter; + return filter.forget(); } case PrimitiveType::Flood: @@ -753,7 +755,7 @@ FilterNodeFromPrimitiveDescription(const FilterPrimitiveDescription& aDescriptio Color color = atts.GetColor(eFloodColor); RefPtr filter = aDT->CreateFilter(FilterType::FLOOD); filter->SetAttribute(ATT_FLOOD_COLOR, color); - return filter; + return filter.forget(); } case PrimitiveType::Tile: @@ -761,7 +763,7 @@ FilterNodeFromPrimitiveDescription(const FilterPrimitiveDescription& aDescriptio RefPtr filter = aDT->CreateFilter(FilterType::TILE); filter->SetAttribute(ATT_TILE_SOURCE_RECT, aSourceRegions[0]); filter->SetInput(IN_TILE_IN, aSources[0]); - return filter; + return filter.forget(); } case PrimitiveType::ComponentTransfer: @@ -789,7 +791,7 @@ FilterNodeFromPrimitiveDescription(const FilterPrimitiveDescription& aDescriptio } } - return lastFilter; + return lastFilter.forget(); } case PrimitiveType::ConvolveMatrix: @@ -820,7 +822,7 @@ FilterNodeFromPrimitiveDescription(const FilterPrimitiveDescription& aDescriptio filter->SetAttribute(ATT_CONVOLVE_MATRIX_PRESERVE_ALPHA, atts.GetBool(eConvolveMatrixPreserveAlpha)); filter->SetInput(IN_CONVOLVE_MATRIX_IN, aSources[0]); - return filter; + return filter.forget(); } case PrimitiveType::Offset: @@ -847,7 +849,7 @@ FilterNodeFromPrimitiveDescription(const FilterPrimitiveDescription& aDescriptio (uint32_t)channel[atts.GetUint(eDisplacementMapYChannel)]); filter->SetInput(IN_DISPLACEMENT_MAP_IN, aSources[0]); filter->SetInput(IN_DISPLACEMENT_MAP_IN2, aSources[1]); - return filter; + return filter.forget(); } case PrimitiveType::Turbulence: @@ -898,7 +900,7 @@ FilterNodeFromPrimitiveDescription(const FilterPrimitiveDescription& aDescriptio filter->SetInput(IN_COMPOSITE_IN_START, aSources[1]); filter->SetInput(IN_COMPOSITE_IN_START + 1, aSources[0]); } - return filter; + return filter.forget(); } case PrimitiveType::Merge: @@ -907,14 +909,15 @@ FilterNodeFromPrimitiveDescription(const FilterPrimitiveDescription& aDescriptio return nullptr; } if (aSources.Length() == 1) { - return aSources[0]; + RefPtr filter(aSources[0]); + return filter.forget(); } RefPtr filter = aDT->CreateFilter(FilterType::COMPOSITE); filter->SetAttribute(ATT_COMPOSITE_OPERATOR, (uint32_t)COMPOSITE_OPERATOR_OVER); for (size_t i = 0; i < aSources.Length(); i++) { filter->SetInput(IN_COMPOSITE_IN_START + i, aSources[i]); } - return filter; + return filter.forget(); } case PrimitiveType::GaussianBlur: @@ -949,7 +952,7 @@ FilterNodeFromPrimitiveDescription(const FilterPrimitiveDescription& aDescriptio filter->SetAttribute(ATT_COMPOSITE_OPERATOR, (uint32_t)COMPOSITE_OPERATOR_OVER); filter->SetInput(IN_COMPOSITE_IN_START, composite); filter->SetInput(IN_COMPOSITE_IN_START + 1, aSources[0]); - return filter; + return filter.forget(); } case PrimitiveType::DiffuseLighting: @@ -1021,7 +1024,7 @@ FilterNodeFromPrimitiveDescription(const FilterPrimitiveDescription& aDescriptio filter->SetInput(IN_LIGHTING_IN, aSources[0]); - return filter; + return filter.forget(); } case PrimitiveType::Image: @@ -1040,7 +1043,7 @@ FilterNodeFromPrimitiveDescription(const FilterPrimitiveDescription& aDescriptio transform->SetInput(IN_TRANSFORM_IN, inputImage); transform->SetAttribute(ATT_TRANSFORM_MATRIX, TM); transform->SetAttribute(ATT_TRANSFORM_FILTER, atts.GetUint(eImageFilter)); - return transform; + return transform.forget(); } case PrimitiveType::ToAlpha: diff --git a/gfx/src/nsRenderingContext.h b/gfx/src/nsRenderingContext.h index 54d0f956ee..4b715668b5 100644 --- a/gfx/src/nsRenderingContext.h +++ b/gfx/src/nsRenderingContext.h @@ -9,7 +9,7 @@ #include "gfxContext.h" #include "mozilla/Attributes.h" #include "nsCOMPtr.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" namespace mozilla { namespace gfx { diff --git a/gfx/tests/gtest/TestCompositor.cpp b/gfx/tests/gtest/TestCompositor.cpp index 5150d9ed93..cd5251a4e1 100644 --- a/gfx/tests/gtest/TestCompositor.cpp +++ b/gfx/tests/gtest/TestCompositor.cpp @@ -125,7 +125,7 @@ static TemporaryRef CreateTestCompositor(LayersBackend backend, Mock abort(); } - return compositor; + return compositor.forget(); } /** @@ -172,10 +172,8 @@ static std::vector GetPlatformBackends() static TemporaryRef CreateDT() { - RefPtr dt = gfxPlatform::GetPlatform()->CreateOffscreenContentDrawTarget( + return gfxPlatform::GetPlatform()->CreateOffscreenContentDrawTarget( IntSize(gCompWidth, gCompHeight), SurfaceFormat::B8G8R8A8); - - return dt; } static bool CompositeAndCompare(nsRefPtr layerManager, DrawTarget* refDT) diff --git a/gfx/tests/gtest/TestVsync.cpp b/gfx/tests/gtest/TestVsync.cpp index c758ee110d..44eae5cf79 100644 --- a/gfx/tests/gtest/TestVsync.cpp +++ b/gfx/tests/gtest/TestVsync.cpp @@ -9,7 +9,7 @@ #include "gfxPrefs.h" #include "MainThreadUtils.h" #include "nsIThread.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "SoftwareVsyncSource.h" #include "VsyncSource.h" #include "mozilla/Monitor.h" diff --git a/gfx/thebes/VsyncSource.h b/gfx/thebes/VsyncSource.h index abbdfbd8bf..08198d2877 100644 --- a/gfx/thebes/VsyncSource.h +++ b/gfx/thebes/VsyncSource.h @@ -7,7 +7,7 @@ #define GFX_VSYNCSOURCE_H #include "nsTArray.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "mozilla/Mutex.h" #include "mozilla/TimeStamp.h" #include "nsISupportsImpl.h" diff --git a/gfx/thebes/gfxContext.cpp b/gfx/thebes/gfxContext.cpp index 6e267f19bf..8a6a2173b0 100644 --- a/gfx/thebes/gfxContext.cpp +++ b/gfx/thebes/gfxContext.cpp @@ -204,7 +204,8 @@ gfxContext::ClosePath() TemporaryRef gfxContext::GetPath() { EnsurePath(); - return mPath; + RefPtr path(mPath); + return path.forget(); } void gfxContext::SetPath(Path* path) @@ -932,7 +933,7 @@ gfxContext::PopGroupToSurface(Matrix* aTransform) deviceOffsetTranslation.PreTranslate(deviceOffset.x, deviceOffset.y); *aTransform = deviceOffsetTranslation * mat; - return src; + return src.forget(); } void diff --git a/gfx/thebes/gfxDWriteFonts.cpp b/gfx/thebes/gfxDWriteFonts.cpp index 9e6549eb94..519a8f98e1 100644 --- a/gfx/thebes/gfxDWriteFonts.cpp +++ b/gfx/thebes/gfxDWriteFonts.cpp @@ -674,7 +674,8 @@ gfxDWriteFont::GetScaledFont(mozilla::gfx::DrawTarget *aTarget) { bool wantCairo = aTarget->GetBackendType() == BackendType::CAIRO; if (mAzureScaledFont && mAzureScaledFontIsCairo == wantCairo) { - return mAzureScaledFont; + RefPtr scaledFont(mAzureScaledFont); + return scaledFont.forget(); } NativeFont nativeFont; @@ -692,5 +693,6 @@ gfxDWriteFont::GetScaledFont(mozilla::gfx::DrawTarget *aTarget) mAzureScaledFontIsCairo = wantCairo; - return mAzureScaledFont; + RefPtr scaledFont(mAzureScaledFont); + return scaledFont.forget(); } diff --git a/gfx/thebes/gfxMacFont.cpp b/gfx/thebes/gfxMacFont.cpp index aa7e71fc66..3163960fc4 100644 --- a/gfx/thebes/gfxMacFont.cpp +++ b/gfx/thebes/gfxMacFont.cpp @@ -437,7 +437,8 @@ gfxMacFont::GetScaledFont(DrawTarget *aTarget) mAzureScaledFont = mozilla::gfx::Factory::CreateScaledFontWithCairo(nativeFont, GetAdjustedSize(), mScaledFont); } - return mAzureScaledFont; + RefPtr scaledFont(mAzureScaledFont); + return scaledFont.forget(); } TemporaryRef diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 3762f5fb90..c5faf93b90 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -809,7 +809,8 @@ gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurfa SourceSurfaceUserData *surf = static_cast(userData); if (surf->mSrcSurface->IsValid() && surf->mBackendType == aTarget->GetBackendType()) { - return surf->mSrcSurface; + RefPtr srcSurface(surf->mSrcSurface); + return srcSurface.forget(); } // We can just continue here as when setting new user data the destroy // function will be called for the old user data. @@ -972,10 +973,8 @@ gfxPlatform::GetScaledFontForFont(DrawTarget* aTarget, gfxFont *aFont) NativeFont nativeFont; nativeFont.mType = NativeFontType::CAIRO_FONT_FACE; nativeFont.mFont = aFont->GetCairoScaledFont(); - RefPtr scaledFont = - Factory::CreateScaledFontForNativeFont(nativeFont, - aFont->GetAdjustedSize()); - return scaledFont; + return Factory::CreateScaledFontForNativeFont(nativeFont, + aFont->GetAdjustedSize()); } int diff --git a/gfx/thebes/gfxUtils.cpp b/gfx/thebes/gfxUtils.cpp index 709ddea371..a4015ea373 100644 --- a/gfx/thebes/gfxUtils.cpp +++ b/gfx/thebes/gfxUtils.cpp @@ -330,7 +330,8 @@ gfxUtils::CreatePremultipliedDataSurface(DataSourceSurface* srcSurf) DataSourceSurface::MappedSurface destMap; if (!MapSrcAndCreateMappedDest(srcSurf, &destSurf, &srcMap, &destMap)) { MOZ_ASSERT(false, "MapSrcAndCreateMappedDest failed."); - return srcSurf; + RefPtr surface(srcSurf); + return surface.forget(); } PremultiplyData(srcMap.mData, srcMap.mStride, @@ -339,7 +340,7 @@ gfxUtils::CreatePremultipliedDataSurface(DataSourceSurface* srcSurf) srcSurf->GetSize().height); UnmapSrcDest(srcSurf, destSurf); - return destSurf; + return destSurf.forget(); } TemporaryRef @@ -350,7 +351,8 @@ gfxUtils::CreateUnpremultipliedDataSurface(DataSourceSurface* srcSurf) DataSourceSurface::MappedSurface destMap; if (!MapSrcAndCreateMappedDest(srcSurf, &destSurf, &srcMap, &destMap)) { MOZ_ASSERT(false, "MapSrcAndCreateMappedDest failed."); - return srcSurf; + RefPtr surface(srcSurf); + return surface.forget(); } UnpremultiplyData(srcMap.mData, srcMap.mStride, @@ -359,7 +361,7 @@ gfxUtils::CreateUnpremultipliedDataSurface(DataSourceSurface* srcSurf) srcSurf->GetSize().height); UnmapSrcDest(srcSurf, destSurf); - return destSurf; + return destSurf.forget(); } void @@ -717,8 +719,7 @@ PathFromRegionInternal(DrawTarget* aTarget, const nsIntRegion& aRegion) pb->LineTo(Point(r->x, r->YMost())); pb->Close(); } - RefPtr path = pb->Finish(); - return path; + return pb->Finish(); } static void diff --git a/gfx/thebes/gfxVR.h b/gfx/thebes/gfxVR.h index e14fc0de7c..ee78a0e5de 100644 --- a/gfx/thebes/gfxVR.h +++ b/gfx/thebes/gfxVR.h @@ -9,7 +9,7 @@ #include "nsTArray.h" #include "nsIScreen.h" #include "nsCOMPtr.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "mozilla/gfx/2D.h" #include "mozilla/EnumeratedArray.h" diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index 1ef8432c95..bcf90ad5c2 100644 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -1572,6 +1572,19 @@ gfxWindowsPlatform::GetD3D11ContentDevice() return mD3D11ContentDevice; } +ID3D11Device* +gfxWindowsPlatform::GetD3D11MediaDevice() +{ + if (mD3D11DeviceInitialized) { + return mD3D11MediaDevice; + } + + InitD3D11Devices(); + + return mD3D11MediaDevice; +} + + ReadbackManagerD3D11* gfxWindowsPlatform::GetReadbackManager() { @@ -1945,11 +1958,82 @@ gfxWindowsPlatform::InitD3D11Devices() Factory::SetDirect3D11Device(mD3D11ContentDevice); } + if (!useWARP || gfxPrefs::LayersD3D11ForceWARP()) { + hr = E_INVALIDARG; + MOZ_SEH_TRY{ + hr = d3d11CreateDevice(adapter, useWARP ? D3D_DRIVER_TYPE_WARP : D3D_DRIVER_TYPE_UNKNOWN, nullptr, + D3D11_CREATE_DEVICE_BGRA_SUPPORT, + featureLevels.Elements(), featureLevels.Length(), + D3D11_SDK_VERSION, byRef(mD3D11MediaDevice), nullptr, nullptr); + } MOZ_SEH_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { + mD3D11MediaDevice = nullptr; + } + + if (FAILED(hr)) { + d3d11Module.disown(); + return; + } + + mD3D11MediaDevice->SetExceptionMode(0); + } + // We leak these everywhere and we need them our entire runtime anyway, let's // leak it here as well. d3d11Module.disown(); } +TemporaryRef +gfxWindowsPlatform::CreateD3D11DecoderDevice() +{ + nsModuleHandle d3d11Module(LoadLibrarySystem32(L"d3d11.dll")); + decltype(D3D11CreateDevice)* d3d11CreateDevice = (decltype(D3D11CreateDevice)*) + GetProcAddress(d3d11Module, "D3D11CreateDevice"); + + if (!d3d11CreateDevice) { + // We should just be on Windows Vista or XP in this case. + return nullptr; + } + + nsTArray featureLevels; + if (IsWin8OrLater()) { + featureLevels.AppendElement(D3D_FEATURE_LEVEL_11_1); + } + featureLevels.AppendElement(D3D_FEATURE_LEVEL_11_0); + featureLevels.AppendElement(D3D_FEATURE_LEVEL_10_1); + featureLevels.AppendElement(D3D_FEATURE_LEVEL_10_0); + featureLevels.AppendElement(D3D_FEATURE_LEVEL_9_3); + + RefPtr adapter = GetDXGIAdapter(); + + if (!adapter) { + return nullptr; + } + + HRESULT hr = E_INVALIDARG; + + RefPtr device; + + MOZ_SEH_TRY{ + hr = d3d11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr, + D3D11_CREATE_DEVICE_VIDEO_SUPPORT, + featureLevels.Elements(), featureLevels.Length(), + D3D11_SDK_VERSION, byRef(device), nullptr, nullptr); + } MOZ_SEH_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { + return nullptr; + } + + if (FAILED(hr) || !DoesD3D11DeviceWork(device)) { + return nullptr; + } + + nsRefPtr multi; + device->QueryInterface(__uuidof(ID3D10Multithread), getter_AddRefs(multi)); + + multi->SetMultithreadProtected(TRUE); + + return device.forget(); +} + static bool DwmCompositionEnabled() { diff --git a/gfx/thebes/gfxWindowsPlatform.h b/gfx/thebes/gfxWindowsPlatform.h index 5635b10245..404ed372c1 100644 --- a/gfx/thebes/gfxWindowsPlatform.h +++ b/gfx/thebes/gfxWindowsPlatform.h @@ -246,6 +246,10 @@ public: #endif ID3D11Device *GetD3D11Device(); ID3D11Device *GetD3D11ContentDevice(); + ID3D11Device *GetD3D11MediaDevice(); + + // Create a D3D11 device to be used for DXVA decoding. + mozilla::TemporaryRef CreateD3D11DecoderDevice(); mozilla::layers::ReadbackManagerD3D11* GetReadbackManager(); @@ -286,6 +290,7 @@ private: nsRefPtr mDeviceManager; mozilla::RefPtr mD3D11Device; mozilla::RefPtr mD3D11ContentDevice; + mozilla::RefPtr mD3D11MediaDevice; bool mD3D11DeviceInitialized; mozilla::RefPtr mD3D11ReadbackManager; bool mIsWARP; diff --git a/image/src/BMPFileHeaders.h b/image/BMPFileHeaders.h similarity index 97% rename from image/src/BMPFileHeaders.h rename to image/BMPFileHeaders.h index 2d5fd96988..8045fe1676 100644 --- a/image/src/BMPFileHeaders.h +++ b/image/BMPFileHeaders.h @@ -2,8 +2,8 @@ * 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_IMAGELIB_BMPHEADERS_H_ -#define MOZILLA_IMAGELIB_BMPHEADERS_H_ +#ifndef mozilla_image_BMPFileHeaders_h +#define mozilla_image_BMPFileHeaders_h namespace mozilla { namespace image { @@ -135,4 +135,4 @@ enum ERLEState { eRLEStateAbsoluteModePadded ///< As above, but another byte of data has to be read as padding }; -#endif +#endif // mozilla_image_BMPFileHeaders_h diff --git a/image/src/ClippedImage.cpp b/image/ClippedImage.cpp similarity index 99% rename from image/src/ClippedImage.cpp rename to image/ClippedImage.cpp index 53b3e217ee..57195b9acf 100644 --- a/image/src/ClippedImage.cpp +++ b/image/ClippedImage.cpp @@ -61,7 +61,8 @@ public: } TemporaryRef Surface() { - return mSurface; + RefPtr surf(mSurface); + return surf.forget(); } private: diff --git a/image/src/ClippedImage.h b/image/ClippedImage.h similarity index 96% rename from image/src/ClippedImage.h rename to image/ClippedImage.h index de5a18f961..76ff57da00 100644 --- a/image/src/ClippedImage.h +++ b/image/ClippedImage.h @@ -3,8 +3,8 @@ * 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_IMAGELIB_CLIPPEDIMAGE_H_ -#define MOZILLA_IMAGELIB_CLIPPEDIMAGE_H_ +#ifndef mozilla_image_ClippedImage_h +#define mozilla_image_ClippedImage_h #include "ImageWrapper.h" #include "mozilla/gfx/2D.h" @@ -87,4 +87,4 @@ private: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_CLIPPEDIMAGE_H_ +#endif // mozilla_image_ClippedImage_h diff --git a/image/src/DecodePool.cpp b/image/DecodePool.cpp similarity index 100% rename from image/src/DecodePool.cpp rename to image/DecodePool.cpp diff --git a/image/src/DecodePool.h b/image/DecodePool.h similarity index 96% rename from image/src/DecodePool.h rename to image/DecodePool.h index 2261d6d800..64954682d2 100644 --- a/image/src/DecodePool.h +++ b/image/DecodePool.h @@ -7,8 +7,8 @@ * DecodePool manages the threads used for decoding raster images. */ -#ifndef MOZILLA_IMAGELIB_DECODEPOOL_H_ -#define MOZILLA_IMAGELIB_DECODEPOOL_H_ +#ifndef mozilla_image_DecodePool_h +#define mozilla_image_DecodePool_h #include "mozilla/Mutex.h" #include "mozilla/StaticPtr.h" @@ -112,4 +112,4 @@ private: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_DECODEPOOL_H_ +#endif // mozilla_image_DecodePool_h diff --git a/image/src/Decoder.cpp b/image/Decoder.cpp similarity index 100% rename from image/src/Decoder.cpp rename to image/Decoder.cpp diff --git a/image/src/Decoder.h b/image/Decoder.h similarity index 99% rename from image/src/Decoder.h rename to image/Decoder.h index 42c56f201f..d7aa1ad862 100644 --- a/image/src/Decoder.h +++ b/image/Decoder.h @@ -3,8 +3,8 @@ * 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_IMAGELIB_DECODER_H_ -#define MOZILLA_IMAGELIB_DECODER_H_ +#ifndef mozilla_image_Decoder_h +#define mozilla_image_Decoder_h #include "FrameAnimator.h" #include "RasterImage.h" @@ -498,4 +498,4 @@ private: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_DECODER_H_ +#endif // mozilla_image_Decoder_h diff --git a/image/Downscaler.cpp b/image/Downscaler.cpp index a94588fdce..e511f3ca6c 100644 --- a/image/Downscaler.cpp +++ b/image/Downscaler.cpp @@ -10,9 +10,8 @@ #include #include "gfxPrefs.h" #include "image_operations.h" -#include "mozilla/SSE.h" #include "convolver.h" -#include "skia/include/core/SkTypes.h" +#include "skia/SkTypes.h" using std::max; using std::swap; @@ -27,7 +26,6 @@ Downscaler::Downscaler(const nsIntSize& aTargetSize) , mYFilter(MakeUnique()) , mWindowCapacity(0) , mHasAlpha(true) - , mFlipVertically(false) { MOZ_ASSERT(gfxPrefs::ImageDownscaleDuringDecodeEnabled(), "Downscaling even though downscale-during-decode is disabled?"); @@ -57,10 +55,8 @@ Downscaler::ReleaseWindow() nsresult Downscaler::BeginFrame(const nsIntSize& aOriginalSize, - const Maybe& aFrameRect, uint8_t* aOutputBuffer, - bool aHasAlpha, - bool aFlipVertically /* = false */) + bool aHasAlpha) { MOZ_ASSERT(aOutputBuffer); MOZ_ASSERT(mTargetSize != aOriginalSize, @@ -72,24 +68,11 @@ Downscaler::BeginFrame(const nsIntSize& aOriginalSize, MOZ_ASSERT(aOriginalSize.width > 0 && aOriginalSize.height > 0, "Invalid original size"); - mFrameRect = aFrameRect.valueOr(nsIntRect(nsIntPoint(), aOriginalSize)); - MOZ_ASSERT(mFrameRect.x >= 0 && mFrameRect.y >= 0 && - mFrameRect.width >= 0 && mFrameRect.height >= 0, - "Frame rect must have non-negative components"); - MOZ_ASSERT(nsIntRect(0, 0, aOriginalSize.width, aOriginalSize.height) - .Contains(mFrameRect), - "Frame rect must fit inside image"); - MOZ_ASSERT_IF(!nsIntRect(0, 0, aOriginalSize.width, aOriginalSize.height) - .IsEqualEdges(mFrameRect), - aHasAlpha); - mOriginalSize = aOriginalSize; - mScale = gfxSize(double(mOriginalSize.width) / mTargetSize.width, - double(mOriginalSize.height) / mTargetSize.height); mOutputBuffer = aOutputBuffer; mHasAlpha = aHasAlpha; - mFlipVertically = aFlipVertically; + ResetForNextProgressivePass(); ReleaseWindow(); auto resizeMethod = skia::ImageOperations::RESIZE_LANCZOS3; @@ -99,25 +82,14 @@ Downscaler::BeginFrame(const nsIntSize& aOriginalSize, 0, mTargetSize.width, mXFilter.get()); - if (mXFilter->max_filter() <= 0 || mXFilter->num_values() != mTargetSize.width) { - NS_WARNING("Failed to compute filters for image downscaling"); - return NS_ERROR_OUT_OF_MEMORY; - } - skia::resize::ComputeFilters(resizeMethod, mOriginalSize.height, mTargetSize.height, 0, mTargetSize.height, mYFilter.get()); - if (mYFilter->max_filter() <= 0 || mYFilter->num_values() != mTargetSize.height) { - NS_WARNING("Failed to compute filters for image downscaling"); - return NS_ERROR_OUT_OF_MEMORY; - } - // Allocate the buffer, which contains scanlines of the original image. - // pad by 15 to handle overreads by the simd code - size_t bufferLen = mOriginalSize.width * sizeof(uint32_t) + 15; - mRowBuffer.reset(new (fallible) uint8_t[bufferLen]); + size_t bufferLen = mOriginalSize.width * sizeof(uint32_t); + mRowBuffer = MakeUnique(bufferLen); if (MOZ_UNLIKELY(!mRowBuffer)) { return NS_ERROR_OUT_OF_MEMORY; } @@ -125,20 +97,20 @@ Downscaler::BeginFrame(const nsIntSize& aOriginalSize, // Zero buffer to keep valgrind happy. memset(mRowBuffer.get(), 0, bufferLen); + // Allocate the window, which contains horizontally downscaled scanlines. (We // can store scanlines which are already downscale because our downscaling // filter is separable.) mWindowCapacity = mYFilter->max_filter(); - mWindow.reset(new (fallible) uint8_t*[mWindowCapacity]); + mWindow = MakeUnique(mWindowCapacity); if (MOZ_UNLIKELY(!mWindow)) { return NS_ERROR_OUT_OF_MEMORY; } bool anyAllocationFailed = false; - // pad by 15 to handle overreads by the simd code - const int rowSize = mTargetSize.width * sizeof(uint32_t) + 15; + const int rowSize = mTargetSize.width * sizeof(uint32_t); for (int32_t i = 0; i < mWindowCapacity; ++i) { - mWindow[i] = new (fallible) uint8_t[rowSize]; + mWindow[i] = new uint8_t[rowSize]; anyAllocationFailed = anyAllocationFailed || mWindow[i] == nullptr; } @@ -149,22 +121,9 @@ Downscaler::BeginFrame(const nsIntSize& aOriginalSize, return NS_ERROR_OUT_OF_MEMORY; } - ResetForNextProgressivePass(); - return NS_OK; } -void -Downscaler::SkipToRow(int32_t aRow) -{ - if (mCurrentInLine < aRow) { - ClearRow(); - do { - CommitRow(); - } while (mCurrentInLine < aRow); - } -} - void Downscaler::ResetForNextProgressivePass() { @@ -172,14 +131,6 @@ Downscaler::ResetForNextProgressivePass() mCurrentOutLine = 0; mCurrentInLine = 0; mLinesInBuffer = 0; - - if (mFrameRect.IsEmpty()) { - // Our frame rect is zero size; commit rows until the end of the image. - SkipToRow(mOriginalSize.height - 1); - } else { - // If we have a vertical offset, commit rows to shift us past it. - SkipToRow(mFrameRect.y); - } } static void @@ -194,16 +145,6 @@ GetFilterOffsetAndLength(UniquePtr& aFilter, aFilterLengthOut); } -void -Downscaler::ClearRow(uint32_t aStartingAtCol) -{ - MOZ_ASSERT(int64_t(mOriginalSize.width) > int64_t(aStartingAtCol)); - uint32_t bytesToClear = (mOriginalSize.width - aStartingAtCol) - * sizeof(uint32_t); - memset(mRowBuffer.get() + (aStartingAtCol * sizeof(uint32_t)), - 0, bytesToClear); -} - void Downscaler::CommitRow() { @@ -219,16 +160,15 @@ Downscaler::CommitRow() int32_t inLineToRead = filterOffset + mLinesInBuffer; MOZ_ASSERT(mCurrentInLine <= inLineToRead, "Reading past end of input"); if (mCurrentInLine == inLineToRead) { - MOZ_RELEASE_ASSERT(mLinesInBuffer < mWindowCapacity, "Need more rows than capacity!"); skia::ConvolveHorizontally(mRowBuffer.get(), *mXFilter, mWindow[mLinesInBuffer++], mHasAlpha, - supports_sse2()); + /* use_sse2 = */ true); } MOZ_ASSERT(mCurrentOutLine < mTargetSize.height, "Writing past end of output"); - while (mLinesInBuffer >= filterLength) { + while (mLinesInBuffer == filterLength) { DownscaleInputLine(); if (mCurrentOutLine == mTargetSize.height) { @@ -241,12 +181,6 @@ Downscaler::CommitRow() } mCurrentInLine += 1; - - // If we're at the end of the part of the original image that has data, commit - // rows to shift us to the end. - if (mCurrentInLine == (mFrameRect.y + mFrameRect.height)) { - SkipToRow(mOriginalSize.height - 1); - } } bool @@ -255,34 +189,17 @@ Downscaler::HasInvalidation() const return mCurrentOutLine > mPrevInvalidatedLine; } -DownscalerInvalidRect +nsIntRect Downscaler::TakeInvalidRect() { if (MOZ_UNLIKELY(!HasInvalidation())) { - return DownscalerInvalidRect(); - } - - DownscalerInvalidRect invalidRect; - - // Compute the target size invalid rect. - if (mFlipVertically) { - // We need to flip it. This will implicitly flip the original size invalid - // rect, since we compute it by scaling this rect. - invalidRect.mTargetSizeRect = - IntRect(0, mTargetSize.height - mCurrentOutLine, - mTargetSize.width, mCurrentOutLine - mPrevInvalidatedLine); - } else { - invalidRect.mTargetSizeRect = - IntRect(0, mPrevInvalidatedLine, - mTargetSize.width, mCurrentOutLine - mPrevInvalidatedLine); + return nsIntRect(); } + nsIntRect invalidRect(0, mPrevInvalidatedLine, + mTargetSize.width, + mCurrentOutLine - mPrevInvalidatedLine); mPrevInvalidatedLine = mCurrentOutLine; - - // Compute the original size invalid rect. - invalidRect.mOriginalSizeRect = invalidRect.mTargetSizeRect; - invalidRect.mOriginalSizeRect.ScaleRoundOut(mScale.width, mScale.height); - return invalidRect; } @@ -292,8 +209,7 @@ Downscaler::DownscaleInputLine() typedef skia::ConvolutionFilter1D::Fixed FilterValue; MOZ_ASSERT(mOutputBuffer); - MOZ_ASSERT(mCurrentOutLine < mTargetSize.height, - "Writing past end of output"); + MOZ_ASSERT(mCurrentOutLine < mTargetSize.height, "Writing past end of output"); int32_t filterOffset = 0; int32_t filterLength = 0; @@ -301,16 +217,11 @@ Downscaler::DownscaleInputLine() auto filterValues = mYFilter->FilterForValue(mCurrentOutLine, &filterOffset, &filterLength); - int32_t currentOutLine = mFlipVertically - ? mTargetSize.height - (mCurrentOutLine + 1) - : mCurrentOutLine; - MOZ_ASSERT(currentOutLine >= 0); - uint8_t* outputLine = - &mOutputBuffer[currentOutLine * mTargetSize.width * sizeof(uint32_t)]; + &mOutputBuffer[mCurrentOutLine * mTargetSize.width * sizeof(uint32_t)]; skia::ConvolveVertically(static_cast(filterValues), filterLength, mWindow.get(), mXFilter->num_values(), - outputLine, mHasAlpha, supports_sse2()); + outputLine, mHasAlpha, /* use_sse2 = */ true); mCurrentOutLine += 1; @@ -329,18 +240,11 @@ Downscaler::DownscaleInputLine() // Shift the buffer. We're just moving pointers here, so this is cheap. mLinesInBuffer -= diff; - mLinesInBuffer = min(max(mLinesInBuffer, 0), mWindowCapacity); - - // If we already have enough rows to satisfy the filter, there is no need - // to swap as we won't be writing more before the next convolution. - if (filterLength > mLinesInBuffer) { - for (int32_t i = 0; i < mLinesInBuffer; ++i) { - swap(mWindow[i], mWindow[filterLength - mLinesInBuffer + i]); - } + mLinesInBuffer = max(mLinesInBuffer, 0); + for (int32_t i = 0; i < mLinesInBuffer; ++i) { + swap(mWindow[i], mWindow[filterLength - mLinesInBuffer + i]); } } - - } // namespace image } // namespace mozilla diff --git a/image/src/Downscaler.h b/image/Downscaler.h similarity index 97% rename from image/src/Downscaler.h rename to image/Downscaler.h index 13d54948e8..95f321cb1d 100644 --- a/image/src/Downscaler.h +++ b/image/Downscaler.h @@ -9,8 +9,8 @@ * scaling implementation. */ -#ifndef MOZILLA_IMAGELIB_DOWNSCALER_H_ -#define MOZILLA_IMAGELIB_DOWNSCALER_H_ +#ifndef mozilla_image_Downscaler_h +#define mozilla_image_Downscaler_h #include "mozilla/UniquePtr.h" #include "nsRect.h" @@ -151,4 +151,4 @@ public: #endif -#endif // MOZILLA_IMAGELIB_DOWNSCALER_H_ +#endif // mozilla_image_Downscaler_h diff --git a/image/src/DynamicImage.cpp b/image/DynamicImage.cpp similarity index 100% rename from image/src/DynamicImage.cpp rename to image/DynamicImage.cpp diff --git a/image/src/DynamicImage.h b/image/DynamicImage.h similarity index 95% rename from image/src/DynamicImage.h rename to image/DynamicImage.h index 4a24f09bc1..98ca88c922 100644 --- a/image/src/DynamicImage.h +++ b/image/DynamicImage.h @@ -3,8 +3,8 @@ * 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_IMAGELIB_DYNAMICIMAGE_H_ -#define MOZILLA_IMAGELIB_DYNAMICIMAGE_H_ +#ifndef mozilla_image_DynamicImage_h +#define mozilla_image_DynamicImage_h #include "mozilla/MemoryReporting.h" #include "gfxDrawable.h" @@ -74,4 +74,4 @@ private: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_DYNAMICIMAGE_H_ +#endif // mozilla_image_DynamicImage_h diff --git a/image/src/FrameAnimator.cpp b/image/FrameAnimator.cpp similarity index 100% rename from image/src/FrameAnimator.cpp rename to image/FrameAnimator.cpp diff --git a/image/src/FrameAnimator.h b/image/FrameAnimator.h similarity index 98% rename from image/src/FrameAnimator.h rename to image/FrameAnimator.h index b918082f03..9447831aa4 100644 --- a/image/src/FrameAnimator.h +++ b/image/FrameAnimator.h @@ -4,8 +4,8 @@ * 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_image_src_FrameAnimator_h -#define mozilla_image_src_FrameAnimator_h +#ifndef mozilla_image_FrameAnimator_h +#define mozilla_image_FrameAnimator_h #include "mozilla/MemoryReporting.h" #include "mozilla/TimeStamp.h" @@ -281,4 +281,4 @@ private: // data } // namespace image } // namespace mozilla -#endif // mozilla_image_src_FrameAnimator_h +#endif // mozilla_image_FrameAnimator_h diff --git a/image/src/FrozenImage.cpp b/image/FrozenImage.cpp similarity index 100% rename from image/src/FrozenImage.cpp rename to image/FrozenImage.cpp diff --git a/image/src/FrozenImage.h b/image/FrozenImage.h similarity index 95% rename from image/src/FrozenImage.h rename to image/FrozenImage.h index c0e52177d3..4e7ae769ec 100644 --- a/image/src/FrozenImage.h +++ b/image/FrozenImage.h @@ -3,8 +3,8 @@ * 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_IMAGELIB_FROZENIMAGE_H_ -#define MOZILLA_IMAGELIB_FROZENIMAGE_H_ +#ifndef mozilla_image_FrozenImage_h +#define mozilla_image_FrozenImage_h #include "ImageWrapper.h" #include "mozilla/gfx/2D.h" @@ -63,4 +63,4 @@ private: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_FROZENIMAGE_H_ +#endif // mozilla_image_FrozenImage_h diff --git a/image/src/ICOFileHeaders.h b/image/ICOFileHeaders.h similarity index 94% rename from image/src/ICOFileHeaders.h rename to image/ICOFileHeaders.h index fb48d17308..f3df846506 100644 --- a/image/src/ICOFileHeaders.h +++ b/image/ICOFileHeaders.h @@ -3,8 +3,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef MOZILLA_IMAGELIB_ICOHEADERS_H_ -#define MOZILLA_IMAGELIB_ICOHEADERS_H_ +#ifndef mozilla_image_ICOFileHeaders_h +#define mozilla_image_ICOFileHeaders_h namespace mozilla { namespace image { @@ -78,4 +78,4 @@ namespace mozilla { } // namespace image } // namespace mozilla -#endif +#endif // mozilla_image_ICOFileHeaders_h diff --git a/image/src/IProgressObserver.h b/image/IProgressObserver.h similarity index 93% rename from image/src/IProgressObserver.h rename to image/IProgressObserver.h index cb8be0c798..752acfce9e 100644 --- a/image/src/IProgressObserver.h +++ b/image/IProgressObserver.h @@ -3,8 +3,8 @@ * 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_IMAGELIB_PROGRESSOBSERVER_H_ -#define MOZILLA_IMAGELIB_PROGRESSOBSERVER_H_ +#ifndef mozilla_image_IProgressObserver_h +#define mozilla_image_IProgressObserver_h #include "mozilla/WeakPtr.h" #include "nsISupports.h" @@ -56,4 +56,4 @@ protected: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_PROGRESSOBSERVER_H_ +#endif // mozilla_image_IProgressObserver_h diff --git a/image/src/Image.cpp b/image/Image.cpp similarity index 100% rename from image/src/Image.cpp rename to image/Image.cpp diff --git a/image/src/Image.h b/image/Image.h similarity index 98% rename from image/src/Image.h rename to image/Image.h index a147517e3a..0e9223c1bf 100644 --- a/image/src/Image.h +++ b/image/Image.h @@ -3,8 +3,8 @@ * 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_IMAGELIB_IMAGE_H_ -#define MOZILLA_IMAGELIB_IMAGE_H_ +#ifndef mozilla_image_Image_h +#define mozilla_image_Image_h #include "mozilla/MemoryReporting.h" #include "mozilla/TimeStamp.h" @@ -242,4 +242,4 @@ protected: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_IMAGE_H_ +#endif // mozilla_image_Image_h diff --git a/image/src/ImageFactory.cpp b/image/ImageFactory.cpp similarity index 100% rename from image/src/ImageFactory.cpp rename to image/ImageFactory.cpp diff --git a/image/src/ImageFactory.h b/image/ImageFactory.h similarity index 95% rename from image/src/ImageFactory.h rename to image/ImageFactory.h index 6e5603d789..25e15c29e6 100644 --- a/image/src/ImageFactory.h +++ b/image/ImageFactory.h @@ -4,8 +4,8 @@ * 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_IMAGELIB_IMAGEFACTORY_H_ -#define MOZILLA_IMAGELIB_IMAGEFACTORY_H_ +#ifndef mozilla_image_ImageFactory_h +#define mozilla_image_ImageFactory_h #include "nsCOMPtr.h" #include "nsProxyRelease.h" @@ -79,4 +79,4 @@ private: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_IMAGEFACTORY_H_ +#endif // mozilla_image_ImageFactory_h diff --git a/image/public/ImageLogging.h b/image/ImageLogging.h similarity index 97% rename from image/public/ImageLogging.h rename to image/ImageLogging.h index a3003a1511..069aca9faf 100644 --- a/image/public/ImageLogging.h +++ b/image/ImageLogging.h @@ -4,8 +4,8 @@ * 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 ImageLogging_h -#define ImageLogging_h +#ifndef mozilla_image_ImageLogging_h +#define mozilla_image_ImageLogging_h #include "prlog.h" #include "prinrval.h" @@ -174,4 +174,4 @@ public: #define LOG_MSG_WITH_PARAM LOG_FUNC_WITH_PARAM -#endif // ifndef ImageLogging_h +#endif // mozilla_image_ImageLogging_h diff --git a/image/src/ImageMetadata.cpp b/image/ImageMetadata.cpp similarity index 100% rename from image/src/ImageMetadata.cpp rename to image/ImageMetadata.cpp diff --git a/image/src/ImageMetadata.h b/image/ImageMetadata.h similarity index 93% rename from image/src/ImageMetadata.h rename to image/ImageMetadata.h index b57dadaa4c..8888570d0f 100644 --- a/image/src/ImageMetadata.h +++ b/image/ImageMetadata.h @@ -4,8 +4,8 @@ * 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 ImageMetadata_h___ -#define ImageMetadata_h___ +#ifndef mozilla_image_ImageMetadata_h +#define mozilla_image_ImageMetadata_h #include #include "mozilla/Maybe.h" @@ -71,4 +71,4 @@ private: } // namespace image } // namespace mozilla -#endif // ImageMetadata_h___ +#endif // mozilla_image_ImageMetadata_h diff --git a/image/src/ImageOps.cpp b/image/ImageOps.cpp similarity index 100% rename from image/src/ImageOps.cpp rename to image/ImageOps.cpp diff --git a/image/src/ImageOps.h b/image/ImageOps.h similarity index 94% rename from image/src/ImageOps.h rename to image/ImageOps.h index f2efbdf1fa..36e6bd3f49 100644 --- a/image/src/ImageOps.h +++ b/image/ImageOps.h @@ -4,8 +4,8 @@ * 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_IMAGELIB_IMAGEOPS_H_ -#define MOZILLA_IMAGELIB_IMAGEOPS_H_ +#ifndef mozilla_image_ImageOps_h +#define mozilla_image_ImageOps_h #include "nsCOMPtr.h" @@ -69,4 +69,4 @@ private: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_IMAGEOPS_H_ +#endif // mozilla_image_ImageOps_h diff --git a/image/src/ImageRegion.h b/image/ImageRegion.h similarity index 97% rename from image/src/ImageRegion.h rename to image/ImageRegion.h index c66d0e1f85..d9b3b9e1c5 100644 --- a/image/src/ImageRegion.h +++ b/image/ImageRegion.h @@ -3,8 +3,8 @@ * 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_IMAGELIB_IMAGE_REGION_H_ -#define MOZILLA_IMAGELIB_IMAGE_REGION_H_ +#ifndef mozilla_image_ImageRegion_h +#define mozilla_image_ImageRegion_h #include "gfxRect.h" @@ -155,4 +155,4 @@ private: } // namespace image } // namespace mozilla -#endif +#endif // mozilla_image_ImageRegion_h diff --git a/image/src/ImageURL.h b/image/ImageURL.h similarity index 95% rename from image/src/ImageURL.h rename to image/ImageURL.h index 9a5049f252..8aa65fc1f2 100644 --- a/image/src/ImageURL.h +++ b/image/ImageURL.h @@ -3,8 +3,8 @@ * 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_IMAGELIB_IMAGEURL_H_ -#define MOZILLA_IMAGELIB_IMAGEURL_H_ +#ifndef mozilla_image_ImageURL_h +#define mozilla_image_ImageURL_h #include "nsIURI.h" #include "MainThreadUtils.h" @@ -90,4 +90,4 @@ private: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_IMAGEURL_H_ +#endif // mozilla_image_ImageURL_h diff --git a/image/src/ImageWrapper.cpp b/image/ImageWrapper.cpp similarity index 100% rename from image/src/ImageWrapper.cpp rename to image/ImageWrapper.cpp diff --git a/image/src/ImageWrapper.h b/image/ImageWrapper.h similarity index 95% rename from image/src/ImageWrapper.h rename to image/ImageWrapper.h index 78dd0b883a..5a5cf84fd6 100644 --- a/image/src/ImageWrapper.h +++ b/image/ImageWrapper.h @@ -3,8 +3,8 @@ * 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_IMAGELIB_IMAGEWRAPPER_H_ -#define MOZILLA_IMAGELIB_IMAGEWRAPPER_H_ +#ifndef mozilla_image_ImageWrapper_h +#define mozilla_image_ImageWrapper_h #include "mozilla/MemoryReporting.h" #include "Image.h" @@ -86,4 +86,4 @@ private: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_IMAGEWRAPPER_H_ +#endif // mozilla_image_ImageWrapper_h diff --git a/image/src/MultipartImage.cpp b/image/MultipartImage.cpp similarity index 100% rename from image/src/MultipartImage.cpp rename to image/MultipartImage.cpp diff --git a/image/src/MultipartImage.h b/image/MultipartImage.h similarity index 95% rename from image/src/MultipartImage.h rename to image/MultipartImage.h index 1b1b8c6c47..6e8bbc347b 100644 --- a/image/src/MultipartImage.h +++ b/image/MultipartImage.h @@ -3,8 +3,8 @@ * 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_IMAGELIB_MULTIPARTIMAGE_H_ -#define MOZILLA_IMAGELIB_MULTIPARTIMAGE_H_ +#ifndef mozilla_image_MultipartImage_h +#define mozilla_image_MultipartImage_h #include "ImageWrapper.h" #include "IProgressObserver.h" @@ -87,4 +87,4 @@ private: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_MULTIPARTIMAGE_H_ +#endif // mozilla_image_MultipartImage_h diff --git a/image/src/Orientation.h b/image/Orientation.h similarity index 92% rename from image/src/Orientation.h rename to image/Orientation.h index b66912337b..f18ced8542 100644 --- a/image/src/Orientation.h +++ b/image/Orientation.h @@ -3,8 +3,8 @@ * 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_IMAGELIB_ORIENTATION_H_ -#define MOZILLA_IMAGELIB_ORIENTATION_H_ +#ifndef mozilla_image_Orientation_h +#define mozilla_image_Orientation_h #include @@ -59,4 +59,4 @@ struct Orientation } } -#endif +#endif // mozilla_image_Orientation_h diff --git a/image/src/OrientedImage.cpp b/image/OrientedImage.cpp similarity index 100% rename from image/src/OrientedImage.cpp rename to image/OrientedImage.cpp diff --git a/image/src/OrientedImage.h b/image/OrientedImage.h similarity index 94% rename from image/src/OrientedImage.h rename to image/OrientedImage.h index d5b266f751..ac739884d3 100644 --- a/image/src/OrientedImage.h +++ b/image/OrientedImage.h @@ -3,8 +3,8 @@ * 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_IMAGELIB_ORIENTEDIMAGE_H_ -#define MOZILLA_IMAGELIB_ORIENTEDIMAGE_H_ +#ifndef mozilla_image_OrientedImage_h +#define mozilla_image_OrientedImage_h #include "ImageWrapper.h" #include "mozilla/gfx/2D.h" @@ -69,4 +69,4 @@ private: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_ORIENTEDIMAGE_H_ +#endif // mozilla_image_OrientedImage_h diff --git a/image/src/ProgressTracker.cpp b/image/ProgressTracker.cpp similarity index 100% rename from image/src/ProgressTracker.cpp rename to image/ProgressTracker.cpp diff --git a/image/src/ProgressTracker.h b/image/ProgressTracker.h similarity index 98% rename from image/src/ProgressTracker.h rename to image/ProgressTracker.h index 7bdfd44e35..c6b8808571 100644 --- a/image/src/ProgressTracker.h +++ b/image/ProgressTracker.h @@ -4,8 +4,8 @@ * 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 ProgressTracker_h__ -#define ProgressTracker_h__ +#ifndef mozilla_image_ProgressTracker_h +#define mozilla_image_ProgressTracker_h #include "mozilla/RefPtr.h" #include "mozilla/WeakPtr.h" @@ -214,4 +214,4 @@ private: } // namespace image } // namespace mozilla -#endif +#endif // mozilla_image_ProgressTracker_h diff --git a/image/src/RasterImage.cpp b/image/RasterImage.cpp similarity index 99% rename from image/src/RasterImage.cpp rename to image/RasterImage.cpp index 2f85d07924..26efbd1f66 100644 --- a/image/src/RasterImage.cpp +++ b/image/RasterImage.cpp @@ -731,7 +731,7 @@ RasterImage::CopyFrame(uint32_t aWhichFrame, uint32_t aFlags) target->Flush(); surf->Unmap(); - return surf; + return surf.forget(); } //****************************************************************************** @@ -781,7 +781,7 @@ RasterImage::GetFrameInternal(uint32_t aWhichFrame, uint32_t aFlags) frameSurf = CopyFrame(aWhichFrame, aFlags); } - return frameSurf; + return frameSurf.forget(); } already_AddRefed diff --git a/image/src/RasterImage.h b/image/RasterImage.h similarity index 99% rename from image/src/RasterImage.h rename to image/RasterImage.h index 9f7a740b42..3ed760d174 100644 --- a/image/src/RasterImage.h +++ b/image/RasterImage.h @@ -14,8 +14,8 @@ * @author Andrew Smith */ -#ifndef mozilla_imagelib_RasterImage_h_ -#define mozilla_imagelib_RasterImage_h_ +#ifndef mozilla_image_RasterImage_h +#define mozilla_image_RasterImage_h #include "Image.h" #include "nsCOMPtr.h" @@ -483,4 +483,4 @@ inline NS_IMETHODIMP RasterImage::GetAnimationMode(uint16_t *aAnimationMode) { } // namespace image } // namespace mozilla -#endif /* mozilla_imagelib_RasterImage_h_ */ +#endif /* mozilla_image_RasterImage_h */ diff --git a/image/src/SVGDocumentWrapper.cpp b/image/SVGDocumentWrapper.cpp similarity index 100% rename from image/src/SVGDocumentWrapper.cpp rename to image/SVGDocumentWrapper.cpp diff --git a/image/src/SVGDocumentWrapper.h b/image/SVGDocumentWrapper.h similarity index 96% rename from image/src/SVGDocumentWrapper.h rename to image/SVGDocumentWrapper.h index 2929e25e2d..dc39b62a31 100644 --- a/image/src/SVGDocumentWrapper.h +++ b/image/SVGDocumentWrapper.h @@ -5,8 +5,8 @@ /* This class wraps an SVG document, for use by VectorImage objects. */ -#ifndef mozilla_imagelib_SVGDocumentWrapper_h_ -#define mozilla_imagelib_SVGDocumentWrapper_h_ +#ifndef mozilla_image_SVGDocumentWrapper_h +#define mozilla_image_SVGDocumentWrapper_h #include "mozilla/Attributes.h" @@ -149,4 +149,4 @@ private: } // namespace image } // namespace mozilla -#endif // mozilla_imagelib_SVGDocumentWrapper_h_ +#endif // mozilla_image_SVGDocumentWrapper_h diff --git a/image/src/ScriptedNotificationObserver.cpp b/image/ScriptedNotificationObserver.cpp similarity index 100% rename from image/src/ScriptedNotificationObserver.cpp rename to image/ScriptedNotificationObserver.cpp diff --git a/image/src/ScriptedNotificationObserver.h b/image/ScriptedNotificationObserver.h similarity index 84% rename from image/src/ScriptedNotificationObserver.h rename to image/ScriptedNotificationObserver.h index fccb3010b0..aabb2db25b 100644 --- a/image/src/ScriptedNotificationObserver.h +++ b/image/ScriptedNotificationObserver.h @@ -4,8 +4,8 @@ * 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 ScriptedNotificationObserver_h -#define ScriptedNotificationObserver_h +#ifndef mozilla_image_ScriptedNotificationObserver_h +#define mozilla_image_ScriptedNotificationObserver_h #include "imgINotificationObserver.h" #include "nsCOMPtr.h" @@ -32,4 +32,4 @@ private: }} -#endif +#endif // mozilla_image_ScriptedNotificationObserver_h diff --git a/image/src/ShutdownTracker.cpp b/image/ShutdownTracker.cpp similarity index 100% rename from image/src/ShutdownTracker.cpp rename to image/ShutdownTracker.cpp diff --git a/image/src/ShutdownTracker.h b/image/ShutdownTracker.h similarity index 90% rename from image/src/ShutdownTracker.h rename to image/ShutdownTracker.h index e1287b6cfb..a0635334a3 100644 --- a/image/src/ShutdownTracker.h +++ b/image/ShutdownTracker.h @@ -8,8 +8,8 @@ * whether shutdown has started. */ -#ifndef MOZILLA_IMAGELIB_SHUTDOWNTRACKER_H_ -#define MOZILLA_IMAGELIB_SHUTDOWNTRACKER_H_ +#ifndef mozilla_image_ShutdownTracker_h +#define mozilla_image_ShutdownTracker_h namespace mozilla { namespace image { @@ -43,4 +43,4 @@ private: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_SHUTDOWNTRACKER_H_ +#endif // mozilla_image_ShutdownTracker_h diff --git a/image/src/SourceBuffer.cpp b/image/SourceBuffer.cpp similarity index 100% rename from image/src/SourceBuffer.cpp rename to image/SourceBuffer.cpp diff --git a/image/src/SourceBuffer.h b/image/SourceBuffer.h similarity index 98% rename from image/src/SourceBuffer.h rename to image/SourceBuffer.h index f09577eedd..9dbef1860e 100644 --- a/image/src/SourceBuffer.h +++ b/image/SourceBuffer.h @@ -8,8 +8,8 @@ * storing image source (compressed) data. */ -#ifndef MOZILLA_IMAGELIB_SOURCEBUFFER_H_ -#define MOZILLA_IMAGELIB_SOURCEBUFFER_H_ +#ifndef mozilla_image_sourcebuffer_h +#define mozilla_image_sourcebuffer_h #include "mozilla/Maybe.h" #include "mozilla/MemoryReporting.h" @@ -19,7 +19,7 @@ #include "mozilla/RefCounted.h" #include "mozilla/RefPtr.h" #include "mozilla/UniquePtr.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsTArray.h" namespace mozilla { @@ -379,4 +379,4 @@ private: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_SOURCEBUFFER_H_ +#endif // mozilla_image_sourcebuffer_h diff --git a/image/src/SurfaceCache.cpp b/image/SurfaceCache.cpp similarity index 100% rename from image/src/SurfaceCache.cpp rename to image/SurfaceCache.cpp diff --git a/image/src/SurfaceCache.h b/image/SurfaceCache.h similarity index 99% rename from image/src/SurfaceCache.h rename to image/SurfaceCache.h index 050e5f5195..5b25f934de 100644 --- a/image/src/SurfaceCache.h +++ b/image/SurfaceCache.h @@ -8,8 +8,8 @@ * data in imagelib. */ -#ifndef MOZILLA_IMAGELIB_SURFACECACHE_H_ -#define MOZILLA_IMAGELIB_SURFACECACHE_H_ +#ifndef mozilla_image_SurfaceCache_h +#define mozilla_image_SurfaceCache_h #include "mozilla/Maybe.h" // for Maybe #include "mozilla/MemoryReporting.h" // for MallocSizeOf @@ -409,4 +409,4 @@ private: } // namespace image } // namespace mozilla -#endif // MOZILLA_IMAGELIB_SURFACECACHE_H_ +#endif // mozilla_image_SurfaceCache_h diff --git a/image/src/VectorImage.cpp b/image/VectorImage.cpp similarity index 100% rename from image/src/VectorImage.cpp rename to image/VectorImage.cpp diff --git a/image/src/VectorImage.h b/image/VectorImage.h similarity index 97% rename from image/src/VectorImage.h rename to image/VectorImage.h index 81efd58cb0..f1cbcafbd2 100644 --- a/image/src/VectorImage.h +++ b/image/VectorImage.h @@ -3,8 +3,8 @@ * 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_imagelib_VectorImage_h_ -#define mozilla_imagelib_VectorImage_h_ +#ifndef mozilla_image_VectorImage_h +#define mozilla_image_VectorImage_h #include "Image.h" #include "nsIStreamListener.h" @@ -125,4 +125,4 @@ inline NS_IMETHODIMP VectorImage::SetAnimationMode(uint16_t aAnimationMode) { } // namespace image } // namespace mozilla -#endif // mozilla_imagelib_VectorImage_h_ +#endif // mozilla_image_VectorImage_h diff --git a/image/build/moz.build b/image/build/moz.build index 654076ae84..8cbcfd96b1 100644 --- a/image/build/moz.build +++ b/image/build/moz.build @@ -16,10 +16,10 @@ FAIL_ON_WARNINGS = True FINAL_LIBRARY = 'xul' LOCAL_INCLUDES += [ - '../encoders/bmp', - '../encoders/ico', - '../encoders/jpeg', - '../encoders/png', - '../src', + '/image', + '/image/encoders/bmp', + '/image/encoders/ico', + '/image/encoders/jpeg', + '/image/encoders/png', ] diff --git a/image/decoders/icon/qt/moz.build b/image/decoders/icon/qt/moz.build index 9a428e39c4..0cf20fdb6d 100644 --- a/image/decoders/icon/qt/moz.build +++ b/image/decoders/icon/qt/moz.build @@ -4,7 +4,11 @@ # 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/. -DIRS += ['public'] +XPIDL_SOURCES += [ + 'nsGtkQtIconsConverter.idl', +] + +XPIDL_MODULE = 'gtkqticonsconverter' SOURCES += [ 'nsIconChannel.cpp', diff --git a/image/decoders/icon/qt/public/nsGtkQtIconsConverter.idl b/image/decoders/icon/qt/nsGtkQtIconsConverter.idl similarity index 100% rename from image/decoders/icon/qt/public/nsGtkQtIconsConverter.idl rename to image/decoders/icon/qt/nsGtkQtIconsConverter.idl diff --git a/image/decoders/icon/qt/public/moz.build b/image/decoders/icon/qt/public/moz.build deleted file mode 100644 index 9e26f8b8b3..0000000000 --- a/image/decoders/icon/qt/public/moz.build +++ /dev/null @@ -1,12 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# 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/. - -XPIDL_SOURCES += [ - 'nsGtkQtIconsConverter.idl', -] - -XPIDL_MODULE = 'gtkqticonsconverter' - diff --git a/image/decoders/moz.build b/image/decoders/moz.build index d3acc39a39..d4c7e7484c 100644 --- a/image/decoders/moz.build +++ b/image/decoders/moz.build @@ -48,7 +48,7 @@ SOURCES += [ # Decoders need RasterImage.h LOCAL_INCLUDES += [ - '/image/src', + '/image', ] FINAL_LIBRARY = 'xul' diff --git a/image/encoders/bmp/moz.build b/image/encoders/bmp/moz.build index 20530d9d37..eb8f884c31 100644 --- a/image/encoders/bmp/moz.build +++ b/image/encoders/bmp/moz.build @@ -11,7 +11,7 @@ SOURCES += [ FAIL_ON_WARNINGS = True LOCAL_INCLUDES += [ - '/image/src', + '/image', ] FINAL_LIBRARY = 'xul' diff --git a/image/encoders/ico/moz.build b/image/encoders/ico/moz.build index 87fa481fc5..7f00248e9e 100644 --- a/image/encoders/ico/moz.build +++ b/image/encoders/ico/moz.build @@ -12,9 +12,9 @@ FAIL_ON_WARNINGS = True # Decoders need RasterImage.h LOCAL_INCLUDES += [ - '../bmp', - '../png', - '/image/src', + '/image', + '/image/encoders/bmp', + '/image/encoders/png', ] FINAL_LIBRARY = 'xul' diff --git a/image/encoders/png/moz.build b/image/encoders/png/moz.build index 3cdb746d9c..65e6bb8bb9 100644 --- a/image/encoders/png/moz.build +++ b/image/encoders/png/moz.build @@ -11,7 +11,7 @@ SOURCES += [ FAIL_ON_WARNINGS = True LOCAL_INCLUDES += [ - '/image/src', + '/image', ] FINAL_LIBRARY = 'xul' diff --git a/image/src/imgFrame.cpp b/image/imgFrame.cpp similarity index 99% rename from image/src/imgFrame.cpp rename to image/imgFrame.cpp index 54a8636720..84e7d6abd2 100644 --- a/image/src/imgFrame.cpp +++ b/image/imgFrame.cpp @@ -66,7 +66,7 @@ CreateLockedSurface(VolatileBuffer *vbuf, } surf->AddUserData(&kVolatileBuffer, vbufptr, VolatileBufferRelease); - return surf; + return surf.forget(); } static TemporaryRef @@ -76,7 +76,7 @@ AllocateBufferForImage(const IntSize& size, SurfaceFormat format) RefPtr buf = new VolatileBuffer(); if (buf->Init(stride * size.height, 1 << gfxAlphaRecovery::GoodAlignmentLog2())) - return buf; + return buf.forget(); return nullptr; } @@ -1020,14 +1020,18 @@ imgFrame::GetSurfaceInternal() mMonitor.AssertCurrentThreadOwns(); if (mOptSurface) { - if (mOptSurface->IsValid()) - return mOptSurface; - else + if (mOptSurface->IsValid()) { + RefPtr surf(mOptSurface); + return surf.forget(); + } else { mOptSurface = nullptr; + } } - if (mImageSurface) - return mImageSurface; + if (mImageSurface) { + RefPtr surf(mImageSurface); + return surf.forget(); + } if (!mVBuf) return nullptr; diff --git a/image/src/imgFrame.h b/image/imgFrame.h similarity index 99% rename from image/src/imgFrame.h rename to image/imgFrame.h index 97e318d16b..bb9f2d0f16 100644 --- a/image/src/imgFrame.h +++ b/image/imgFrame.h @@ -4,8 +4,8 @@ * 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 imgFrame_h -#define imgFrame_h +#ifndef mozilla_image_imgFrame_h +#define mozilla_image_imgFrame_h #include "mozilla/MemoryReporting.h" #include "mozilla/Monitor.h" @@ -532,4 +532,4 @@ private: } // namespace image } // namespace mozilla -#endif /* imgFrame_h */ +#endif // mozilla_image_imgFrame_h diff --git a/image/public/imgICache.idl b/image/imgICache.idl similarity index 100% rename from image/public/imgICache.idl rename to image/imgICache.idl diff --git a/image/public/imgIContainer.idl b/image/imgIContainer.idl similarity index 100% rename from image/public/imgIContainer.idl rename to image/imgIContainer.idl diff --git a/image/public/imgIContainerDebug.idl b/image/imgIContainerDebug.idl similarity index 100% rename from image/public/imgIContainerDebug.idl rename to image/imgIContainerDebug.idl diff --git a/image/public/imgIEncoder.idl b/image/imgIEncoder.idl similarity index 100% rename from image/public/imgIEncoder.idl rename to image/imgIEncoder.idl diff --git a/image/public/imgILoader.idl b/image/imgILoader.idl similarity index 100% rename from image/public/imgILoader.idl rename to image/imgILoader.idl diff --git a/image/public/imgINotificationObserver.idl b/image/imgINotificationObserver.idl similarity index 100% rename from image/public/imgINotificationObserver.idl rename to image/imgINotificationObserver.idl diff --git a/image/public/imgIOnloadBlocker.idl b/image/imgIOnloadBlocker.idl similarity index 100% rename from image/public/imgIOnloadBlocker.idl rename to image/imgIOnloadBlocker.idl diff --git a/image/public/imgIRequest.idl b/image/imgIRequest.idl similarity index 100% rename from image/public/imgIRequest.idl rename to image/imgIRequest.idl diff --git a/image/public/imgIScriptedNotificationObserver.idl b/image/imgIScriptedNotificationObserver.idl similarity index 100% rename from image/public/imgIScriptedNotificationObserver.idl rename to image/imgIScriptedNotificationObserver.idl diff --git a/image/public/imgITools.idl b/image/imgITools.idl similarity index 100% rename from image/public/imgITools.idl rename to image/imgITools.idl diff --git a/image/src/imgLoader.cpp b/image/imgLoader.cpp similarity index 100% rename from image/src/imgLoader.cpp rename to image/imgLoader.cpp diff --git a/image/src/imgLoader.h b/image/imgLoader.h similarity index 99% rename from image/src/imgLoader.h rename to image/imgLoader.h index 79c7a20ce4..ce28217b43 100644 --- a/image/src/imgLoader.h +++ b/image/imgLoader.h @@ -4,8 +4,8 @@ * 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 imgLoader_h__ -#define imgLoader_h__ +#ifndef mozilla_image_imgLoader_h +#define mozilla_image_imgLoader_h #include "mozilla/Attributes.h" #include "mozilla/Mutex.h" @@ -549,4 +549,4 @@ private: imgLoader* mImgLoader; }; -#endif // imgLoader_h__ +#endif // mozilla_image_imgLoader_h diff --git a/image/src/imgRequest.cpp b/image/imgRequest.cpp similarity index 100% rename from image/src/imgRequest.cpp rename to image/imgRequest.cpp diff --git a/image/src/imgRequest.h b/image/imgRequest.h similarity index 98% rename from image/src/imgRequest.h rename to image/imgRequest.h index 0a8571612e..ab0e4246ce 100644 --- a/image/src/imgRequest.h +++ b/image/imgRequest.h @@ -4,8 +4,8 @@ * 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 imgRequest_h__ -#define imgRequest_h__ +#ifndef mozilla_image_imgRequest_h +#define mozilla_image_imgRequest_h #include "nsIChannelEventSink.h" #include "nsIInterfaceRequestor.h" @@ -285,4 +285,4 @@ private: bool mNewPartPending : 1; }; -#endif +#endif // mozilla_image_imgRequest_h diff --git a/image/src/imgRequestProxy.cpp b/image/imgRequestProxy.cpp similarity index 100% rename from image/src/imgRequestProxy.cpp rename to image/imgRequestProxy.cpp diff --git a/image/src/imgRequestProxy.h b/image/imgRequestProxy.h similarity index 98% rename from image/src/imgRequestProxy.h rename to image/imgRequestProxy.h index 534a4bb917..41408ef1f0 100644 --- a/image/src/imgRequestProxy.h +++ b/image/imgRequestProxy.h @@ -4,8 +4,8 @@ * 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 imgRequestProxy_h__ -#define imgRequestProxy_h__ +#ifndef mozilla_image_imgRequestProxy_h +#define mozilla_image_imgRequestProxy_h #include "imgIRequest.h" #include "nsISecurityInfoProvider.h" @@ -241,4 +241,4 @@ protected: nsCOMPtr mPrincipal; }; -#endif // imgRequestProxy_h__ +#endif // mozilla_image_imgRequestProxy_h diff --git a/image/src/imgTools.cpp b/image/imgTools.cpp similarity index 100% rename from image/src/imgTools.cpp rename to image/imgTools.cpp diff --git a/image/src/imgTools.h b/image/imgTools.h similarity index 87% rename from image/src/imgTools.h rename to image/imgTools.h index d7d60a75c5..e82af9624a 100644 --- a/image/src/imgTools.h +++ b/image/imgTools.h @@ -4,6 +4,9 @@ * 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_image_imgITools_h +#define mozilla_image_imgITools_h + #include "imgITools.h" #define NS_IMGTOOLS_CID \ @@ -25,3 +28,4 @@ public: private: virtual ~imgTools(); }; +#endif // mozilla_image_imgITools_h diff --git a/image/moz.build b/image/moz.build index 06cd682364..7d84258bfe 100644 --- a/image/moz.build +++ b/image/moz.build @@ -4,8 +4,7 @@ # 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/. -DIRS += ['public', 'src', 'decoders', 'encoders'] -DIRS += ['build'] +DIRS += ['build', 'decoders', 'encoders'] BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini'] @@ -14,3 +13,93 @@ MOCHITEST_MANIFESTS += ['test/mochitest/mochitest.ini'] MOCHITEST_CHROME_MANIFESTS += ['test/mochitest/chrome.ini'] XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini'] + + +XPIDL_SOURCES += [ + 'imgICache.idl', + 'imgIContainer.idl', + 'imgIContainerDebug.idl', + 'imgIEncoder.idl', + 'imgILoader.idl', + 'imgINotificationObserver.idl', + 'imgIOnloadBlocker.idl', + 'imgIRequest.idl', + 'imgIScriptedNotificationObserver.idl', + 'imgITools.idl', + 'nsIIconURI.idl', +] + +XPIDL_MODULE = 'imglib2' + + +EXPORTS += [ + 'ImageLogging.h', + 'ImageOps.h', + 'ImageRegion.h', + 'imgLoader.h', + 'imgRequest.h', + 'imgRequestProxy.h', + 'IProgressObserver.h', + 'Orientation.h', + 'SurfaceCache.h', +] + +UNIFIED_SOURCES += [ + 'ClippedImage.cpp', + 'DecodePool.cpp', + 'Decoder.cpp', + 'DynamicImage.cpp', + 'FrameAnimator.cpp', + 'FrozenImage.cpp', + 'Image.cpp', + 'ImageFactory.cpp', + 'ImageMetadata.cpp', + 'ImageOps.cpp', + 'ImageWrapper.cpp', + 'imgFrame.cpp', + 'imgTools.cpp', + 'MultipartImage.cpp', + 'OrientedImage.cpp', + 'ScriptedNotificationObserver.cpp', + 'ShutdownTracker.cpp', + 'SourceBuffer.cpp', + 'SurfaceCache.cpp', + 'SVGDocumentWrapper.cpp', + 'VectorImage.cpp', +] +if CONFIG['MOZ_ENABLE_SKIA']: + UNIFIED_SOURCES += [ 'Downscaler.cpp'] + +# These files can't be unified because of ImageLogging.h #include order issues. +SOURCES += [ + 'imgLoader.cpp', + 'imgRequest.cpp', + 'imgRequestProxy.cpp', + 'ProgressTracker.cpp', + 'RasterImage.cpp', +] + +FAIL_ON_WARNINGS = True + +include('/ipc/chromium/chromium-config.mozbuild') + +FINAL_LIBRARY = 'xul' + +LOCAL_INCLUDES += [ + # Because SVGDocumentWrapper.cpp includes "mozilla/dom/SVGSVGElement.h" + '/dom/base', + '/dom/svg', + # Access to Skia headers for Downscaler + '/gfx/2d', + # We need to instantiate the decoders + '/image/decoders', + # Because VectorImage.cpp includes nsSVGUtils.h and nsSVGEffects.h + '/layout/svg', + # For URI-related functionality + '/netwerk/base', + # DecodePool uses thread-related facilities. + '/xpcom/threads', +] + +# Because imgFrame.cpp includes "cairo.h" +CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] diff --git a/image/public/nsIIconURI.idl b/image/nsIIconURI.idl similarity index 100% rename from image/public/nsIIconURI.idl rename to image/nsIIconURI.idl diff --git a/image/public/moz.build b/image/public/moz.build deleted file mode 100644 index 4f663db925..0000000000 --- a/image/public/moz.build +++ /dev/null @@ -1,26 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# 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/. - -XPIDL_SOURCES += [ - 'imgICache.idl', - 'imgIContainer.idl', - 'imgIContainerDebug.idl', - 'imgIEncoder.idl', - 'imgILoader.idl', - 'imgINotificationObserver.idl', - 'imgIOnloadBlocker.idl', - 'imgIRequest.idl', - 'imgIScriptedNotificationObserver.idl', - 'imgITools.idl', - 'nsIIconURI.idl', -] - -XPIDL_MODULE = 'imglib2' - -EXPORTS += [ - 'ImageLogging.h', -] - diff --git a/image/src/Downscaler.cpp b/image/src/Downscaler.cpp deleted file mode 100644 index e511f3ca6c..0000000000 --- a/image/src/Downscaler.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; 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 "Downscaler.h" - -#include -#include -#include "gfxPrefs.h" -#include "image_operations.h" -#include "convolver.h" -#include "skia/SkTypes.h" - -using std::max; -using std::swap; - -namespace mozilla { -namespace image { - -Downscaler::Downscaler(const nsIntSize& aTargetSize) - : mTargetSize(aTargetSize) - , mOutputBuffer(nullptr) - , mXFilter(MakeUnique()) - , mYFilter(MakeUnique()) - , mWindowCapacity(0) - , mHasAlpha(true) -{ - MOZ_ASSERT(gfxPrefs::ImageDownscaleDuringDecodeEnabled(), - "Downscaling even though downscale-during-decode is disabled?"); - MOZ_ASSERT(mTargetSize.width > 0 && mTargetSize.height > 0, - "Invalid target size"); -} - -Downscaler::~Downscaler() -{ - ReleaseWindow(); -} - -void -Downscaler::ReleaseWindow() -{ - if (!mWindow) { - return; - } - - for (int32_t i = 0; i < mWindowCapacity; ++i) { - delete[] mWindow[i]; - } - - mWindow = nullptr; - mWindowCapacity = 0; -} - -nsresult -Downscaler::BeginFrame(const nsIntSize& aOriginalSize, - uint8_t* aOutputBuffer, - bool aHasAlpha) -{ - MOZ_ASSERT(aOutputBuffer); - MOZ_ASSERT(mTargetSize != aOriginalSize, - "Created a downscaler, but not downscaling?"); - MOZ_ASSERT(mTargetSize.width <= aOriginalSize.width, - "Created a downscaler, but width is larger"); - MOZ_ASSERT(mTargetSize.height <= aOriginalSize.height, - "Created a downscaler, but height is larger"); - MOZ_ASSERT(aOriginalSize.width > 0 && aOriginalSize.height > 0, - "Invalid original size"); - - mOriginalSize = aOriginalSize; - mOutputBuffer = aOutputBuffer; - mHasAlpha = aHasAlpha; - - ResetForNextProgressivePass(); - ReleaseWindow(); - - auto resizeMethod = skia::ImageOperations::RESIZE_LANCZOS3; - - skia::resize::ComputeFilters(resizeMethod, - mOriginalSize.width, mTargetSize.width, - 0, mTargetSize.width, - mXFilter.get()); - - skia::resize::ComputeFilters(resizeMethod, - mOriginalSize.height, mTargetSize.height, - 0, mTargetSize.height, - mYFilter.get()); - - // Allocate the buffer, which contains scanlines of the original image. - size_t bufferLen = mOriginalSize.width * sizeof(uint32_t); - mRowBuffer = MakeUnique(bufferLen); - if (MOZ_UNLIKELY(!mRowBuffer)) { - return NS_ERROR_OUT_OF_MEMORY; - } - - // Zero buffer to keep valgrind happy. - memset(mRowBuffer.get(), 0, bufferLen); - - - // Allocate the window, which contains horizontally downscaled scanlines. (We - // can store scanlines which are already downscale because our downscaling - // filter is separable.) - mWindowCapacity = mYFilter->max_filter(); - mWindow = MakeUnique(mWindowCapacity); - if (MOZ_UNLIKELY(!mWindow)) { - return NS_ERROR_OUT_OF_MEMORY; - } - - bool anyAllocationFailed = false; - const int rowSize = mTargetSize.width * sizeof(uint32_t); - for (int32_t i = 0; i < mWindowCapacity; ++i) { - mWindow[i] = new uint8_t[rowSize]; - anyAllocationFailed = anyAllocationFailed || mWindow[i] == nullptr; - } - - if (MOZ_UNLIKELY(anyAllocationFailed)) { - // We intentionally iterate through the entire array even if an allocation - // fails, to ensure that all the pointers in it are either valid or nullptr. - // That in turn ensures that ReleaseWindow() can clean up correctly. - return NS_ERROR_OUT_OF_MEMORY; - } - - return NS_OK; -} - -void -Downscaler::ResetForNextProgressivePass() -{ - mPrevInvalidatedLine = 0; - mCurrentOutLine = 0; - mCurrentInLine = 0; - mLinesInBuffer = 0; -} - -static void -GetFilterOffsetAndLength(UniquePtr& aFilter, - int32_t aOutputImagePosition, - int32_t* aFilterOffsetOut, - int32_t* aFilterLengthOut) -{ - MOZ_ASSERT(aOutputImagePosition < aFilter->num_values()); - aFilter->FilterForValue(aOutputImagePosition, - aFilterOffsetOut, - aFilterLengthOut); -} - -void -Downscaler::CommitRow() -{ - MOZ_ASSERT(mOutputBuffer, "Should have a current frame"); - MOZ_ASSERT(mCurrentInLine < mOriginalSize.height, "Past end of input"); - - if (mCurrentOutLine < mTargetSize.height) { - int32_t filterOffset = 0; - int32_t filterLength = 0; - GetFilterOffsetAndLength(mYFilter, mCurrentOutLine, - &filterOffset, &filterLength); - - int32_t inLineToRead = filterOffset + mLinesInBuffer; - MOZ_ASSERT(mCurrentInLine <= inLineToRead, "Reading past end of input"); - if (mCurrentInLine == inLineToRead) { - skia::ConvolveHorizontally(mRowBuffer.get(), *mXFilter, - mWindow[mLinesInBuffer++], mHasAlpha, - /* use_sse2 = */ true); - } - - MOZ_ASSERT(mCurrentOutLine < mTargetSize.height, - "Writing past end of output"); - - while (mLinesInBuffer == filterLength) { - DownscaleInputLine(); - - if (mCurrentOutLine == mTargetSize.height) { - break; // We're done. - } - - GetFilterOffsetAndLength(mYFilter, mCurrentOutLine, - &filterOffset, &filterLength); - } - } - - mCurrentInLine += 1; -} - -bool -Downscaler::HasInvalidation() const -{ - return mCurrentOutLine > mPrevInvalidatedLine; -} - -nsIntRect -Downscaler::TakeInvalidRect() -{ - if (MOZ_UNLIKELY(!HasInvalidation())) { - return nsIntRect(); - } - - nsIntRect invalidRect(0, mPrevInvalidatedLine, - mTargetSize.width, - mCurrentOutLine - mPrevInvalidatedLine); - mPrevInvalidatedLine = mCurrentOutLine; - return invalidRect; -} - -void -Downscaler::DownscaleInputLine() -{ - typedef skia::ConvolutionFilter1D::Fixed FilterValue; - - MOZ_ASSERT(mOutputBuffer); - MOZ_ASSERT(mCurrentOutLine < mTargetSize.height, "Writing past end of output"); - - int32_t filterOffset = 0; - int32_t filterLength = 0; - MOZ_ASSERT(mCurrentOutLine < mYFilter->num_values()); - auto filterValues = - mYFilter->FilterForValue(mCurrentOutLine, &filterOffset, &filterLength); - - uint8_t* outputLine = - &mOutputBuffer[mCurrentOutLine * mTargetSize.width * sizeof(uint32_t)]; - skia::ConvolveVertically(static_cast(filterValues), - filterLength, mWindow.get(), mXFilter->num_values(), - outputLine, mHasAlpha, /* use_sse2 = */ true); - - mCurrentOutLine += 1; - - if (mCurrentOutLine == mTargetSize.height) { - // We're done. - return; - } - - int32_t newFilterOffset = 0; - int32_t newFilterLength = 0; - GetFilterOffsetAndLength(mYFilter, mCurrentOutLine, - &newFilterOffset, &newFilterLength); - - int diff = newFilterOffset - filterOffset; - MOZ_ASSERT(diff >= 0, "Moving backwards in the filter?"); - - // Shift the buffer. We're just moving pointers here, so this is cheap. - mLinesInBuffer -= diff; - mLinesInBuffer = max(mLinesInBuffer, 0); - for (int32_t i = 0; i < mLinesInBuffer; ++i) { - swap(mWindow[i], mWindow[filterLength - mLinesInBuffer + i]); - } -} - -} // namespace image -} // namespace mozilla diff --git a/image/src/moz.build b/image/src/moz.build deleted file mode 100644 index 5f7d8b93c0..0000000000 --- a/image/src/moz.build +++ /dev/null @@ -1,74 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# 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/. - -EXPORTS += [ - 'ImageOps.h', - 'ImageRegion.h', - 'imgLoader.h', - 'imgRequest.h', - 'imgRequestProxy.h', - 'IProgressObserver.h', - 'Orientation.h', - 'SurfaceCache.h', -] - -UNIFIED_SOURCES += [ - 'ClippedImage.cpp', - 'DecodePool.cpp', - 'Decoder.cpp', - 'DynamicImage.cpp', - 'FrameAnimator.cpp', - 'FrozenImage.cpp', - 'Image.cpp', - 'ImageFactory.cpp', - 'ImageMetadata.cpp', - 'ImageOps.cpp', - 'ImageWrapper.cpp', - 'imgFrame.cpp', - 'imgTools.cpp', - 'MultipartImage.cpp', - 'OrientedImage.cpp', - 'ScriptedNotificationObserver.cpp', - 'ShutdownTracker.cpp', - 'SourceBuffer.cpp', - 'SurfaceCache.cpp', - 'SVGDocumentWrapper.cpp', - 'VectorImage.cpp', -] -if CONFIG['MOZ_ENABLE_SKIA']: - UNIFIED_SOURCES += [ 'Downscaler.cpp'] - -# These files can't be unified because of ImageLogging.h #include order issues. -SOURCES += [ - 'imgLoader.cpp', - 'imgRequest.cpp', - 'imgRequestProxy.cpp', - 'ProgressTracker.cpp', - 'RasterImage.cpp', -] - -FAIL_ON_WARNINGS = True - -include('/ipc/chromium/chromium-config.mozbuild') - -FINAL_LIBRARY = 'xul' - -LOCAL_INCLUDES += [ - # Because SVGDocumentWrapper.cpp includes "mozilla/dom/SVGSVGElement.h" - '/dom/base', - '/dom/svg', - # Access to Skia headers for Downscaler - '/gfx/2d', - # We need to instantiate the decoders - '/image/decoders', - # Because VectorImage.cpp includes nsSVGUtils.h and nsSVGEffects.h - '/layout/svg', - # For URI-related functionality - '/netwerk/base', -] - -# Because imgFrame.cpp includes "cairo.h" -CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] diff --git a/ipc/glue/BackgroundParentImpl.cpp b/ipc/glue/BackgroundParentImpl.cpp index fcc1337a2b..e37e2f14d4 100644 --- a/ipc/glue/BackgroundParentImpl.cpp +++ b/ipc/glue/BackgroundParentImpl.cpp @@ -19,7 +19,7 @@ #include "mozilla/ipc/PBackgroundTestParent.h" #include "mozilla/layout/VsyncParent.h" #include "nsNetUtil.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsThreadUtils.h" #include "nsTraceRefcnt.h" #include "nsXULAppAPI.h" diff --git a/ipc/ipdl/ipdl/builtin.py b/ipc/ipdl/ipdl/builtin.py index 84a2921a1a..dfbd2be82d 100644 --- a/ipc/ipdl/ipdl/builtin.py +++ b/ipc/ipdl/ipdl/builtin.py @@ -46,7 +46,7 @@ HeaderIncludes = ( 'prtime.h', 'IPCMessageStart.h', 'ipc/IPCMessageUtils.h', - 'nsRefPtr.h', + 'mozilla/nsRefPtr.h', 'nsStringGlue.h', 'nsTArray.h', 'mozilla/ipc/ProtocolUtils.h', diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 5237c461e9..673aebdd9a 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -5100,13 +5100,88 @@ SetOutOfMemoryCallback(JSRuntime* rt, OutOfMemoryCallback cb, void* data); /* - * Capture the current call stack as a chain of SavedFrame objects, and set - * |stackp| to the SavedFrame for the newest stack frame. If |maxFrameCount| is - * non-zero, capture at most the youngest |maxFrameCount| frames. + * Capture the current call stack as a chain of SavedFrame JSObjects, and set + * |stackp| to the SavedFrame for the youngest stack frame, or nullptr if there + * are no JS frames on the stack. If |maxFrameCount| is non-zero, capture at + * most the youngest |maxFrameCount| frames. */ extern JS_PUBLIC_API(bool) CaptureCurrentStack(JSContext* cx, MutableHandleObject stackp, unsigned maxFrameCount = 0); +/* + * Accessors for working with SavedFrame JSObjects + * + * Each of these functions assert that if their `HandleObject savedFrame` + * argument is non-null, its JSClass is the SavedFrame class (or it is a + * cross-compartment or Xray wrapper around an object with the SavedFrame class) + * and the object is not the SavedFrame.prototype object. + * + * Each of these functions will find the first SavedFrame object in the chain + * whose underlying stack frame principals are subsumed by the cx's current + * compartment's principals, and operate on that SavedFrame object. This + * prevents leaking information about privileged frames to un-privileged + * callers. As a result, the SavedFrame in parameters do _NOT_ need to be in the + * same compartment as the cx, and the various out parameters are _NOT_ + * guaranteed to be in the same compartment as cx. + * + * Additionally, it may be the case that there is no such SavedFrame object + * whose captured frame's principals are subsumed by the caller's compartment's + * principals! If the `HandleObject savedFrame` argument is null, or the + * caller's principals do not subsume any of the chained SavedFrame object's + * principals, `SavedFrameResult::AccessDenied` is returned and a (hopefully) + * sane default value is chosen for the out param. + */ + +enum class SavedFrameResult { + Ok, + AccessDenied +}; + +/* + * Given a SavedFrame JSObject, get its source property. Defaults to the empty + * string. + */ +extern JS_PUBLIC_API(SavedFrameResult) +GetSavedFrameSource(JSContext *cx, HandleObject savedFrame, MutableHandleString sourcep); + +/* + * Given a SavedFrame JSObject, get its line property. Defaults to 0. + */ +extern JS_PUBLIC_API(SavedFrameResult) +GetSavedFrameLine(JSContext *cx, HandleObject savedFrame, uint32_t *linep); + +/* + * Given a SavedFrame JSObject, get its column property. Defaults to 0. + */ +extern JS_PUBLIC_API(SavedFrameResult) +GetSavedFrameColumn(JSContext *cx, HandleObject savedFrame, uint32_t *columnp); + +/* + * Given a SavedFrame JSObject, get its functionDisplayName string, or nullptr + * if SpiderMonkey was unable to infer a name for the captured frame's + * function. Defaults to nullptr. + */ +extern JS_PUBLIC_API(SavedFrameResult) +GetSavedFrameFunctionDisplayName(JSContext *cx, HandleObject savedFrame, MutableHandleString namep); + +/* + * Given a SavedFrame JSObject, get its parent SavedFrame object or nullptr if + * it is the oldest frame in the stack. The `parentp` out parameter is _NOT_ + * guaranteed to be in the cx's compartment. Defaults to nullptr. + */ +extern JS_PUBLIC_API(SavedFrameResult) +GetSavedFrameParent(JSContext *cx, HandleObject savedFrame, MutableHandleObject parentp); + +/* + * Given a SavedFrame JSObject stack, stringify it in the same format as + * Error.prototype.stack. The stringified stack out parameter is placed in the + * cx's compartment. Defaults to the empty string. + */ +extern JS_PUBLIC_API(bool) +StringifySavedFrameStack(JSContext *cx, HandleObject stack, MutableHandleString stringp); + + + } /* namespace JS */ #endif /* jsapi_h */ diff --git a/js/src/vm/SavedStacks.cpp b/js/src/vm/SavedStacks.cpp index 01f7b19080..b75ae0014a 100644 --- a/js/src/vm/SavedStacks.cpp +++ b/js/src/vm/SavedStacks.cpp @@ -381,79 +381,109 @@ SavedFrame::checkThis(JSContext* cx, CallArgs& args, const char* fnName, // These parameters will be defined after calling this macro: // - CallArgs args // - Rooted frame (will be non-null) -#define THIS_SAVEDFRAME(cx, argc, vp, fnName, defaultVal, args, frame) \ +#define THIS_SAVEDFRAME(cx, argc, vp, fnName, args, frame) \ CallArgs args = CallArgsFromVp(argc, vp); \ RootedSavedFrame frame(cx); \ if (!checkThis(cx, args, fnName, &frame)) \ - return false; \ - if (!frame) { \ - args.rval().set(defaultVal); \ - return true; \ + return false; + +} /* namespace js */ + +namespace JS { + +static inline js::SavedFrame * +UnwrapSavedFrame(JSContext *cx, HandleObject obj) +{ + if (!obj) + return nullptr; + RootedObject savedFrameObj(cx, CheckedUnwrap(obj)); + MOZ_ASSERT(savedFrameObj); + MOZ_ASSERT(js::SavedFrame::isSavedFrameAndNotProto(*savedFrameObj)); + js::RootedSavedFrame frame(cx, &savedFrameObj->as()); + return GetFirstSubsumedFrame(cx, frame); +} + +JS_PUBLIC_API(SavedFrameResult) +GetSavedFrameSource(JSContext *cx, HandleObject savedFrame, MutableHandleString sourcep) +{ + js::RootedSavedFrame frame(cx, UnwrapSavedFrame(cx, savedFrame)); + if (!frame) { + sourcep.set(cx->runtime()->emptyString); + return SavedFrameResult::AccessDenied; + } + sourcep.set(frame->getSource()); + return SavedFrameResult::Ok; +} + +JS_PUBLIC_API(SavedFrameResult) +GetSavedFrameLine(JSContext *cx, HandleObject savedFrame, uint32_t *linep) +{ + MOZ_ASSERT(linep); + js::RootedSavedFrame frame(cx, UnwrapSavedFrame(cx, savedFrame)); + if (!frame) { + *linep = 0; + return SavedFrameResult::AccessDenied; + } + *linep = frame->getLine(); + return SavedFrameResult::Ok; +} + +JS_PUBLIC_API(SavedFrameResult) +GetSavedFrameColumn(JSContext *cx, HandleObject savedFrame, uint32_t *columnp) +{ + MOZ_ASSERT(columnp); + js::RootedSavedFrame frame(cx, UnwrapSavedFrame(cx, savedFrame)); + if (!frame) { + *columnp = 0; + return SavedFrameResult::AccessDenied; + } + *columnp = frame->getColumn(); + return SavedFrameResult::Ok; +} + +JS_PUBLIC_API(SavedFrameResult) +GetSavedFrameFunctionDisplayName(JSContext *cx, HandleObject savedFrame, MutableHandleString namep) +{ + js::RootedSavedFrame frame(cx, UnwrapSavedFrame(cx, savedFrame)); + if (!frame) { + namep.set(nullptr); + return SavedFrameResult::AccessDenied; + } + namep.set(frame->getFunctionDisplayName()); + return SavedFrameResult::Ok; +} + +JS_PUBLIC_API(SavedFrameResult) +GetSavedFrameParent(JSContext *cx, HandleObject savedFrame, MutableHandleObject parentp) +{ + js::RootedSavedFrame frame(cx, UnwrapSavedFrame(cx, savedFrame)); + if (!frame) { + parentp.set(nullptr); + return SavedFrameResult::AccessDenied; + } + js::RootedSavedFrame parent(cx, frame->getParent()); + parentp.set(js::GetFirstSubsumedFrame(cx, parent)); + return SavedFrameResult::Ok; +} + +JS_PUBLIC_API(bool) +StringifySavedFrameStack(JSContext *cx, HandleObject stack, MutableHandleString stringp) +{ + js::RootedSavedFrame frame(cx, UnwrapSavedFrame(cx, stack)); + if (!frame) { + stringp.set(cx->runtime()->emptyString); + return true; } -/* static */ bool -SavedFrame::sourceProperty(JSContext* cx, unsigned argc, Value* vp) -{ - THIS_SAVEDFRAME(cx, argc, vp, "(get source)", NullValue(), args, frame); - args.rval().setString(frame->getSource()); - return true; -} - -/* static */ bool -SavedFrame::lineProperty(JSContext* cx, unsigned argc, Value* vp) -{ - THIS_SAVEDFRAME(cx, argc, vp, "(get line)", NullValue(), args, frame); - uint32_t line = frame->getLine(); - args.rval().setNumber(line); - return true; -} - -/* static */ bool -SavedFrame::columnProperty(JSContext* cx, unsigned argc, Value* vp) -{ - THIS_SAVEDFRAME(cx, argc, vp, "(get column)", NullValue(), args, frame); - uint32_t column = frame->getColumn(); - args.rval().setNumber(column); - return true; -} - -/* static */ bool -SavedFrame::functionDisplayNameProperty(JSContext* cx, unsigned argc, Value* vp) -{ - THIS_SAVEDFRAME(cx, argc, vp, "(get functionDisplayName)", NullValue(), args, frame); - RootedAtom name(cx, frame->getFunctionDisplayName()); - if (name) - args.rval().setString(name); - else - args.rval().setNull(); - return true; -} - -/* static */ bool -SavedFrame::parentProperty(JSContext* cx, unsigned argc, Value* vp) -{ - THIS_SAVEDFRAME(cx, argc, vp, "(get parent)", NullValue(), args, frame); - RootedSavedFrame parent(cx, frame->getParent()); - args.rval().setObjectOrNull(GetFirstSubsumedFrame(cx, parent)); - return true; -} - -/* static */ bool -SavedFrame::toStringMethod(JSContext* cx, unsigned argc, Value* vp) -{ - THIS_SAVEDFRAME(cx, argc, vp, "toString", StringValue(cx->runtime()->emptyString), args, frame); - StringBuffer sb(cx); + js::StringBuffer sb(cx); DebugOnly subsumes = cx->runtime()->securityCallbacks->subsumes; DebugOnly principals = cx->compartment()->principals; - RootedSavedFrame parent(cx); + js::RootedSavedFrame parent(cx); do { MOZ_ASSERT_IF(subsumes, (*subsumes)(principals, frame->getPrincipals())); - if (frame->isSelfHosted()) - goto nextIteration; - - { - RootedAtom name(cx, frame->getFunctionDisplayName()); + if (!frame->isSelfHosted()) { + js::RootedAtom name(cx, frame->getFunctionDisplayName()); if ((name && !sb.append(name)) || !sb.append('@') || !sb.append(frame->getSource()) @@ -467,15 +497,88 @@ SavedFrame::toStringMethod(JSContext* cx, unsigned argc, Value* vp) } } - nextIteration: parent = frame->getParent(); - frame = GetFirstSubsumedFrame(cx, parent); + frame = js::GetFirstSubsumedFrame(cx, parent); } while (frame); JSString* str = sb.finishString(); if (!str) return false; - args.rval().setString(str); + stringp.set(str); + return true; +} + +} /* namespace JS */ + +namespace js { + +/* static */ bool +SavedFrame::sourceProperty(JSContext *cx, unsigned argc, Value *vp) +{ + THIS_SAVEDFRAME(cx, argc, vp, "(get source)", args, frame); + RootedString source(cx); + if (JS::GetSavedFrameSource(cx, frame, &source) == JS::SavedFrameResult::Ok) + args.rval().setString(source); + else + args.rval().setNull(); + return true; +} + +/* static */ bool +SavedFrame::lineProperty(JSContext *cx, unsigned argc, Value *vp) +{ + THIS_SAVEDFRAME(cx, argc, vp, "(get line)", args, frame); + uint32_t line; + if (JS::GetSavedFrameLine(cx, frame, &line) == JS::SavedFrameResult::Ok) + args.rval().setNumber(line); + else + args.rval().setNull(); + return true; +} + +/* static */ bool +SavedFrame::columnProperty(JSContext *cx, unsigned argc, Value *vp) +{ + THIS_SAVEDFRAME(cx, argc, vp, "(get column)", args, frame); + uint32_t column; + if (JS::GetSavedFrameColumn(cx, frame, &column) == JS::SavedFrameResult::Ok) + args.rval().setNumber(column); + else + args.rval().setNull(); + return true; +} + +/* static */ bool +SavedFrame::functionDisplayNameProperty(JSContext *cx, unsigned argc, Value *vp) +{ + THIS_SAVEDFRAME(cx, argc, vp, "(get functionDisplayName)", args, frame); + RootedString name(cx); + JS::SavedFrameResult result = JS::GetSavedFrameFunctionDisplayName(cx, frame, &name); + if (result == JS::SavedFrameResult::Ok && name) + args.rval().setString(name); + else + args.rval().setNull(); + return true; +} + +/* static */ bool +SavedFrame::parentProperty(JSContext *cx, unsigned argc, Value *vp) +{ + THIS_SAVEDFRAME(cx, argc, vp, "(get parent)", args, frame); + RootedObject parent(cx); + (void) JS::GetSavedFrameParent(cx, frame, &parent); + args.rval().setObjectOrNull(parent); + return true; +} + +/* static */ bool +SavedFrame::toStringMethod(JSContext *cx, unsigned argc, Value *vp) +{ + THIS_SAVEDFRAME(cx, argc, vp, "toString", args, frame); + RootedString string(cx); + if (!JS::StringifySavedFrameStack(cx, frame, &string)) + return false; + args.rval().setString(string); return true; } diff --git a/js/src/vm/SavedStacks.h b/js/src/vm/SavedStacks.h index e85eb60741..838c4a6386 100644 --- a/js/src/vm/SavedStacks.h +++ b/js/src/vm/SavedStacks.h @@ -48,6 +48,11 @@ class SavedFrame : public NativeObject { bool isSelfHosted(); + static bool isSavedFrameAndNotProto(JSObject &obj) { + return obj.is() && + !obj.as().getReservedSlot(JSSLOT_SOURCE).isNull(); + } + struct Lookup; struct HashPolicy; diff --git a/layout/base/nsCSSRenderingBorders.cpp b/layout/base/nsCSSRenderingBorders.cpp index 4d2b839f13..b8c692a950 100644 --- a/layout/base/nsCSSRenderingBorders.cpp +++ b/layout/base/nsCSSRenderingBorders.cpp @@ -1092,7 +1092,7 @@ nsCSSBorderRenderer::CreateCornerGradient(mozilla::css::Corner aCorner, aPoint2 = tmp; gs = gfxGradientCache::GetOrCreateGradientStops(aDT, rawStops, ExtendMode::CLAMP); } - return gs; + return gs.forget(); } typedef struct { Float a, b; } twoFloats; diff --git a/layout/ipc/VsyncChild.h b/layout/ipc/VsyncChild.h index de41db7301..25b007037c 100644 --- a/layout/ipc/VsyncChild.h +++ b/layout/ipc/VsyncChild.h @@ -8,7 +8,7 @@ #include "mozilla/layout/PVsyncChild.h" #include "nsISupportsImpl.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" namespace mozilla { diff --git a/layout/ipc/VsyncParent.h b/layout/ipc/VsyncParent.h index 4b8e3e02e1..507fe94272 100644 --- a/layout/ipc/VsyncParent.h +++ b/layout/ipc/VsyncParent.h @@ -9,7 +9,7 @@ #include "mozilla/layout/PVsyncParent.h" #include "mozilla/VsyncDispatcher.h" #include "nsCOMPtr.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" class nsIThread; diff --git a/layout/svg/nsSVGMaskFrame.cpp b/layout/svg/nsSVGMaskFrame.cpp index 6e42938014..94f907919f 100644 --- a/layout/svg/nsSVGMaskFrame.cpp +++ b/layout/svg/nsSVGMaskFrame.cpp @@ -333,7 +333,7 @@ nsSVGMaskFrame::GetMaskForMaskedFrame(gfxContext* aContext, } *aMaskTransform = ToMatrix(maskSurfaceMatrix); - return destMaskSurface; + return destMaskSurface.forget(); } nsresult diff --git a/media/libstagefright/binding/Index.cpp b/media/libstagefright/binding/Index.cpp index f5ec74e94a..5eca7f0e09 100644 --- a/media/libstagefright/binding/Index.cpp +++ b/media/libstagefright/binding/Index.cpp @@ -8,7 +8,7 @@ #include "mp4_demuxer/MoofParser.h" #include "mp4_demuxer/SinfParser.h" #include "nsAutoPtr.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include #include diff --git a/media/libstagefright/binding/include/mp4_demuxer/DecoderData.h b/media/libstagefright/binding/include/mp4_demuxer/DecoderData.h index 39fdcaa7b5..72ca168511 100644 --- a/media/libstagefright/binding/include/mp4_demuxer/DecoderData.h +++ b/media/libstagefright/binding/include/mp4_demuxer/DecoderData.h @@ -9,7 +9,7 @@ #include "MediaInfo.h" #include "mozilla/Types.h" #include "mozilla/Vector.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsString.h" #include "nsString.h" #include "nsTArray.h" diff --git a/media/libstagefright/binding/include/mp4_demuxer/ResourceStream.h b/media/libstagefright/binding/include/mp4_demuxer/ResourceStream.h index c2157cc456..ac4236f6d0 100644 --- a/media/libstagefright/binding/include/mp4_demuxer/ResourceStream.h +++ b/media/libstagefright/binding/include/mp4_demuxer/ResourceStream.h @@ -7,7 +7,7 @@ #include "MediaResource.h" #include "mp4_demuxer/Stream.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" namespace mp4_demuxer { diff --git a/media/mtransport/dtlsidentity.cpp b/media/mtransport/dtlsidentity.cpp index d9571b110f..7e17c98e72 100644 --- a/media/mtransport/dtlsidentity.cpp +++ b/media/mtransport/dtlsidentity.cpp @@ -150,7 +150,9 @@ TemporaryRef DtlsIdentity::Generate() { } certificate->derCert = *signedCert; - return new DtlsIdentity(private_key.forget(), certificate.forget()); + RefPtr identity = + new DtlsIdentity(private_key.forget(), certificate.forget()); + return identity.forget(); } diff --git a/mfbt/Attributes.h b/mfbt/Attributes.h index 2e1c9bf30a..4bdae1f537 100644 --- a/mfbt/Attributes.h +++ b/mfbt/Attributes.h @@ -320,6 +320,55 @@ # define MOZ_WARN_UNUSED_RESULT #endif +/* + * MOZ_OVERRIDE explicitly indicates that a virtual member function in a class + * overrides a member function of a base class, rather than being a completely + * new member function. MOZ_OVERRIDE should be placed immediately before the + * ';' terminating the member function's declaration, or before '= 0;' if the + * member function is pure. If the member function is defined in the class + * definition, it should appear before the opening brace of the function body. + * + * class Base + * { + * public: + * virtual void f() = 0; + * }; + * class Derived1 : public Base + * { + * public: + * virtual void f() MOZ_OVERRIDE; + * }; + * class Derived2 : public Base + * { + * public: + * virtual void f() MOZ_OVERRIDE = 0; + * }; + * class Derived3 : public Base + * { + * public: + * virtual void f() MOZ_OVERRIDE { } + * }; + * + * In compilers supporting C++11 override controls, MOZ_OVERRIDE *requires* that + * the function marked with it override a member function of a base class: it + * is a compile error if it does not. Otherwise MOZ_OVERRIDE does not affect + * semantics and merely documents the override relationship to the reader (but + * of course must still be used correctly to not break C++11 compilers). + */ +#if defined(__clang__) && __clang_major__ >= 3 +# define MOZ_OVERRIDE override +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) +# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L +# define MOZ_OVERRIDE override +# else +# define MOZ_OVERRIDE /* override */ +# endif +#elif defined(_MSC_VER) && _MSC_VER >= 1400 +# define MOZ_OVERRIDE override +#else +# define MOZ_OVERRIDE /* no override support, or unknown support */ +#endif + /* * The following macros are attributes that support the static analysis plugin * included with Mozilla, and will be implemented (when such support is enabled) diff --git a/mfbt/RefPtr.h b/mfbt/RefPtr.h index ca8d042e73..bc26c9f1db 100644 --- a/mfbt/RefPtr.h +++ b/mfbt/RefPtr.h @@ -13,6 +13,7 @@ #include "mozilla/Assertions.h" #include "mozilla/Atomics.h" #include "mozilla/Attributes.h" +#include "mozilla/Move.h" #include "mozilla/RefCounted.h" #include "mozilla/RefCountType.h" #include "mozilla/TypeTraits.h" @@ -103,8 +104,6 @@ public: operator T*() const { return mPtr; } T* operator->() const MOZ_NO_ADDREF_RELEASE_ON_RETURN { return mPtr; } T& operator*() const { return *mPtr; } - template - operator TemporaryRef() { return TemporaryRef(mPtr); } private: void assign(T* aVal) @@ -146,7 +145,12 @@ class TemporaryRef typedef typename RefPtr::DontRef DontRef; public: - MOZ_IMPLICIT TemporaryRef(T* aVal) : mPtr(RefPtr::ref(aVal)) {} + // Please see already_AddRefed for a description of what these constructors + // do. + TemporaryRef() : mPtr(nullptr) {} + typedef void (TemporaryRef::* MatchNullptr)(double, float); + MOZ_IMPLICIT TemporaryRef(MatchNullptr aRawPtr) : mPtr(nullptr) {} + explicit TemporaryRef(T* aVal) : mPtr(RefPtr::ref(aVal)) {} TemporaryRef(const TemporaryRef& aOther) : mPtr(aOther.take()) {} template @@ -166,7 +170,6 @@ private: mutable T* MOZ_OWNING_REF mPtr; - TemporaryRef() = delete; void operator=(const TemporaryRef&) = delete; }; @@ -218,6 +221,28 @@ byRef(RefPtr& aPtr) return OutParamRef(aPtr); } +/** + * Helper function to be able to conveniently write things like: + * + * TemporaryRef + * f(...) + * { + * return MakeAndAddRef(...); + * } + * + * since explicitly constructing TemporaryRef is unsightly. Having an + * explicit construction of TemporaryRef from T* also inhibits a future + * auto-conversion from TemporaryRef to already_AddRefed, since the semantics + * of TemporaryRef(T*) differ from already_AddRefed(T*). + */ +template +TemporaryRef +MakeAndAddRef(Args&&... aArgs) +{ + RefPtr p(new T(Forward(aArgs)...)); + return p.forget(); +} + } // namespace mozilla #endif /* mozilla_RefPtr_h */ diff --git a/mfbt/moz.build b/mfbt/moz.build index c153725701..96fa58f029 100644 --- a/mfbt/moz.build +++ b/mfbt/moz.build @@ -52,6 +52,7 @@ EXPORTS.mozilla = [ 'MemoryChecking.h', 'MemoryReporting.h', 'Move.h', + 'nsRefPtr.h', 'NullPtr.h', 'NumericLimits.h', 'Opaque.h', diff --git a/xpcom/base/nsRefPtr.h b/mfbt/nsRefPtr.h similarity index 89% rename from xpcom/base/nsRefPtr.h rename to mfbt/nsRefPtr.h index c3b98d189d..89da079d0c 100644 --- a/xpcom/base/nsRefPtr.h +++ b/mfbt/nsRefPtr.h @@ -4,13 +4,12 @@ * 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 nsRefPtr_h -#define nsRefPtr_h +#ifndef mozilla_nsRefPtr_h +#define mozilla_nsRefPtr_h #include "mozilla/AlreadyAddRefed.h" +#include "mozilla/Assertions.h" #include "mozilla/Attributes.h" -#include "nsDebug.h" -#include "nsISupportsUtils.h" /*****************************************************************************/ @@ -201,7 +200,7 @@ public: // parameters where aRhs bay be a T** or an I** where I is a base class // of T. { - NS_ASSERTION(aRhs, "Null pointer passed to forget!"); + MOZ_ASSERT(aRhs, "Null pointer passed to forget!"); *aRhs = mRawPtr; mRawPtr = 0; } @@ -232,8 +231,8 @@ public: T* operator->() const MOZ_NO_ADDREF_RELEASE_ON_RETURN { - NS_PRECONDITION(mRawPtr != 0, - "You can't dereference a NULL nsRefPtr with operator->()."); + MOZ_ASSERT(mRawPtr != 0, + "You can't dereference a NULL nsRefPtr with operator->()."); return get(); } @@ -245,8 +244,8 @@ public: U& operator->*(U V::* aMember) { - NS_PRECONDITION(mRawPtr != 0, - "You can't dereference a NULL nsRefPtr with operator->*()."); + MOZ_ASSERT(mRawPtr != 0, + "You can't dereference a NULL nsRefPtr with operator->*()."); return get()->*aMember; } #endif @@ -271,8 +270,8 @@ public: T& operator*() const { - NS_PRECONDITION(mRawPtr != 0, - "You can't dereference a NULL nsRefPtr with operator*()."); + MOZ_ASSERT(mRawPtr != 0, + "You can't dereference a NULL nsRefPtr with operator*()."); return *get(); } @@ -284,28 +283,6 @@ public: } }; -template -nsRefPtr::nsRefPtr(const nsCOMPtr_helper& aHelper) -{ - void* newRawPtr; - if (NS_FAILED(aHelper(NS_GET_TEMPLATE_IID(T), &newRawPtr))) { - newRawPtr = 0; - } - mRawPtr = static_cast(newRawPtr); -} - -template -nsRefPtr& -nsRefPtr::operator=(const nsCOMPtr_helper& aHelper) -{ - void* newRawPtr; - if (NS_FAILED(aHelper(NS_GET_TEMPLATE_IID(T), &newRawPtr))) { - newRawPtr = 0; - } - assign_assuming_AddRef(static_cast(newRawPtr)); - return *this; -} - class nsCycleCollectionTraversalCallback; template void @@ -517,14 +494,6 @@ operator!=(::detail::nsRefPtrZero* aLhs, const nsRefPtr& aRhs) return reinterpret_cast(aLhs) != static_cast(aRhs.get()); } - -template -inline nsresult -CallQueryInterface(nsRefPtr& aSourcePtr, DestinationType** aDestPtr) -{ - return CallQueryInterface(aSourcePtr.get(), aDestPtr); -} - /*****************************************************************************/ -#endif // !defined(nsRefPtr_h) +#endif /* mozilla_nsRefPtr_h */ diff --git a/mfbt/tests/TestRefPtr.cpp b/mfbt/tests/TestRefPtr.cpp index 6364e4f778..1b281fb4aa 100644 --- a/mfbt/tests/TestRefPtr.cpp +++ b/mfbt/tests/TestRefPtr.cpp @@ -37,13 +37,15 @@ struct Bar : public Foo {}; TemporaryRef NewFoo() { - return RefPtr(new Foo()); + RefPtr f(new Foo()); + return f.forget(); } TemporaryRef NewBar() { - return new Bar(); + RefPtr bar = new Bar(); + return bar.forget(); } void diff --git a/mozglue/linker/BaseElf.cpp b/mozglue/linker/BaseElf.cpp index 9fb8a6f723..2eadf12403 100644 --- a/mozglue/linker/BaseElf.cpp +++ b/mozglue/linker/BaseElf.cpp @@ -170,7 +170,7 @@ LoadedElf::Create(const char *path, void *base_addr) static_cast(elf)); ElfLoader::Singleton.Register(elf); - return elf; + return elf.forget(); } bool diff --git a/mozglue/linker/CustomElf.cpp b/mozglue/linker/CustomElf.cpp index 66ffde7e9e..1e23aed5ba 100644 --- a/mozglue/linker/CustomElf.cpp +++ b/mozglue/linker/CustomElf.cpp @@ -263,7 +263,7 @@ CustomElf::Load(Mappable *mappable, const char *path, int flags) } DEBUG_LOG("CustomElf::Load(\"%s\", 0x%x) = %p", path, flags, static_cast(elf)); - return elf; + return elf.forget(); } CustomElf::~CustomElf() diff --git a/mozglue/linker/ElfLoader.cpp b/mozglue/linker/ElfLoader.cpp index 34da1dfc82..b8c2ae726d 100644 --- a/mozglue/linker/ElfLoader.cpp +++ b/mozglue/linker/ElfLoader.cpp @@ -268,7 +268,8 @@ SystemElf::Load(const char *path, int flags) if (handle) { SystemElf *elf = new SystemElf(path, handle); ElfLoader::Singleton.Register(elf); - return elf; + RefPtr lib(elf); + return lib.forget(); } return nullptr; } @@ -345,7 +346,7 @@ ElfLoader::Load(const char *path, int flags, LibHandle *parent) /* Handle dlopen(nullptr) directly. */ if (!path) { handle = SystemElf::Load(nullptr, flags); - return handle; + return handle.forget(); } /* TODO: Handle relative paths correctly */ @@ -355,12 +356,16 @@ ElfLoader::Load(const char *path, int flags, LibHandle *parent) * path is not absolute, compare file names, otherwise compare full paths. */ if (name == path) { for (LibHandleList::iterator it = handles.begin(); it < handles.end(); ++it) - if ((*it)->GetName() && (strcmp((*it)->GetName(), name) == 0)) - return *it; + if ((*it)->GetName() && (strcmp((*it)->GetName(), name) == 0)) { + handle = *it; + return handle.forget(); + } } else { for (LibHandleList::iterator it = handles.begin(); it < handles.end(); ++it) - if ((*it)->GetPath() && (strcmp((*it)->GetPath(), path) == 0)) - return *it; + if ((*it)->GetPath() && (strcmp((*it)->GetPath(), path) == 0)) { + handle = *it; + return handle.forget(); + } } char *abs_path = nullptr; @@ -398,7 +403,7 @@ ElfLoader::Load(const char *path, int flags, LibHandle *parent) reinterpret_cast(parent), parent ? parent->GetPath() : "", static_cast(handle)); - return handle; + return handle.forget(); } mozilla::TemporaryRef @@ -406,8 +411,10 @@ ElfLoader::GetHandleByPtr(void *addr) { /* Scan the list of handles we already have for a match */ for (LibHandleList::iterator it = handles.begin(); it < handles.end(); ++it) { - if ((*it)->Contains(addr)) - return *it; + if ((*it)->Contains(addr)) { + RefPtr lib = *it; + return lib.forget(); + } } return nullptr; } diff --git a/mozglue/linker/Zip.cpp b/mozglue/linker/Zip.cpp index d837578baa..80628e59b7 100644 --- a/mozglue/linker/Zip.cpp +++ b/mozglue/linker/Zip.cpp @@ -54,7 +54,7 @@ Zip::Create(const char *filename, void *mapped, size_t size) } ZipCollection::Singleton.Register(zip); - return zip; + return zip.forget(); } Zip::Zip(const char *filename, void *mapped, size_t size) @@ -187,8 +187,10 @@ ZipCollection::GetZip(const char *path) /* Search the list of Zips we already have for a match */ for (std::vector::iterator it = Singleton.zips.begin(); it < Singleton.zips.end(); ++it) { - if ((*it)->GetName() && (strcmp((*it)->GetName(), path) == 0)) - return *it; + if ((*it)->GetName() && (strcmp((*it)->GetName(), path) == 0)) { + mozilla::RefPtr zip = *it; + return zip.forget(); + } } return Zip::Create(path); } diff --git a/netwerk/base/Predictor.h b/netwerk/base/Predictor.h index 2f030c9599..f9af609325 100644 --- a/netwerk/base/Predictor.h +++ b/netwerk/base/Predictor.h @@ -16,7 +16,7 @@ #include "nsIInterfaceRequestor.h" #include "nsIObserver.h" #include "nsISpeculativeConnect.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsString.h" #include "nsTArray.h" diff --git a/netwerk/dns/effective_tld_names.dat b/netwerk/dns/effective_tld_names.dat index 601fae79ad..f9e6ea9109 100644 --- a/netwerk/dns/effective_tld_names.dat +++ b/netwerk/dns/effective_tld_names.dat @@ -1,10 +1,15 @@ // 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/. +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +// Please pull this list from, and only from https://publicsuffix.org/list/public_suffix_list.dat, +// rather than any other VCS sites. Pulling from any other URL is not guaranteed to be supported. + +// Instructions on pulling and using this list can be found at https://publicsuffix.org/list/. // ===BEGIN ICANN DOMAINS=== -// ac : http://en.wikipedia.org/wiki/.ac +// ac : https://en.wikipedia.org/wiki/.ac ac com.ac edu.ac @@ -13,11 +18,11 @@ net.ac mil.ac org.ac -// ad : http://en.wikipedia.org/wiki/.ad +// ad : https://en.wikipedia.org/wiki/.ad ad nom.ad -// ae : http://en.wikipedia.org/wiki/.ae +// ae : https://en.wikipedia.org/wiki/.ae // see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php ae co.ae @@ -28,7 +33,7 @@ ac.ae gov.ae mil.ae -// aero : see http://www.information.aero/index.php?id=66 +// aero : see https://www.information.aero/index.php?id=66 aero accident-investigation.aero accident-prevention.aero @@ -89,7 +94,6 @@ leasing.aero logistics.aero magazine.aero maintenance.aero -marketplace.aero media.aero microlight.aero modelling.aero @@ -112,7 +116,6 @@ show.aero skydiving.aero software.aero student.aero -taxi.aero trader.aero trading.aero trainer.aero @@ -152,17 +155,10 @@ mil.al net.al org.al -// am : http://en.wikipedia.org/wiki/.am +// am : https://en.wikipedia.org/wiki/.am am -// an : http://www.una.an/an_domreg/default.asp -an -com.an -net.an -org.an -edu.an - -// ao : http://en.wikipedia.org/wiki/.ao +// ao : https://en.wikipedia.org/wiki/.ao // http://www.dns.ao/REGISTR.DOC ao ed.ao @@ -172,10 +168,10 @@ co.ao pb.ao it.ao -// aq : http://en.wikipedia.org/wiki/.aq +// aq : https://en.wikipedia.org/wiki/.aq aq -// ar : https://nic.ar/normativa-vigente.xhtml +// ar : https://nic.ar/nic-argentina/normativa-vigente ar com.ar edu.ar @@ -183,11 +179,12 @@ gob.ar gov.ar int.ar mil.ar +musica.ar net.ar org.ar tur.ar -// arpa : http://en.wikipedia.org/wiki/.arpa +// arpa : https://en.wikipedia.org/wiki/.arpa // Confirmed by registry 2008-06-18 arpa e164.arpa @@ -197,14 +194,14 @@ iris.arpa uri.arpa urn.arpa -// as : http://en.wikipedia.org/wiki/.as +// as : https://en.wikipedia.org/wiki/.as as gov.as -// asia : http://en.wikipedia.org/wiki/.asia +// asia : https://en.wikipedia.org/wiki/.asia asia -// at : http://en.wikipedia.org/wiki/.at +// at : https://en.wikipedia.org/wiki/.at // Confirmed by registry 2008-06-17 at ac.at @@ -212,7 +209,7 @@ co.at gv.at or.at -// au : http://en.wikipedia.org/wiki/.au +// au : https://en.wikipedia.org/wiki/.au // http://www.auda.org.au/ au // 2LDs @@ -254,14 +251,14 @@ tas.gov.au vic.gov.au wa.gov.au -// aw : http://en.wikipedia.org/wiki/.aw +// aw : https://en.wikipedia.org/wiki/.aw aw com.aw -// ax : http://en.wikipedia.org/wiki/.ax +// ax : https://en.wikipedia.org/wiki/.ax ax -// az : http://en.wikipedia.org/wiki/.az +// az : https://en.wikipedia.org/wiki/.az az com.az net.az @@ -276,20 +273,16 @@ name.az pro.az biz.az -// ba : http://en.wikipedia.org/wiki/.ba +// ba : http://nic.ba/users_data/files/pravilnik_o_registraciji.pdf ba -org.ba -net.ba +com.ba edu.ba gov.ba mil.ba -unsa.ba -unbi.ba -co.ba -com.ba -rs.ba +net.ba +org.ba -// bb : http://en.wikipedia.org/wiki/.bb +// bb : https://en.wikipedia.org/wiki/.bb bb biz.bb co.bb @@ -302,19 +295,19 @@ org.bb store.bb tv.bb -// bd : http://en.wikipedia.org/wiki/.bd +// bd : https://en.wikipedia.org/wiki/.bd *.bd -// be : http://en.wikipedia.org/wiki/.be +// be : https://en.wikipedia.org/wiki/.be // Confirmed by registry 2008-06-08 be ac.be -// bf : http://en.wikipedia.org/wiki/.bf +// bf : https://en.wikipedia.org/wiki/.bf bf gov.bf -// bg : http://en.wikipedia.org/wiki/.bg +// bg : https://en.wikipedia.org/wiki/.bg // https://www.register.bg/user/static/rules/en/index.html bg a.bg @@ -354,7 +347,7 @@ z.bg 8.bg 9.bg -// bh : http://en.wikipedia.org/wiki/.bh +// bh : https://en.wikipedia.org/wiki/.bh bh com.bh edu.bh @@ -362,7 +355,7 @@ net.bh org.bh gov.bh -// bi : http://en.wikipedia.org/wiki/.bi +// bi : https://en.wikipedia.org/wiki/.bi // http://whois.nic.bi/ bi co.bi @@ -371,10 +364,10 @@ edu.bi or.bi org.bi -// biz : http://en.wikipedia.org/wiki/.biz +// biz : https://en.wikipedia.org/wiki/.biz biz -// bj : http://en.wikipedia.org/wiki/.bj +// bj : https://en.wikipedia.org/wiki/.bj bj asso.bj barreau.bj @@ -388,40 +381,96 @@ gov.bm net.bm org.bm -// bn : http://en.wikipedia.org/wiki/.bn -*.bn +// bn : http://www.bnnic.bn/faqs +bn +com.bn +edu.bn +gov.bn +net.bn +org.bn -// bo : http://www.nic.bo/ +// bo : https://nic.bo/delegacion2015.php#h-1.10 bo com.bo edu.bo -gov.bo gob.bo int.bo org.bo net.bo mil.bo tv.bo +web.bo +// Social Domains +academia.bo +agro.bo +arte.bo +blog.bo +bolivia.bo +ciencia.bo +cooperativa.bo +democracia.bo +deporte.bo +ecologia.bo +economia.bo +empresa.bo +indigena.bo +industria.bo +info.bo +medicina.bo +movimiento.bo +musica.bo +natural.bo +nombre.bo +noticias.bo +patria.bo +politica.bo +profesional.bo +plurinacional.bo +pueblo.bo +revista.bo +salud.bo +tecnologia.bo +tksat.bo +transporte.bo +wiki.bo // br : http://registro.br/dominio/categoria.html -// Submitted by registry 2014-08-11 +// Submitted by registry br +9guacu.br +abc.br adm.br adv.br agr.br +aju.br am.br +anani.br +aparecida.br arq.br art.br ato.br b.br +barueri.br +belem.br +bhz.br bio.br blog.br bmd.br +boavista.br +bsb.br +campinagrande.br +campinas.br +caxias.br cim.br cng.br cnt.br com.br +contagem.br coop.br +cri.br +cuiaba.br +curitiba.br +def.br ecn.br eco.br edu.br @@ -431,48 +480,116 @@ esp.br etc.br eti.br far.br +feira.br flog.br +floripa.br fm.br fnd.br +fortal.br fot.br +foz.br fst.br g12.br ggf.br +goiania.br gov.br +// gov.br 26 states + df https://en.wikipedia.org/wiki/States_of_Brazil +ac.gov.br +al.gov.br +am.gov.br +ap.gov.br +ba.gov.br +ce.gov.br +df.gov.br +es.gov.br +go.gov.br +ma.gov.br +mg.gov.br +ms.gov.br +mt.gov.br +pa.gov.br +pb.gov.br +pe.gov.br +pi.gov.br +pr.gov.br +rj.gov.br +rn.gov.br +ro.gov.br +rr.gov.br +rs.gov.br +sc.gov.br +se.gov.br +sp.gov.br +to.gov.br +gru.br imb.br ind.br inf.br +jab.br +jampa.br +jdf.br +joinville.br jor.br jus.br leg.br lel.br +londrina.br +macapa.br +maceio.br +manaus.br +maringa.br mat.br med.br mil.br +morena.br mp.br mus.br +natal.br net.br +niteroi.br *.nom.br not.br ntr.br odo.br +ong.br org.br +osasco.br +palmas.br +poa.br ppg.br pro.br psc.br psi.br +pvh.br qsl.br radio.br rec.br +recife.br +ribeirao.br +rio.br +riobranco.br +riopreto.br +salvador.br +sampa.br +santamaria.br +santoandre.br +saobernardo.br +saogonca.br +sjc.br slg.br +slz.br +sorocaba.br srv.br taxi.br teo.br +the.br tmp.br trd.br tur.br tv.br +udi.br vet.br +vix.br vlog.br wiki.br zlg.br @@ -485,7 +602,7 @@ org.bs edu.bs gov.bs -// bt : http://en.wikipedia.org/wiki/.bt +// bt : https://en.wikipedia.org/wiki/.bt bt com.bt edu.bt @@ -494,17 +611,17 @@ net.bt org.bt // bv : No registrations at this time. -// Submitted by registry 2006-06-16 +// Submitted by registry bv -// bw : http://en.wikipedia.org/wiki/.bw +// bw : https://en.wikipedia.org/wiki/.bw // http://www.gobin.info/domainname/bw.doc // list of other 2nd level tlds ? bw co.bw org.bw -// by : http://en.wikipedia.org/wiki/.by +// by : https://en.wikipedia.org/wiki/.by // http://tld.by/rules_2006_en.html // list of other 2nd level tlds ? by @@ -518,7 +635,7 @@ com.by // http://hoster.by/ of.by -// bz : http://en.wikipedia.org/wiki/.bz +// bz : https://en.wikipedia.org/wiki/.bz // http://www.belizenic.bz/ bz com.bz @@ -527,7 +644,7 @@ org.bz edu.bz gov.bz -// ca : http://en.wikipedia.org/wiki/.ca +// ca : https://en.wikipedia.org/wiki/.ca ca // ca geographical names ab.ca @@ -544,31 +661,31 @@ pe.ca qc.ca sk.ca yk.ca -// gc.ca: http://en.wikipedia.org/wiki/.gc.ca +// gc.ca: https://en.wikipedia.org/wiki/.gc.ca // see also: http://registry.gc.ca/en/SubdomainFAQ gc.ca -// cat : http://en.wikipedia.org/wiki/.cat +// cat : https://en.wikipedia.org/wiki/.cat cat -// cc : http://en.wikipedia.org/wiki/.cc +// cc : https://en.wikipedia.org/wiki/.cc cc -// cd : http://en.wikipedia.org/wiki/.cd +// cd : https://en.wikipedia.org/wiki/.cd // see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1 cd gov.cd -// cf : http://en.wikipedia.org/wiki/.cf +// cf : https://en.wikipedia.org/wiki/.cf cf -// cg : http://en.wikipedia.org/wiki/.cg +// cg : https://en.wikipedia.org/wiki/.cg cg -// ch : http://en.wikipedia.org/wiki/.ch +// ch : https://en.wikipedia.org/wiki/.ch ch -// ci : http://en.wikipedia.org/wiki/.ci +// ci : https://en.wikipedia.org/wiki/.ci // http://www.nic.ci/index.php?page=charte ci org.ci @@ -587,26 +704,26 @@ presse.ci md.ci gouv.ci -// ck : http://en.wikipedia.org/wiki/.ck +// ck : https://en.wikipedia.org/wiki/.ck *.ck !www.ck -// cl : http://en.wikipedia.org/wiki/.cl +// cl : https://en.wikipedia.org/wiki/.cl cl gov.cl gob.cl co.cl mil.cl -// cm : http://en.wikipedia.org/wiki/.cm plus bug 981927 +// cm : https://en.wikipedia.org/wiki/.cm plus bug 981927 cm co.cm com.cm gov.cm net.cm -// cn : http://en.wikipedia.org/wiki/.cn -// Submitted by registry 2008-06-11 +// cn : https://en.wikipedia.org/wiki/.cn +// Submitted by registry cn ac.cn com.cn @@ -654,8 +771,8 @@ hk.cn mo.cn tw.cn -// co : http://en.wikipedia.org/wiki/.co -// Submitted by registry 2008-06-11 +// co : https://en.wikipedia.org/wiki/.co +// Submitted by registry co arts.co com.co @@ -671,10 +788,10 @@ org.co rec.co web.co -// com : http://en.wikipedia.org/wiki/.com +// com : https://en.wikipedia.org/wiki/.com com -// coop : http://en.wikipedia.org/wiki/.coop +// coop : https://en.wikipedia.org/wiki/.coop coop // cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do @@ -687,7 +804,7 @@ go.cr or.cr sa.cr -// cu : http://en.wikipedia.org/wiki/.cu +// cu : https://en.wikipedia.org/wiki/.cu cu com.cu edu.cu @@ -696,7 +813,7 @@ net.cu gov.cu inf.cu -// cv : http://en.wikipedia.org/wiki/.cv +// cv : https://en.wikipedia.org/wiki/.cv cv // cw : http://www.una.cw/cw_registry/ @@ -707,30 +824,44 @@ edu.cw net.cw org.cw -// cx : http://en.wikipedia.org/wiki/.cx +// cx : https://en.wikipedia.org/wiki/.cx // list of other 2nd level tlds ? cx gov.cx -// cy : http://en.wikipedia.org/wiki/.cy -*.cy +// cy : http://www.nic.cy/ +// Submitted by registry Panayiotou Fotia +cy +ac.cy +biz.cy +com.cy +ekloges.cy +gov.cy +ltd.cy +name.cy +net.cy +org.cy +parliament.cy +press.cy +pro.cy +tm.cy -// cz : http://en.wikipedia.org/wiki/.cz +// cz : https://en.wikipedia.org/wiki/.cz cz -// de : http://en.wikipedia.org/wiki/.de +// de : https://en.wikipedia.org/wiki/.de // Confirmed by registry (with technical // reservations) 2008-07-01 de -// dj : http://en.wikipedia.org/wiki/.dj +// dj : https://en.wikipedia.org/wiki/.dj dj -// dk : http://en.wikipedia.org/wiki/.dk +// dk : https://en.wikipedia.org/wiki/.dk // Confirmed by registry 2008-06-17 dk -// dm : http://en.wikipedia.org/wiki/.dm +// dm : https://en.wikipedia.org/wiki/.dm dm com.dm net.dm @@ -738,7 +869,7 @@ org.dm edu.dm gov.dm -// do : http://en.wikipedia.org/wiki/.do +// do : https://en.wikipedia.org/wiki/.do do art.do com.do @@ -751,7 +882,7 @@ org.do sld.do web.do -// dz : http://en.wikipedia.org/wiki/.dz +// dz : https://en.wikipedia.org/wiki/.dz dz com.dz org.dz @@ -763,7 +894,7 @@ pol.dz art.dz // ec : http://www.nic.ec/reg/paso1.asp -// Submitted by registry 2008-07-04 +// Submitted by registry ec com.ec info.ec @@ -778,7 +909,7 @@ gov.ec gob.ec mil.ec -// edu : http://en.wikipedia.org/wiki/.edu +// edu : https://en.wikipedia.org/wiki/.edu edu // ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B @@ -794,7 +925,7 @@ aip.ee org.ee fie.ee -// eg : http://en.wikipedia.org/wiki/.eg +// eg : https://en.wikipedia.org/wiki/.eg eg com.eg edu.eg @@ -806,7 +937,7 @@ net.eg org.eg sci.eg -// er : http://en.wikipedia.org/wiki/.er +// er : https://en.wikipedia.org/wiki/.er *.er // es : https://www.nic.es/site_ingles/ingles/dominios/index.html @@ -817,7 +948,7 @@ org.es gob.es edu.es -// et : http://en.wikipedia.org/wiki/.et +// et : https://en.wikipedia.org/wiki/.et et com.et gov.et @@ -826,29 +957,30 @@ edu.et biz.et name.et info.et +net.et -// eu : http://en.wikipedia.org/wiki/.eu +// eu : https://en.wikipedia.org/wiki/.eu eu -// fi : http://en.wikipedia.org/wiki/.fi +// fi : https://en.wikipedia.org/wiki/.fi fi -// aland.fi : http://en.wikipedia.org/wiki/.ax +// aland.fi : https://en.wikipedia.org/wiki/.ax // This domain is being phased out in favor of .ax. As there are still many // domains under aland.fi, we still keep it on the list until aland.fi is // completely removed. // TODO: Check for updates (expected to be phased out around Q1/2009) aland.fi -// fj : http://en.wikipedia.org/wiki/.fj +// fj : https://en.wikipedia.org/wiki/.fj *.fj -// fk : http://en.wikipedia.org/wiki/.fk +// fk : https://en.wikipedia.org/wiki/.fk *.fk -// fm : http://en.wikipedia.org/wiki/.fm +// fm : https://en.wikipedia.org/wiki/.fm fm -// fo : http://en.wikipedia.org/wiki/.fo +// fo : https://en.wikipedia.org/wiki/.fo fo // fr : http://www.afnic.fr/ @@ -879,14 +1011,14 @@ pharmacien.fr port.fr veterinaire.fr -// ga : http://en.wikipedia.org/wiki/.ga +// ga : https://en.wikipedia.org/wiki/.ga ga // gb : This registry is effectively dormant -// Submitted by registry 2008-06-12 +// Submitted by registry gb -// gd : http://en.wikipedia.org/wiki/.gd +// gd : https://en.wikipedia.org/wiki/.gd gd // ge : http://www.nic.net.ge/policy_en.pdf @@ -899,7 +1031,7 @@ mil.ge net.ge pvt.ge -// gf : http://en.wikipedia.org/wiki/.gf +// gf : https://en.wikipedia.org/wiki/.gf gf // gg : http://www.channelisles.net/register-domains/ @@ -909,7 +1041,7 @@ co.gg net.gg org.gg -// gh : http://en.wikipedia.org/wiki/.gh +// gh : https://en.wikipedia.org/wiki/.gh // see also: http://www.nic.gh/reg_now.php // Although domains directly at second level are not possible at the moment, // they have been possible for some time and may come back. @@ -929,15 +1061,20 @@ mod.gi edu.gi org.gi -// gl : http://en.wikipedia.org/wiki/.gl +// gl : https://en.wikipedia.org/wiki/.gl // http://nic.gl gl +co.gl +com.gl +edu.gl +net.gl +org.gl // gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm gm // gn : http://psg.com/dns/gn/gn.txt -// Submitted by registry 2008-06-17 +// Submitted by registry gn ac.gn com.gn @@ -946,7 +1083,7 @@ gov.gn org.gn net.gn -// gov : http://en.wikipedia.org/wiki/.gov +// gov : https://en.wikipedia.org/wiki/.gov gov // gp : http://www.nic.gp/index.php?lang=en @@ -958,11 +1095,11 @@ edu.gp org.gp asso.gp -// gq : http://en.wikipedia.org/wiki/.gq +// gq : https://en.wikipedia.org/wiki/.gq gq // gr : https://grweb.ics.forth.gr/english/1617-B-2005.html -// Submitted by registry 2008-06-09 +// Submitted by registry gr com.gr edu.gr @@ -970,7 +1107,7 @@ net.gr org.gr gov.gr -// gs : http://en.wikipedia.org/wiki/.gs +// gs : https://en.wikipedia.org/wiki/.gs gs // gt : http://www.gt/politicas_de_registro.html @@ -983,21 +1120,34 @@ mil.gt net.gt org.gt -// gu : http://gadao.gov.gu/registration.txt -*.gu +// gu : http://gadao.gov.gu/register.html +// University of Guam : https://www.uog.edu +// Submitted by uognoc@triton.uog.edu +gu +com.gu +edu.gu +gov.gu +guam.gu +info.gu +net.gu +org.gu +web.gu -// gw : http://en.wikipedia.org/wiki/.gw +// gw : https://en.wikipedia.org/wiki/.gw gw -// gy : http://en.wikipedia.org/wiki/.gy +// gy : https://en.wikipedia.org/wiki/.gy // http://registry.gy/ gy co.gy com.gy +edu.gy +gov.gy net.gy +org.gy -// hk : https://www.hkdnr.hk -// Submitted by registry 2008-06-11 +// hk : https://www.hkirc.hk +// Submitted by registry hk com.hk edu.hk @@ -1021,7 +1171,7 @@ org.hk 組織.hk 組织.hk -// hm : http://en.wikipedia.org/wiki/.hm +// hm : https://en.wikipedia.org/wiki/.hm hm // hn : http://www.nic.hn/politicas/ps02,,05.html @@ -1095,7 +1245,7 @@ tozsde.hu utazas.hu video.hu -// id : https://register.pandi.or.id/ +// id : https://pandi.id/en/domain/registration-requirements/ id ac.id biz.id @@ -1106,18 +1256,27 @@ mil.id my.id net.id or.id +ponpes.id sch.id web.id -// ie : http://en.wikipedia.org/wiki/.ie +// ie : https://en.wikipedia.org/wiki/.ie ie gov.ie -// il : http://en.wikipedia.org/wiki/.il -*.il +// il : http://www.isoc.org.il/domains/ +il +ac.il +co.il +gov.il +idf.il +k12.il +muni.il +net.il +org.il // im : https://www.nic.im/ -// Submitted by registry 2013-11-15 +// Submitted by registry im ac.im co.im @@ -1129,9 +1288,9 @@ plc.co.im tt.im tv.im -// in : http://en.wikipedia.org/wiki/.in +// in : https://en.wikipedia.org/wiki/.in // see also: https://registry.in/Policies -// Please note, that nic.in is not an offical eTLD, but used by most +// Please note, that nic.in is not an official eTLD, but used by most // government institutions. in co.in @@ -1147,10 +1306,10 @@ res.in gov.in mil.in -// info : http://en.wikipedia.org/wiki/.info +// info : https://en.wikipedia.org/wiki/.info info -// int : http://en.wikipedia.org/wiki/.int +// int : https://en.wikipedia.org/wiki/.int // Confirmed by registry 2008-06-18 int eu.int @@ -1195,14 +1354,12 @@ gov.is org.is int.is -// it : http://en.wikipedia.org/wiki/.it +// it : https://en.wikipedia.org/wiki/.it it gov.it edu.it -// Reserved geo-names: -// http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf -// There is also a list of reserved geo-names corresponding to Italian municipalities -// http://www.nic.it/documenti/appendice-c.pdf, but it is not included here. +// Reserved geo-names (regions and provinces): +// http://www.nic.it/sites/default/files/docs/Regulation_assignation_v7.1.pdf // Regions abr.it abruzzo.it @@ -1256,6 +1413,12 @@ sicily.it taa.it tos.it toscana.it +trentin-sud-tirol.it +trentin-süd-tirol.it +trentin-sudtirol.it +trentin-südtirol.it +trentin-sued-tirol.it +trentin-suedtirol.it trentino-a-adige.it trentino-aadige.it trentino-alto-adige.it @@ -1263,9 +1426,12 @@ trentino-altoadige.it trentino-s-tirol.it trentino-stirol.it trentino-sud-tirol.it +trentino-süd-tirol.it trentino-sudtirol.it +trentino-südtirol.it trentino-sued-tirol.it trentino-suedtirol.it +trentino.it trentinoa-adige.it trentinoaadige.it trentinoalto-adige.it @@ -1273,9 +1439,17 @@ trentinoaltoadige.it trentinos-tirol.it trentinostirol.it trentinosud-tirol.it +trentinosüd-tirol.it trentinosudtirol.it +trentinosüdtirol.it trentinosued-tirol.it trentinosuedtirol.it +trentinsud-tirol.it +trentinsüd-tirol.it +trentinsudtirol.it +trentinsüdtirol.it +trentinsued-tirol.it +trentinsuedtirol.it tuscany.it umb.it umbria.it @@ -1290,7 +1464,13 @@ valleaosta.it valled-aosta.it valledaosta.it vallee-aoste.it +vallée-aoste.it +vallee-d-aoste.it +vallée-d-aoste.it valleeaoste.it +valléeaoste.it +valleedaoste.it +valléedaoste.it vao.it vda.it ven.it @@ -1323,6 +1503,9 @@ at.it av.it avellino.it ba.it +balsan-sudtirol.it +balsan-südtirol.it +balsan-suedtirol.it balsan.it bari.it barletta-trani-andria.it @@ -1337,13 +1520,21 @@ bl.it bn.it bo.it bologna.it +bolzano-altoadige.it bolzano.it +bozen-sudtirol.it +bozen-südtirol.it +bozen-suedtirol.it bozen.it br.it brescia.it brindisi.it bs.it bt.it +bulsan-sudtirol.it +bulsan-südtirol.it +bulsan-suedtirol.it +bulsan.it bz.it ca.it cagliari.it @@ -1361,7 +1552,9 @@ catanzaro.it cb.it ce.it cesena-forli.it +cesena-forlì.it cesenaforli.it +cesenaforlì.it ch.it chieti.it ci.it @@ -1392,7 +1585,9 @@ florence.it fm.it foggia.it forli-cesena.it +forlì-cesena.it forlicesena.it +forlìcesena.it fr.it frosinone.it ge.it @@ -1523,6 +1718,7 @@ sp.it sr.it ss.it suedtirol.it +südtirol.it sv.it ta.it taranto.it @@ -1541,7 +1737,6 @@ trani-barletta-andria.it traniandriabarletta.it tranibarlettaandria.it trapani.it -trentino.it trento.it treviso.it trieste.it @@ -1593,12 +1788,12 @@ gov.jo mil.jo name.jo -// jobs : http://en.wikipedia.org/wiki/.jobs +// jobs : https://en.wikipedia.org/wiki/.jobs jobs -// jp : http://en.wikipedia.org/wiki/.jp +// jp : https://en.wikipedia.org/wiki/.jp // http://jprs.co.jp/en/jpdomain.html -// Submitted by registry 2014-10-30 +// Submitted by registry jp // jp organizational type names ac.jp @@ -2525,11 +2720,8 @@ arao.kumamoto.jp aso.kumamoto.jp choyo.kumamoto.jp gyokuto.kumamoto.jp -hitoyoshi.kumamoto.jp kamiamakusa.kumamoto.jp -kashima.kumamoto.jp kikuchi.kumamoto.jp -kosa.kumamoto.jp kumamoto.kumamoto.jp mashiki.kumamoto.jp mifune.kumamoto.jp @@ -2614,7 +2806,6 @@ iwanuma.miyagi.jp kakuda.miyagi.jp kami.miyagi.jp kawasaki.miyagi.jp -kesennuma.miyagi.jp marumori.miyagi.jp matsushima.miyagi.jp minamisanriku.miyagi.jp @@ -3400,8 +3591,17 @@ uenohara.yamanashi.jp yamanakako.yamanashi.jp yamanashi.yamanashi.jp -// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145 -*.ke +// ke : http://www.kenic.or.ke/index.php/en/ke-domains/ke-domains +ke +ac.ke +co.ke +go.ke +info.ke +me.ke +mobi.ke +ne.ke +or.ke +sc.ke // kg : http://www.domain.kg/dmn_n.html kg @@ -3425,7 +3625,7 @@ gov.ki info.ki com.ki -// km : http://en.wikipedia.org/wiki/.km +// km : https://en.wikipedia.org/wiki/.km // http://www.domaine.km/documents/charte.doc km org.km @@ -3438,7 +3638,7 @@ mil.km ass.km com.km // These are only mentioned as proposed suggestions at domaine.km, but -// http://en.wikipedia.org/wiki/.km says they're available for registration: +// https://en.wikipedia.org/wiki/.km says they're available for registration: coop.km asso.km presse.km @@ -3448,7 +3648,7 @@ pharmaciens.km veterinaire.km gouv.km -// kn : http://en.wikipedia.org/wiki/.kn +// kn : https://en.wikipedia.org/wiki/.kn // http://www.dot.kn/domainRules.html kn net.kn @@ -3465,7 +3665,7 @@ org.kp rep.kp tra.kp -// kr : http://en.wikipedia.org/wiki/.kr +// kr : https://en.wikipedia.org/wiki/.kr // see also: http://domain.nida.or.kr/eng/registration.jsp kr ac.kr @@ -3499,8 +3699,16 @@ jeonnam.kr seoul.kr ulsan.kr -// kw : http://en.wikipedia.org/wiki/.kw -*.kw +// kw : https://www.nic.kw/policies/ +// Confirmed by registry +kw +com.kw +edu.kw +emb.kw +gov.kw +ind.kw +net.kw +org.kw // ky : http://www.icta.ky/da_ky_reg_dom.php // Confirmed by registry 2008-06-17 @@ -3511,7 +3719,7 @@ com.ky org.ky net.ky -// kz : http://en.wikipedia.org/wiki/.kz +// kz : https://en.wikipedia.org/wiki/.kz // see also: http://www.nic.kz/rules/index.jsp kz org.kz @@ -3521,8 +3729,8 @@ gov.kz mil.kz com.kz -// la : http://en.wikipedia.org/wiki/.la -// Submitted by registry 2008-06-10 +// la : https://en.wikipedia.org/wiki/.la +// Submitted by registry la int.la net.la @@ -3533,8 +3741,8 @@ per.la com.la org.la -// lb : http://en.wikipedia.org/wiki/.lb -// Submitted by registry 2008-06-17 +// lb : https://en.wikipedia.org/wiki/.lb +// Submitted by registry lb com.lb edu.lb @@ -3542,7 +3750,7 @@ gov.lb net.lb org.lb -// lc : http://en.wikipedia.org/wiki/.lc +// lc : https://en.wikipedia.org/wiki/.lc // see also: http://www.nic.lc/rules.htm lc com.lc @@ -3552,7 +3760,7 @@ org.lc edu.lc gov.lc -// li : http://en.wikipedia.org/wiki/.li +// li : https://en.wikipedia.org/wiki/.li li // lk : http://www.nic.lk/seclevpr.html @@ -3571,9 +3779,10 @@ ltd.lk assn.lk grp.lk hotel.lk +ac.lk // lr : http://psg.com/dns/lr/lr.txt -// Submitted by registry 2008-06-17 +// Submitted by registry lr com.lr edu.lr @@ -3581,12 +3790,20 @@ gov.lr org.lr net.lr -// ls : http://en.wikipedia.org/wiki/.ls +// ls : http://www.nic.ls/ +// Confirmed by registry ls +ac.ls +biz.ls co.ls +edu.ls +gov.ls +info.ls +net.ls org.ls +sc.ls -// lt : http://en.wikipedia.org/wiki/.lt +// lt : https://en.wikipedia.org/wiki/.lt lt // gov.lt : http://www.gov.lt/index_en.php gov.lt @@ -3618,7 +3835,7 @@ med.ly org.ly id.ly -// ma : http://en.wikipedia.org/wiki/.ma +// ma : https://en.wikipedia.org/wiki/.ma // http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf ma co.ma @@ -3633,10 +3850,10 @@ mc tm.mc asso.mc -// md : http://en.wikipedia.org/wiki/.md +// md : https://en.wikipedia.org/wiki/.md md -// me : http://en.wikipedia.org/wiki/.me +// me : https://en.wikipedia.org/wiki/.me me co.me net.me @@ -3647,7 +3864,7 @@ gov.me its.me priv.me -// mg : http://www.nic.mg/tarif.htm +// mg : http://nic.mg/nicmg/?page_id=39 mg org.mg nom.mg @@ -3657,14 +3874,15 @@ tm.mg edu.mg mil.mg com.mg +co.mg -// mh : http://en.wikipedia.org/wiki/.mh +// mh : https://en.wikipedia.org/wiki/.mh mh -// mil : http://en.wikipedia.org/wiki/.mil +// mil : https://en.wikipedia.org/wiki/.mil mil -// mk : http://en.wikipedia.org/wiki/.mk +// mk : https://en.wikipedia.org/wiki/.mk // see also: http://dns.marnet.net.mk/postapka.php mk com.mk @@ -3676,7 +3894,7 @@ inf.mk name.mk // ml : http://www.gobin.info/domainname/ml-template.doc -// see also: http://en.wikipedia.org/wiki/.ml +// see also: https://en.wikipedia.org/wiki/.ml ml com.ml edu.ml @@ -3686,10 +3904,10 @@ net.ml org.ml presse.ml -// mm : http://en.wikipedia.org/wiki/.mm +// mm : https://en.wikipedia.org/wiki/.mm *.mm -// mn : http://en.wikipedia.org/wiki/.mn +// mn : https://en.wikipedia.org/wiki/.mn mn gov.mn edu.mn @@ -3703,17 +3921,17 @@ org.mo edu.mo gov.mo -// mobi : http://en.wikipedia.org/wiki/.mobi +// mobi : https://en.wikipedia.org/wiki/.mobi mobi // mp : http://www.dot.mp/ // Confirmed by registry 2008-06-17 mp -// mq : http://en.wikipedia.org/wiki/.mq +// mq : https://en.wikipedia.org/wiki/.mq mq -// mr : http://en.wikipedia.org/wiki/.mr +// mr : https://en.wikipedia.org/wiki/.mr mr gov.mr @@ -3726,14 +3944,14 @@ net.ms org.ms // mt : https://www.nic.org.mt/go/policy -// Submitted by registry 2013-11-19 +// Submitted by registry mt com.mt edu.mt net.mt org.mt -// mu : http://en.wikipedia.org/wiki/.mu +// mu : https://en.wikipedia.org/wiki/.mu mu com.mu net.mu @@ -4295,7 +4513,7 @@ zoology.museum ירושלים.museum иком.museum -// mv : http://en.wikipedia.org/wiki/.mv +// mv : https://en.wikipedia.org/wiki/.mv // "mv" included because, contra Wikipedia, google.mv exists. mv aero.mv @@ -4328,7 +4546,7 @@ net.mw org.mw // mx : http://www.nic.mx/ -// Submitted by registry 2008-06-19 +// Submitted by registry mx com.mx org.mx @@ -4346,9 +4564,17 @@ edu.my mil.my name.my -// mz : http://www.gobin.info/domainname/mz-template.doc -*.mz -!teledata.mz +// mz : http://www.uem.mz/ +// Submitted by registry +mz +ac.mz +adv.mz +co.mz +edu.mz +gov.mz +mil.mz +net.mz +org.mz // na : http://www.na-nic.com.na/ // http://www.info.na/domain/ @@ -4377,14 +4603,15 @@ name // nc : http://www.cctld.nc/ nc asso.nc +nom.nc -// ne : http://en.wikipedia.org/wiki/.ne +// ne : https://en.wikipedia.org/wiki/.ne ne -// net : http://en.wikipedia.org/wiki/.net +// net : https://en.wikipedia.org/wiki/.net net -// nf : http://en.wikipedia.org/wiki/.nf +// nf : https://en.wikipedia.org/wiki/.nf nf com.nf net.nf @@ -4397,24 +4624,39 @@ info.nf other.nf store.nf -// ng : http://psg.com/dns/ng/ +// ng : http://www.nira.org.ng/index.php/join-us/register-ng-domain/189-nira-slds ng com.ng edu.ng +gov.ng +i.ng +mil.ng +mobi.ng name.ng net.ng org.ng sch.ng -gov.ng -mil.ng -mobi.ng -// ni : http://www.nic.ni/dominios.htm -*.ni +// ni : http://www.nic.ni/ +ni +ac.ni +biz.ni +co.ni +com.ni +edu.ni +gob.ni +in.ni +info.ni +int.ni +mil.ni +net.ni +nom.ni +org.ni +web.ni -// nl : http://www.domain-registry.nl/ace.php/c,728,122,,,,Home.html -// Confirmed by registry (with technical -// reservations) 2008-06-08 +// nl : https://en.wikipedia.org/wiki/.nl +// https://www.sidn.nl/ +// ccTLD for the Netherlands nl // BV.nl will be a registry for dutch BV's (besloten vennootschap) @@ -5191,7 +5433,7 @@ våler.hedmark.no *.np // nr : http://cenpac.net.nr/dns/index.html -// Confirmed by registry 2008-06-17 +// Submitted by registry nr biz.nr info.nr @@ -5201,11 +5443,11 @@ org.nr net.nr com.nr -// nu : http://en.wikipedia.org/wiki/.nu +// nu : https://en.wikipedia.org/wiki/.nu nu -// nz : http://en.wikipedia.org/wiki/.nz -// Confirmed by registry 2014-05-19 +// nz : https://en.wikipedia.org/wiki/.nz +// Submitted by registry nz ac.nz co.nz @@ -5224,7 +5466,7 @@ org.nz parliament.nz school.nz -// om : http://en.wikipedia.org/wiki/.om +// om : https://en.wikipedia.org/wiki/.om om co.om com.om @@ -5236,7 +5478,10 @@ net.om org.om pro.om -// org : http://en.wikipedia.org/wiki/.org +// onion : https://tools.ietf.org/html/rfc7686 +onion + +// org : https://en.wikipedia.org/wiki/.org org // pa : http://www.nic.pa/ @@ -5271,11 +5516,11 @@ com.pf org.pf edu.pf -// pg : http://en.wikipedia.org/wiki/.pg +// pg : https://en.wikipedia.org/wiki/.pg *.pg // ph : http://www.domains.ph/FAQ2.asp -// Submitted by registry 2008-06-13 +// Submitted by registry ph com.ph net.ph @@ -5304,14 +5549,11 @@ gos.pk info.pk // pl http://www.dns.pl/english/index.html -// confirmed on 26.09.2014 from Bogna Tchórzewska +// Submitted by registry pl com.pl net.pl org.pl -info.pl -waw.pl -gov.pl // pl functional domains (http://www.dns.pl/english/index.html) aid.pl agro.pl @@ -5321,6 +5563,7 @@ biz.pl edu.pl gmina.pl gsm.pl +info.pl mail.pl miasta.pl media.pl @@ -5342,16 +5585,55 @@ tm.pl tourism.pl travel.pl turystyka.pl -// Government domains (administred by ippt.gov.pl) -uw.gov.pl -um.gov.pl +// Government domains +gov.pl +ap.gov.pl +ic.gov.pl +is.gov.pl +us.gov.pl +kmpsp.gov.pl +kppsp.gov.pl +kwpsp.gov.pl +psp.gov.pl +wskr.gov.pl +kwp.gov.pl +mw.gov.pl ug.gov.pl +um.gov.pl +umig.gov.pl +ugim.gov.pl upow.gov.pl +uw.gov.pl starostwo.gov.pl +pa.gov.pl +po.gov.pl +psse.gov.pl +pup.gov.pl +rzgw.gov.pl +sa.gov.pl so.gov.pl sr.gov.pl -po.gov.pl -pa.gov.pl +wsa.gov.pl +sko.gov.pl +uzs.gov.pl +wiih.gov.pl +winb.gov.pl +pinb.gov.pl +wios.gov.pl +witd.gov.pl +wzmiuw.gov.pl +piw.gov.pl +wiw.gov.pl +griw.gov.pl +wif.gov.pl +oum.gov.pl +sdn.gov.pl +zp.gov.pl +uppo.gov.pl +mup.gov.pl +wuoz.gov.pl +konsulat.gov.pl +oirm.gov.pl // pl regional domains (http://www.dns.pl/english/index.html) augustow.pl babia-gora.pl @@ -5459,6 +5741,7 @@ ustka.pl walbrzych.pl warmia.pl warszawa.pl +waw.pl wegrow.pl wielun.pl wlocl.pl @@ -5483,7 +5766,7 @@ org.pn edu.pn net.pn -// post : http://en.wikipedia.org/wiki/.post +// post : https://en.wikipedia.org/wiki/.post post // pr : http://www.nic.pr/index.asp?f=1 @@ -5498,22 +5781,26 @@ pro.pr biz.pr info.pr name.pr -// these aren't mentioned on nic.pr, but on http://en.wikipedia.org/wiki/.pr +// these aren't mentioned on nic.pr, but on https://en.wikipedia.org/wiki/.pr est.pr prof.pr ac.pr -// pro : http://www.nic.pro/support_faq.htm +// pro : http://registry.pro/get-pro pro +aaa.pro aca.pro +acct.pro +avocat.pro bar.pro cpa.pro +eng.pro jur.pro law.pro med.pro -eng.pro +recht.pro -// ps : http://en.wikipedia.org/wiki/.ps +// ps : https://en.wikipedia.org/wiki/.ps // http://www.nic.ps/registration/policy.html#reg ps edu.ps @@ -5535,7 +5822,7 @@ publ.pt com.pt nome.pt -// pw : http://en.wikipedia.org/wiki/.pw +// pw : https://en.wikipedia.org/wiki/.pw pw co.pw ne.pw @@ -5545,7 +5832,7 @@ go.pw belau.pw // py : http://www.nic.py/pautas.html#seccion_9 -// Confirmed by registry 2012-10-03 +// Submitted by registry py com.py coop.py @@ -5568,171 +5855,40 @@ sch.qa // re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs re -com.re asso.re +com.re nom.re // ro : http://www.rotld.ro/ ro -com.ro -org.ro -tm.ro -nt.ro -nom.ro -info.ro -rec.ro arts.ro +com.ro firm.ro +info.ro +nom.ro +nt.ro +org.ro +rec.ro store.ro +tm.ro www.ro -// rs : http://en.wikipedia.org/wiki/.rs +// rs : https://www.rnids.rs/en/domains/national-domains rs -co.rs -org.rs -edu.rs ac.rs +co.rs +edu.rs gov.rs in.rs +org.rs -// ru : http://www.cctld.ru/ru/docs/aktiv_8.php -// Industry domains +// ru : https://cctld.ru/en/domains/domens_ru/reserved/ ru ac.ru -com.ru edu.ru -int.ru -net.ru -org.ru -pp.ru -// Geographical domains -adygeya.ru -altai.ru -amur.ru -arkhangelsk.ru -astrakhan.ru -bashkiria.ru -belgorod.ru -bir.ru -bryansk.ru -buryatia.ru -cbg.ru -chel.ru -chelyabinsk.ru -chita.ru -chukotka.ru -chuvashia.ru -dagestan.ru -dudinka.ru -e-burg.ru -grozny.ru -irkutsk.ru -ivanovo.ru -izhevsk.ru -jar.ru -joshkar-ola.ru -kalmykia.ru -kaluga.ru -kamchatka.ru -karelia.ru -kazan.ru -kchr.ru -kemerovo.ru -khabarovsk.ru -khakassia.ru -khv.ru -kirov.ru -koenig.ru -komi.ru -kostroma.ru -krasnoyarsk.ru -kuban.ru -kurgan.ru -kursk.ru -lipetsk.ru -magadan.ru -mari.ru -mari-el.ru -marine.ru -mordovia.ru -// mosreg.ru Bug 1090800 - removed at request of Aleksey Konstantinov -msk.ru -murmansk.ru -nalchik.ru -nnov.ru -nov.ru -novosibirsk.ru -nsk.ru -omsk.ru -orenburg.ru -oryol.ru -palana.ru -penza.ru -perm.ru -ptz.ru -rnd.ru -ryazan.ru -sakhalin.ru -samara.ru -saratov.ru -simbirsk.ru -smolensk.ru -spb.ru -stavropol.ru -stv.ru -surgut.ru -tambov.ru -tatarstan.ru -tom.ru -tomsk.ru -tsaritsyn.ru -tsk.ru -tula.ru -tuva.ru -tver.ru -tyumen.ru -udm.ru -udmurtia.ru -ulan-ude.ru -vladikavkaz.ru -vladimir.ru -vladivostok.ru -volgograd.ru -vologda.ru -voronezh.ru -vrn.ru -vyatka.ru -yakutia.ru -yamal.ru -yaroslavl.ru -yekaterinburg.ru -yuzhno-sakhalinsk.ru -// More geographical domains -amursk.ru -baikal.ru -cmw.ru -fareast.ru -jamal.ru -kms.ru -k-uralsk.ru -kustanai.ru -kuzbass.ru -magnitka.ru -mytis.ru -nakhodka.ru -nkz.ru -norilsk.ru -oskol.ru -pyatigorsk.ru -rubtsovsk.ru -snz.ru -syzran.ru -vdonsk.ru -zgrad.ru -// State domains gov.ru +int.ru mil.ru -// Technical domains test.ru // rw : http://www.nic.rw/cgi-bin/policy.pl @@ -5759,7 +5915,7 @@ edu.sa sch.sa // sb : http://www.sbnic.net.sb/ -// Submitted by registry 2008-06-08 +// Submitted by registry sb com.sb edu.sb @@ -5776,7 +5932,7 @@ org.sc edu.sc // sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm -// Submitted by registry 2008-06-17 +// Submitted by registry sd com.sd net.sd @@ -5787,8 +5943,8 @@ tv.sd gov.sd info.sd -// se : http://en.wikipedia.org/wiki/.se -// Submitted by registry 2014-03-18 +// se : https://en.wikipedia.org/wiki/.se +// Submitted by registry se a.se ac.se @@ -5847,19 +6003,19 @@ gov.sh org.sh mil.sh -// si : http://en.wikipedia.org/wiki/.si +// si : https://en.wikipedia.org/wiki/.si si // sj : No registrations at this time. -// Submitted by registry 2008-06-16 +// Submitted by registry sj -// sk : http://en.wikipedia.org/wiki/.sk +// sk : https://en.wikipedia.org/wiki/.sk // list of 2nd level domains ? sk // sl : http://www.nic.sl -// Submitted by registry 2008-06-12 +// Submitted by registry sl com.sl net.sl @@ -5867,10 +6023,10 @@ edu.sl gov.sl org.sl -// sm : http://en.wikipedia.org/wiki/.sm +// sm : https://en.wikipedia.org/wiki/.sm sm -// sn : http://en.wikipedia.org/wiki/.sn +// sn : https://en.wikipedia.org/wiki/.sn sn art.sn com.sn @@ -5886,7 +6042,7 @@ com.so net.so org.so -// sr : http://en.wikipedia.org/wiki/.sr +// sr : https://en.wikipedia.org/wiki/.sr sr // st : http://www.nic.st/html/policyrules/ @@ -5904,7 +6060,7 @@ principe.st saotome.st store.st -// su : http://en.wikipedia.org/wiki/.su +// su : https://en.wikipedia.org/wiki/.su su // sv : http://www.svnet.org.sv/niveldos.pdf @@ -5915,12 +6071,12 @@ gob.sv org.sv red.sv -// sx : http://en.wikipedia.org/wiki/.sx -// Confirmed by registry 2012-05-31 +// sx : https://en.wikipedia.org/wiki/.sx +// Submitted by registry sx gov.sx -// sy : http://en.wikipedia.org/wiki/.sy +// sy : https://en.wikipedia.org/wiki/.sy // see also: http://www.gobin.info/domainname/sy.doc sy edu.sy @@ -5930,32 +6086,32 @@ mil.sy com.sy org.sy -// sz : http://en.wikipedia.org/wiki/.sz +// sz : https://en.wikipedia.org/wiki/.sz // http://www.sispa.org.sz/ sz co.sz ac.sz org.sz -// tc : http://en.wikipedia.org/wiki/.tc +// tc : https://en.wikipedia.org/wiki/.tc tc -// td : http://en.wikipedia.org/wiki/.td +// td : https://en.wikipedia.org/wiki/.td td -// tel: http://en.wikipedia.org/wiki/.tel +// tel: https://en.wikipedia.org/wiki/.tel // http://www.telnic.org/ tel -// tf : http://en.wikipedia.org/wiki/.tf +// tf : https://en.wikipedia.org/wiki/.tf tf -// tg : http://en.wikipedia.org/wiki/.tg +// tg : https://en.wikipedia.org/wiki/.tg // http://www.nic.tg/ tg -// th : http://en.wikipedia.org/wiki/.th -// Submitted by registry 2008-06-17 +// th : https://en.wikipedia.org/wiki/.th +// Submitted by registry th ac.th co.th @@ -5983,10 +6139,10 @@ org.tj test.tj web.tj -// tk : http://en.wikipedia.org/wiki/.tk +// tk : https://en.wikipedia.org/wiki/.tk tk -// tl : http://en.wikipedia.org/wiki/.tl +// tl : https://en.wikipedia.org/wiki/.tl tl gov.tl @@ -6001,7 +6157,7 @@ gov.tm mil.tm edu.tm -// tn : http://en.wikipedia.org/wiki/.tn +// tn : https://en.wikipedia.org/wiki/.tn // http://whois.ati.tn/ tn com.tn @@ -6025,8 +6181,8 @@ agrinet.tn defense.tn turen.tn -// to : http://en.wikipedia.org/wiki/.to -// Submitted by registry 2008-06-17 +// to : https://en.wikipedia.org/wiki/.to +// Submitted by registry to com.to gov.to @@ -6035,13 +6191,9 @@ org.to edu.to mil.to -// tp : No registrations at this time. -// Submitted by Ryan Sleevi 2014-01-03 -tp - // subTLDs: https://www.nic.tr/forms/eng/policies.pdf // and: https://www.nic.tr/forms/politikalar.pdf -// Submitted by 2014-07-19 +// Submitted by tr com.tr info.tr @@ -6070,9 +6222,6 @@ nc.tr // Used by government agencies of Northern Cyprus gov.nc.tr -// travel : http://en.wikipedia.org/wiki/.travel -travel - // tt : http://www.nic.tt/ tt co.tt @@ -6093,12 +6242,12 @@ name.tt gov.tt edu.tt -// tv : http://en.wikipedia.org/wiki/.tv +// tv : https://en.wikipedia.org/wiki/.tv // Not listing any 2LDs as reserved since none seem to exist in practice, // Wikipedia notwithstanding. tv -// tw : http://en.wikipedia.org/wiki/.tw +// tw : https://en.wikipedia.org/wiki/.tw tw edu.tw gov.tw @@ -6115,7 +6264,7 @@ club.tw 商業.tw // tz : http://www.tznic.or.tz/index.php/domains -// Confirmed by registry 2013-01-22 +// Submitted by registry tz ac.tz co.tz @@ -6131,7 +6280,7 @@ sc.tz tv.tz // ua : https://hostmaster.ua/policy/?ua -// Submitted by registry 2012-04-27 +// Submitted by registry ua // ua 2LD com.ua @@ -6213,10 +6362,6 @@ zhytomyr.ua zp.ua zt.ua -// Private registries in .ua -co.ua -pp.ua - // ug : https://www.registry.co.ug/ ug co.ug @@ -6228,7 +6373,7 @@ ne.ug com.ug org.ug -// uk : http://en.wikipedia.org/wiki/.uk +// uk : https://en.wikipedia.org/wiki/.uk // Submitted by registry uk ac.uk @@ -6243,7 +6388,7 @@ plc.uk police.uk *.sch.uk -// us : http://en.wikipedia.org/wiki/.us +// us : https://en.wikipedia.org/wiki/.us us dni.us fed.us @@ -6431,7 +6576,7 @@ lib.ca.us lib.co.us lib.ct.us lib.dc.us -lib.de.us +// lib.de.us Issue #243 - Moved to Private section at request of Ed Moore lib.fl.us lib.ga.us lib.gu.us @@ -6478,12 +6623,23 @@ lib.wi.us // lib.wv.us Bug 941670 - Removed at request of Larry W Arnold lib.wy.us // k12.ma.us contains school districts in Massachusetts. The 4LDs are -// managed indepedently except for private (PVT), charter (CHTR) and -// parochial (PAROCH) schools. Those are delegated dorectly to the +// managed independently except for private (PVT), charter (CHTR) and +// parochial (PAROCH) schools. Those are delegated directly to the // 5LD operators. pvt.k12.ma.us chtr.k12.ma.us paroch.k12.ma.us +// Merit Network, Inc. maintains the registry for =~ /(k12|cc|lib).mi.us/ and the following +// see also: http://domreg.merit.edu +// see also: whois -h whois.domreg.merit.edu help +ann-arbor.mi.us +cog.mi.us +dst.mi.us +eaton.mi.us +gen.mi.us +mus.mi.us +tec.mi.us +washtenaw.mi.us // uy : http://www.nic.org.uy/ uy @@ -6501,11 +6657,11 @@ com.uz net.uz org.uz -// va : http://en.wikipedia.org/wiki/.va +// va : https://en.wikipedia.org/wiki/.va va -// vc : http://en.wikipedia.org/wiki/.vc -// Submitted by registry 2008-06-13 +// vc : https://en.wikipedia.org/wiki/.vc +// Submitted by registry vc com.vc net.vc @@ -6515,8 +6671,7 @@ mil.vc edu.vc // ve : https://registro.nic.ve/ -// Confirmed by registry 2012-10-04 -// Updated 2014-05-20 - Bug 940478 +// Submitted by registry ve arts.ve co.ve @@ -6536,7 +6691,7 @@ store.ve tec.ve web.ve -// vg : http://en.wikipedia.org/wiki/.vg +// vg : https://en.wikipedia.org/wiki/.vg vg // vi : http://www.nic.vi/newdomainform.htm @@ -6565,7 +6720,7 @@ name.vn pro.vn health.vn -// vu : http://en.wikipedia.org/wiki/.vu +// vu : https://en.wikipedia.org/wiki/.vu // http://www.vunic.vu/ vu com.vu @@ -6576,7 +6731,7 @@ org.vu // wf : http://www.afnic.fr/medias/documents/AFNIC-naming-policy2012.pdf wf -// ws : http://en.wikipedia.org/wiki/.ws +// ws : https://en.wikipedia.org/wiki/.ws // http://samoanic.ws/index.dhtml ws com.ws @@ -6589,115 +6744,194 @@ edu.ws yt // IDN ccTLDs -// Please sort by ISO 3166 ccTLD, then punicode string -// when submitting patches and follow this format: -// ("" ) : -// [optional sponsoring org] -// +// When submitting patches, please maintain a sort by ISO 3166 ccTLD, then +// U-label, and follow this format: +// // A-Label ("", [, variant info]) : +// // [sponsoring org] +// U-Label -// xn--mgbaam7a8h ("Emerat" Arabic) : AE +// xn--mgbaam7a8h ("Emerat", Arabic) : AE // http://nic.ae/english/arabicdomain/rules.jsp امارات -// xn--54b7fta0cc ("Bangla" Bangla) : BD +// xn--y9a3aq ("hye", Armenian) : AM +// ISOC AM (operated by .am Registry) +հայ + +// xn--54b7fta0cc ("Bangla", Bangla) : BD বাংলা -// xn--fiqs8s ("China" Chinese-Han-Simplified <.Zhongguo>) : CN +// xn--90ae ("bg", Bulgarian) : BG +бг + +// xn--90ais ("bel", Belarusian/Russian Cyrillic) : BY +// Operated by .by registry +бел + +// xn--fiqs8s ("Zhongguo/China", Chinese, Simplified) : CN // CNNIC // http://cnnic.cn/html/Dir/2005/10/11/3218.htm 中国 -// xn--fiqz9s ("China" Chinese-Han-Traditional <.Zhongguo>) : CN +// xn--fiqz9s ("Zhongguo/China", Chinese, Traditional) : CN // CNNIC // http://cnnic.cn/html/Dir/2005/10/11/3218.htm 中國 -// xn--lgbbat1ad8j ("Algeria / Al Jazair" Arabic) : DZ +// xn--lgbbat1ad8j ("Algeria/Al Jazair", Arabic) : DZ الجزائر -// xn--wgbh1c ("Egypt" Arabic .masr) : EG +// xn--wgbh1c ("Egypt/Masr", Arabic) : EG // http://www.dotmasr.eg/ مصر -// xn--node ("ge" Georgian (Mkhedruli)) : GE +// xn--e1a4c ("eu", Cyrillic) : EU +ею + +// xn--node ("ge", Georgian Mkhedruli) : GE გე -// xn--j6w193g ("Hong Kong" Chinese-Han) : HK -// https://www2.hkirc.hk/register/rules.jsp -香港 +// xn--qxam ("el", Greek) : GR +// Hellenic Ministry of Infrastructure, Transport, and Networks +ελ -// xn--h2brj9c ("Bharat" Devanagari) : IN +// xn--j6w193g ("Hong Kong", Chinese) : HK +// https://www.hkirc.hk +// Submitted by registry +// https://www.hkirc.hk/content.jsp?id=30#!/34 +香港 +公司.香港 +教育.香港 +政府.香港 +個人.香港 +網絡.香港 +組織.香港 + +// xn--2scrj9c ("Bharat", Kannada) : IN +// India +ಭಾರತ + +// xn--3hcrj9c ("Bharat", Oriya) : IN +// India +ଭାରତ + +// xn--45br5cyl ("Bharatam", Assamese) : IN +// India +ভাৰত + +// xn--h2breg3eve ("Bharatam", Sanskrit) : IN +// India +भारतम् + +// xn--h2brj9c8c ("Bharot", Santali) : IN +// India +भारोत + +// xn--mgbgu82a ("Bharat", Sindhi) : IN +// India +ڀارت + +// xn--rvc1e0am3e ("Bharatam", Malayalam) : IN +// India +ഭാരതം + +// xn--h2brj9c ("Bharat", Devanagari) : IN // India भारत -// xn--mgbbh1a71e ("Bharat" Arabic) : IN +// xn--mgbbh1a ("Bharat", Kashmiri) : IN +// India +بارت + +// xn--mgbbh1a71e ("Bharat", Arabic) : IN // India بھارت -// xn--fpcrj9c3d ("Bharat" Telugu) : IN +// xn--fpcrj9c3d ("Bharat", Telugu) : IN // India భారత్ -// xn--gecrj9c ("Bharat" Gujarati) : IN +// xn--gecrj9c ("Bharat", Gujarati) : IN // India ભારત -// xn--s9brj9c ("Bharat" Gurmukhi) : IN +// xn--s9brj9c ("Bharat", Gurmukhi) : IN // India ਭਾਰਤ -// xn--45brj9c ("Bharat" Bengali) : IN +// xn--45brj9c ("Bharat", Bengali) : IN // India ভারত -// xn--xkc2dl3a5ee0h ("India" Tamil) : IN +// xn--xkc2dl3a5ee0h ("India", Tamil) : IN // India இந்தியா -// xn--mgba3a4f16a ("Iran" Persian) : IR +// xn--mgba3a4f16a ("Iran", Persian) : IR ایران -// xn--mgba3a4fra ("Iran" Arabic) : IR +// xn--mgba3a4fra ("Iran", Arabic) : IR ايران -// xn--mgbayh7gpa ("al-Ordon" Arabic) : JO +// xn--mgbtx2b ("Iraq", Arabic) : IQ +// Communications and Media Commission +عراق + +// xn--mgbayh7gpa ("al-Ordon", Arabic) : JO // National Information Technology Center (NITC) // Royal Scientific Society, Al-Jubeiha الاردن -// xn--3e0b707e ("Republic of Korea" Hangul) : KR +// xn--3e0b707e ("Republic of Korea", Hangul) : KR 한국 -// xn--80ao21a ("Kaz" Kazakh) : KZ +// xn--80ao21a ("Kaz", Kazakh) : KZ қаз -// xn--fzc2c9e2c ("Lanka" Sinhalese-Sinhala) : LK +// xn--fzc2c9e2c ("Lanka", Sinhalese-Sinhala) : LK // http://nic.lk ලංකා -// xn--xkc2al3hye2a ("Ilangai" Tamil) : LK +// xn--xkc2al3hye2a ("Ilangai", Tamil) : LK // http://nic.lk இலங்கை -// xn--mgbc0a9azcg ("Morocco / al-Maghrib" Arabic) : MA +// xn--mgbc0a9azcg ("Morocco/al-Maghrib", Arabic) : MA المغرب -// xn--l1acc ("mon" Mongolian) : MN +// xn--d1alf ("mkd", Macedonian) : MK +// MARnet +мкд + +// xn--l1acc ("mon", Mongolian) : MN мон -// xn--mgbx4cd0ab ("Malaysia" Malay) : MY +// xn--mix891f ("Macao", Chinese, Traditional) : MO +// MONIC / HNET Asia (Registry Operator for .mo) +澳門 + +// xn--mix082f ("Macao", Chinese, Simplified) : MO +澳门 + +// xn--mgbx4cd0ab ("Malaysia", Malay) : MY مليسيا -// xn--mgb9awbf ("Oman" Arabic) : OM +// xn--mgb9awbf ("Oman", Arabic) : OM عمان -// xn--ygbi2ammx ("Falasteen" Arabic) : PS +// xn--mgbai9azgqp6j ("Pakistan", Urdu/Arabic) : PK +پاکستان + +// xn--mgbai9a5eva00b ("Pakistan", Urdu/Arabic, variant) : PK +پاكستان + +// xn--ygbi2ammx ("Falasteen", Arabic) : PS // The Palestinian National Internet Naming Authority (PNINA) // http://www.pnina.ps فلسطين -// xn--90a3ac ("srb" Cyrillic) : RS -// http://www.rnids.rs/en/the-.срб-domain +// xn--90a3ac ("srb", Cyrillic) : RS +// https://www.rnids.rs/en/domains/national-domains срб пр.срб орг.срб @@ -6706,62 +6940,72 @@ yt упр.срб ак.срб -// xn--p1ai ("rf" Russian-Cyrillic) : RU +// xn--p1ai ("rf", Russian-Cyrillic) : RU // http://www.cctld.ru/en/docs/rulesrf.php рф -// xn--wgbl6a ("Qatar" Arabic) : QA +// xn--wgbl6a ("Qatar", Arabic) : QA // http://www.ict.gov.qa/ قطر -// xn--mgberp4a5d4ar ("AlSaudiah" Arabic) : SA +// xn--mgberp4a5d4ar ("AlSaudiah", Arabic) : SA // http://www.nic.net.sa/ السعودية -// xn--mgberp4a5d4a87g ("AlSaudiah" Arabic) variant : SA +// xn--mgberp4a5d4a87g ("AlSaudiah", Arabic, variant) : SA السعودیة -// xn--mgbqly7c0a67fbc ("AlSaudiah" Arabic) variant : SA +// xn--mgbqly7c0a67fbc ("AlSaudiah", Arabic, variant) : SA السعودیۃ -// xn--mgbqly7cvafr ("AlSaudiah" Arabic) variant : SA +// xn--mgbqly7cvafr ("AlSaudiah", Arabic, variant) : SA السعوديه -// xn--ogbpf8fl ("Syria" Arabic) : SY -سورية +// xn--mgbpl2fh ("sudan", Arabic) : SD +// Operated by .sd registry +سودان -// xn--mgbtf8fl ("Syria" Arabic) variant : SY -سوريا - -// xn--yfro4i67o Singapore ("Singapore" Chinese-Han) : SG +// xn--yfro4i67o Singapore ("Singapore", Chinese) : SG 新加坡 -// xn--clchc0ea0b2g2a9gcd ("Singapore" Tamil) : SG +// xn--clchc0ea0b2g2a9gcd ("Singapore", Tamil) : SG சிங்கப்பூர் -// xn--o3cw4h ("Thai" Thai) : TH +// xn--ogbpf8fl ("Syria", Arabic) : SY +سورية + +// xn--mgbtf8fl ("Syria", Arabic, variant) : SY +سوريا + +// xn--o3cw4h ("Thai", Thai) : TH // http://www.thnic.co.th ไทย +ศึกษา.ไทย +ธุรกิจ.ไทย +รัฐบาล.ไทย +ทหาร.ไทย +เน็ต.ไทย +องค์กร.ไทย -// xn--pgbs0dh ("Tunis") : TN +// xn--pgbs0dh ("Tunisia", Arabic) : TN // http://nic.tn تونس -// xn--kpry57d ("Taiwan" Chinese-Han-Traditional) : TW +// xn--kpry57d ("Taiwan", Chinese, Traditional) : TW // http://www.twnic.net/english/dn/dn_07a.htm 台灣 -// xn--kprw13d ("Taiwan" Chinese-Han-Simplified) : TW +// xn--kprw13d ("Taiwan", Chinese, Simplified) : TW // http://www.twnic.net/english/dn/dn_07a.htm 台湾 -// xn--nnx388a ("Taiwan") variant : TW +// xn--nnx388a ("Taiwan", Chinese, variant) : TW 臺灣 -// xn--j1amh ("ukr" Cyrillic) : UA +// xn--j1amh ("ukr", Cyrillic) : UA укр -// xn--mgb2ddes ("AlYemen" Arabic) : YE +// xn--mgb2ddes ("AlYemen", Arabic) : YE اليمن // xxx : http://icmregistry.com @@ -6770,17 +7014,62 @@ xxx // ye : http://www.y.net.ye/services/domain_name.htm *.ye -// za : http://www.zadna.org.za/slds.html -*.za +// za : http://www.zadna.org.za/content/page/domain-information +ac.za +agric.za +alt.za +co.za +edu.za +gov.za +grondar.za +law.za +mil.za +net.za +ngo.za +nis.za +nom.za +org.za +school.za +tm.za +web.za -// zm : http://en.wikipedia.org/wiki/.zm -*.zm +// zm : https://zicta.zm/ +// Submitted by registry +zm +ac.zm +biz.zm +co.zm +com.zm +edu.zm +gov.zm +info.zm +mil.zm +net.zm +org.zm +sch.zm -// zw : http://en.wikipedia.org/wiki/.zw -*.zw +// zw : https://www.potraz.gov.zw/ +// Confirmed by registry 2017-01-25 +zw +ac.zw +co.zw +gov.zw +mil.zw +org.zw -// List of new gTLDs imported from https://newgtlds.icann.org/newgtlds.csv on 2015-01-27T00:02:07Z +// newGTLDs +// List of new gTLDs imported from https://newgtlds.icann.org/newgtlds.csv on 2018-05-08T19:40:37Z +// This list is auto-generated, don't edit it manually. + +// aaa : 2015-02-26 American Automobile Association, Inc. +aaa + +// aarp : 2015-05-21 AARP +aarp + +// abarth : 2015-07-30 Fiat Chrysler Automobiles N.V. +abarth // abb : 2014-10-24 ABB Ltd abb @@ -6788,10 +7077,22 @@ abb // abbott : 2014-07-24 Abbott Laboratories, Inc. abbott -// abogado : 2014-04-24 Top Level Domain Holdings Limited +// abbvie : 2015-07-30 AbbVie Inc. +abbvie + +// abc : 2015-07-30 Disney Enterprises, Inc. +abc + +// able : 2015-06-25 Able Inc. +able + +// abogado : 2014-04-24 Minds + Machines Group Limited abogado -// academy : 2013-11-07 Half Oaks, LLC +// abudhabi : 2015-07-30 Abu Dhabi Systems and Information Centre +abudhabi + +// academy : 2013-11-07 Binky Moon, LLC academy // accenture : 2014-08-15 Accenture plc @@ -6800,42 +7101,69 @@ accenture // accountant : 2014-11-20 dot Accountant Limited accountant -// accountants : 2014-03-20 Knob Town, LLC +// accountants : 2014-03-20 Binky Moon, LLC accountants // aco : 2015-01-08 ACO Severin Ahlmann GmbH & Co. KG aco -// active : 2014-05-01 The Active Network, Inc +// active : 2014-05-01 Active Network, LLC active // actor : 2013-12-12 United TLD Holdco Ltd. actor +// adac : 2015-07-16 Allgemeiner Deutscher Automobil-Club e.V. (ADAC) +adac + // ads : 2014-12-04 Charleston Road Registry Inc. ads // adult : 2014-10-16 ICM Registry AD LLC adult +// aeg : 2015-03-19 Aktiebolaget Electrolux +aeg + +// aetna : 2015-05-21 Aetna Life Insurance Company +aetna + +// afamilycompany : 2015-07-23 Johnson Shareholdings, Inc. +afamilycompany + // afl : 2014-10-02 Australian Football League afl // africa : 2014-03-24 ZA Central Registry NPC trading as Registry.Africa africa -// agency : 2013-11-14 Steel Falls, LLC +// agakhan : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation) +agakhan + +// agency : 2013-11-14 Binky Moon, LLC agency // aig : 2014-12-18 American International Group, Inc. aig +// aigo : 2015-08-06 aigo Digital Technology Co,Ltd. +aigo + +// airbus : 2015-07-30 Airbus S.A.S. +airbus + // airforce : 2014-03-06 United TLD Holdco Ltd. airforce // airtel : 2014-10-24 Bharti Airtel Limited airtel +// akdn : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation) +akdn + +// alfaromeo : 2015-07-31 Fiat Chrysler Automobiles N.V. +alfaromeo + // alibaba : 2015-01-15 Alibaba Group Holding Limited alibaba @@ -6845,9 +7173,33 @@ alipay // allfinanz : 2014-07-03 Allfinanz Deutsche Vermögensberatung Aktiengesellschaft allfinanz -// alsace : 2014-07-02 REGION D ALSACE +// allstate : 2015-07-31 Allstate Fire and Casualty Insurance Company +allstate + +// ally : 2015-06-18 Ally Financial Inc. +ally + +// alsace : 2014-07-02 Region Grand Est alsace +// alstom : 2015-07-30 ALSTOM +alstom + +// americanexpress : 2015-07-31 American Express Travel Related Services Company, Inc. +americanexpress + +// americanfamily : 2015-07-23 AmFam, Inc. +americanfamily + +// amex : 2015-07-31 American Express Travel Related Services Company, Inc. +amex + +// amfam : 2015-07-23 AmFam, Inc. +amfam + +// amica : 2015-05-28 Amica Mutual Insurance Company +amica + // amsterdam : 2014-07-24 Gemeente Amsterdam amsterdam @@ -6860,40 +7212,73 @@ android // anquan : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. anquan -// apartments : 2014-12-11 June Maple, LLC +// anz : 2015-07-31 Australia and New Zealand Banking Group Limited +anz + +// aol : 2015-09-17 Oath Inc. +aol + +// apartments : 2014-12-11 Binky Moon, LLC apartments +// app : 2015-05-14 Charleston Road Registry Inc. +app + +// apple : 2015-05-14 Apple Inc. +apple + // aquarelle : 2014-07-24 Aquarelle.com aquarelle +// arab : 2015-11-12 League of Arab States +arab + // aramco : 2014-11-20 Aramco Services Company aramco -// archi : 2014-02-06 STARTING DOT LIMITED +// archi : 2014-02-06 Afilias plc archi // army : 2014-03-06 United TLD Holdco Ltd. army +// art : 2016-03-24 UK Creative Ideas Limited +art + // arte : 2014-12-11 Association Relative à la Télévision Européenne G.E.I.E. arte -// associates : 2014-03-06 Baxter Hill, LLC +// asda : 2015-07-31 Wal-Mart Stores, Inc. +asda + +// associates : 2014-03-06 Binky Moon, LLC associates -// attorney : 2014-03-20 +// athleta : 2015-07-30 The Gap, Inc. +athleta + +// attorney : 2014-03-20 United TLD Holdco Ltd. attorney -// auction : 2014-03-20 +// auction : 2014-03-20 United TLD Holdco Ltd. auction +// audi : 2015-05-21 AUDI Aktiengesellschaft +audi + +// audible : 2015-06-25 Amazon Registry Services, Inc. +audible + // audio : 2014-03-20 Uniregistry, Corp. audio -// author : 2014-12-18 Amazon EU S.à r.l. +// auspost : 2015-08-13 Australian Postal Corporation +auspost + +// author : 2014-12-18 Amazon Registry Services, Inc. author -// auto : 2014-11-13 Uniregistry, Corp. +// auto : 2014-11-13 Cars Registry Limited auto // autos : 2014-01-09 DERAutos, LLC @@ -6902,16 +7287,28 @@ autos // avianca : 2015-01-08 Aerovias del Continente Americano S.A. Avianca avianca +// aws : 2015-06-25 Amazon Registry Services, Inc. +aws + // axa : 2013-12-19 AXA SA axa // azure : 2014-12-18 Microsoft Corporation azure +// baby : 2015-04-09 Johnson & Johnson Services, Inc. +baby + // baidu : 2015-01-08 Baidu, Inc. baidu -// band : 2014-06-12 +// banamex : 2015-07-30 Citigroup Inc. +banamex + +// bananarepublic : 2015-07-31 The Gap, Inc. +bananarepublic + +// band : 2014-06-12 United TLD Holdco Ltd. band // bank : 2014-09-25 fTLD Registry Services LLC @@ -6929,9 +7326,18 @@ barclaycard // barclays : 2014-11-20 Barclays Bank PLC barclays -// bargains : 2013-11-14 Half Hallow, LLC +// barefoot : 2015-06-11 Gallo Vineyards, Inc. +barefoot + +// bargains : 2013-11-14 Binky Moon, LLC bargains +// baseball : 2015-10-29 MLB Advanced Media DH, LLC +baseball + +// basketball : 2015-08-20 Fédération Internationale de Basketball (FIBA) +basketball + // bauhaus : 2014-04-17 Werkhaus GmbH bauhaus @@ -6941,13 +7347,25 @@ bayern // bbc : 2014-12-18 British Broadcasting Corporation bbc +// bbt : 2015-07-23 BB&T Corporation +bbt + // bbva : 2014-10-02 BANCO BILBAO VIZCAYA ARGENTARIA, S.A. bbva +// bcg : 2015-04-02 The Boston Consulting Group, Inc. +bcg + // bcn : 2014-07-24 Municipi de Barcelona bcn -// beer : 2014-01-09 Top Level Domain Holdings Limited +// beats : 2015-05-14 Beats Electronics, LLC +beats + +// beauty : 2015-12-03 L'Oréal +beauty + +// beer : 2014-01-09 Minds + Machines Group Limited beer // bentley : 2014-12-18 Bentley Motors Limited @@ -6959,6 +7377,12 @@ berlin // best : 2013-12-19 BestTLD Pty Ltd best +// bestbuy : 2015-07-31 BBY Solutions, Inc. +bestbuy + +// bet : 2015-05-07 Afilias plc +bet + // bharti : 2014-01-09 Bharti Enterprises (Holding) Private Limited bharti @@ -6968,28 +7392,37 @@ bible // bid : 2013-12-19 dot Bid Limited bid -// bike : 2013-08-27 Grand Hollow, LLC +// bike : 2013-08-27 Binky Moon, LLC bike // bing : 2014-12-18 Microsoft Corporation bing -// bingo : 2014-12-04 Sand Cedar, LLC +// bingo : 2014-12-04 Binky Moon, LLC bingo -// bio : 2014-03-06 STARTING DOT LIMITED +// bio : 2014-03-06 Afilias plc bio -// black : 2014-01-16 Afilias Limited +// black : 2014-01-16 Afilias plc black // blackfriday : 2014-01-16 Uniregistry, Corp. blackfriday +// blanco : 2015-07-16 BLANCO GmbH + Co KG +blanco + +// blockbuster : 2015-07-30 Dish DBS Corporation +blockbuster + +// blog : 2015-05-14 Knock Knock WHOIS There, LLC +blog + // bloomberg : 2014-07-17 Bloomberg IP Holdings LLC bloomberg -// blue : 2013-11-07 Afilias Limited +// blue : 2013-11-07 Afilias plc blue // bms : 2014-10-30 Bristol-Myers Squibb Company @@ -7007,6 +7440,12 @@ bnpparibas // boats : 2014-12-04 DERBoats, LLC boats +// boehringer : 2015-07-09 Boehringer Ingelheim International GmbH +boehringer + +// bofa : 2015-07-31 Bank of America Corporation +bofa + // bom : 2014-10-16 Núcleo de Informação e Coordenação do Ponto BR - NIC.br bom @@ -7016,15 +7455,30 @@ bond // boo : 2014-01-30 Charleston Road Registry Inc. boo -// boots : 2015-01-08 THE BOOTS COMPANY PLC -boots +// book : 2015-08-27 Amazon Registry Services, Inc. +book -// bot : 2014-12-18 Amazon EU S.à r.l. +// booking : 2015-07-16 Booking.com B.V. +booking + +// bosch : 2015-06-18 Robert Bosch GMBH +bosch + +// bostik : 2015-05-28 Bostik SA +bostik + +// boston : 2015-12-10 Boston TLD Management, LLC +boston + +// bot : 2014-12-18 Amazon Registry Services, Inc. bot -// boutique : 2013-11-14 Over Galley, LLC +// boutique : 2013-11-14 Binky Moon, LLC boutique +// box : 2015-11-12 NS1 Limited +box + // bradesco : 2014-12-18 Banco Bradesco S.A. bradesco @@ -7034,25 +7488,31 @@ bridgestone // broadway : 2014-12-22 Celebrate Broadway, Inc. broadway -// broker : 2014-12-11 IG Group Holdings PLC +// broker : 2014-12-11 Dotbroker Registry Limited broker +// brother : 2015-01-29 Brother Industries, Ltd. +brother + // brussels : 2014-02-06 DNS.be vzw brussels -// budapest : 2013-11-21 Top Level Domain Holdings Limited +// budapest : 2013-11-21 Minds + Machines Group Limited budapest +// bugatti : 2015-07-23 Bugatti International SA +bugatti + // build : 2013-11-07 Plan Bee LLC build -// builders : 2013-11-07 Atomic Madison, LLC +// builders : 2013-11-07 Binky Moon, LLC builders -// business : 2013-11-07 Spring Cross, LLC +// business : 2013-11-07 Binky Moon, LLC business -// buy : 2014-12-18 Amazon EU S.à r.l. +// buy : 2014-12-18 Amazon Registry Services, Inc. buy // buzz : 2013-10-02 DOTSTRATEGY CO. @@ -7061,19 +7521,28 @@ buzz // bzh : 2014-02-27 Association www.bzh bzh -// cab : 2013-10-24 Half Sunset, LLC +// cab : 2013-10-24 Binky Moon, LLC cab +// cafe : 2015-02-11 Binky Moon, LLC +cafe + // cal : 2014-07-24 Charleston Road Registry Inc. cal -// call : 2014-12-18 Amazon EU S.à r.l. +// call : 2014-12-18 Amazon Registry Services, Inc. call -// camera : 2013-08-27 Atomic Maple, LLC +// calvinklein : 2015-07-30 PVH gTLD Holdings LLC +calvinklein + +// cam : 2016-04-21 AC Webconnecting Holding B.V. +cam + +// camera : 2013-08-27 Binky Moon, LLC camera -// camp : 2013-11-07 Delta Dynamite, LLC +// camp : 2013-11-07 Binky Moon, LLC camp // cancerresearch : 2014-05-15 Australian Cancer Research Foundation @@ -7085,77 +7554,107 @@ canon // capetown : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry capetown -// capital : 2014-03-06 Delta Mill, LLC +// capital : 2014-03-06 Binky Moon, LLC capital -// car : 2015-01-22 Charleston Road Registry Inc. +// capitalone : 2015-08-06 Capital One Financial Corporation +capitalone + +// car : 2015-01-22 Cars Registry Limited car // caravan : 2013-12-12 Caravan International, Inc. caravan -// cards : 2013-12-05 Foggy Hollow, LLC +// cards : 2013-12-05 Binky Moon, LLC cards -// care : 2014-03-06 Goose Cross +// care : 2014-03-06 Binky Moon, LLC care // career : 2013-10-09 dotCareer LLC career -// careers : 2013-10-02 Wild Corner, LLC +// careers : 2013-10-02 Binky Moon, LLC careers -// cars : 2014-11-13 Uniregistry, Corp. +// cars : 2014-11-13 Cars Registry Limited cars // cartier : 2014-06-23 Richemont DNS Inc. cartier -// casa : 2013-11-21 Top Level Domain Holdings Limited +// casa : 2013-11-21 Minds + Machines Group Limited casa -// cash : 2014-03-06 Delta Lake, LLC +// case : 2015-09-03 CNH Industrial N.V. +case + +// caseih : 2015-09-03 CNH Industrial N.V. +caseih + +// cash : 2014-03-06 Binky Moon, LLC cash -// casino : 2014-12-18 Binky Sky, LLC +// casino : 2014-12-18 Binky Moon, LLC casino -// catering : 2013-12-05 New Falls. LLC +// catering : 2013-12-05 Binky Moon, LLC catering +// catholic : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +catholic + // cba : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA cba // cbn : 2014-08-22 The Christian Broadcasting Network, Inc. cbn -// center : 2013-11-07 Tin Mill, LLC +// cbre : 2015-07-02 CBRE, Inc. +cbre + +// cbs : 2015-08-06 CBS Domains Inc. +cbs + +// ceb : 2015-04-09 The Corporate Executive Board Company +ceb + +// center : 2013-11-07 Binky Moon, LLC center // ceo : 2013-11-07 CEOTLD Pty Ltd ceo -// cern : 2014-06-05 European Organization for Nuclear Research (\ +// cern : 2014-06-05 European Organization for Nuclear Research ("CERN") cern // cfa : 2014-08-28 CFA Institute cfa -// cfd : 2014-12-11 IG Group Holdings PLC +// cfd : 2014-12-11 DotCFD Registry Limited cfd +// chanel : 2015-04-09 Chanel International B.V. +chanel + // channel : 2014-05-08 Charleston Road Registry Inc. channel -// chat : 2014-12-04 Sand Fields, LLC +// charity : 2018-04-11 Corn Lake, LLC +charity + +// chase : 2015-04-30 JPMorgan Chase Bank, National Association +chase + +// chat : 2014-12-04 Binky Moon, LLC chat -// cheap : 2013-11-14 Sand Cover, LLC +// cheap : 2013-11-14 Binky Moon, LLC cheap -// chloe : 2014-10-16 Richemont DNS Inc. -chloe +// chintai : 2015-06-11 CHINTAI Corporation +chintai // christmas : 2013-11-21 Uniregistry, Corp. christmas @@ -7163,106 +7662,142 @@ christmas // chrome : 2014-07-24 Charleston Road Registry Inc. chrome -// church : 2014-02-06 Holly Fileds, LLC +// chrysler : 2015-07-30 FCA US LLC. +chrysler + +// church : 2014-02-06 Binky Moon, LLC church -// circle : 2014-12-18 Amazon EU S.à r.l. +// cipriani : 2015-02-19 Hotel Cipriani Srl +cipriani + +// circle : 2014-12-18 Amazon Registry Services, Inc. circle // cisco : 2014-12-22 Cisco Technology, Inc. cisco +// citadel : 2015-07-23 Citadel Domain LLC +citadel + +// citi : 2015-07-30 Citigroup Inc. +citi + // citic : 2014-01-09 CITIC Group Corporation citic -// city : 2014-05-29 Snow Sky, LLC +// city : 2014-05-29 Binky Moon, LLC city // cityeats : 2014-12-11 Lifestyle Domain Holdings, Inc. cityeats -// claims : 2014-03-20 Black Corner, LLC +// claims : 2014-03-20 Binky Moon, LLC claims -// cleaning : 2013-12-05 Fox Shadow, LLC +// cleaning : 2013-12-05 Binky Moon, LLC cleaning // click : 2014-06-05 Uniregistry, Corp. click -// clinic : 2014-03-20 Goose Park, LLC +// clinic : 2014-03-20 Binky Moon, LLC clinic -// clothing : 2013-08-27 Steel Lake, LLC +// clinique : 2015-10-01 The Estée Lauder Companies Inc. +clinique + +// clothing : 2013-08-27 Binky Moon, LLC clothing +// cloud : 2015-04-16 Aruba PEC S.p.A. +cloud + // club : 2013-11-08 .CLUB DOMAINS, LLC club -// coach : 2014-10-09 Koko Island, LLC +// clubmed : 2015-06-25 Club Méditerranée S.A. +clubmed + +// coach : 2014-10-09 Binky Moon, LLC coach -// codes : 2013-10-31 Puff Willow, LLC +// codes : 2013-10-31 Binky Moon, LLC codes -// coffee : 2013-10-17 Trixy Cover, LLC +// coffee : 2013-10-17 Binky Moon, LLC coffee // college : 2014-01-16 XYZ.COM LLC college -// cologne : 2014-02-05 NetCologne Gesellschaft für Telekommunikation mbH +// cologne : 2014-02-05 punkt.wien GmbH cologne +// comcast : 2015-07-23 Comcast IP Holdings I, LLC +comcast + // commbank : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA commbank -// community : 2013-12-05 Fox Orchard, LLC +// community : 2013-12-05 Binky Moon, LLC community -// company : 2013-11-07 Silver Avenue, LLC +// company : 2013-11-07 Binky Moon, LLC company -// computer : 2013-10-24 Pine Mill, LLC +// compare : 2015-10-08 iSelect Ltd +compare + +// computer : 2013-10-24 Binky Moon, LLC computer // comsec : 2015-01-08 VeriSign, Inc. comsec -// condos : 2013-12-05 Pine House, LLC +// condos : 2013-12-05 Binky Moon, LLC condos -// construction : 2013-09-16 Fox Dynamite, LLC +// construction : 2013-09-16 Binky Moon, LLC construction -// consulting : 2013-12-05 +// consulting : 2013-12-05 United TLD Holdco Ltd. consulting // contact : 2015-01-08 Top Level Spectrum, Inc. contact -// contractors : 2013-09-10 Magic Woods, LLC +// contractors : 2013-09-10 Binky Moon, LLC contractors -// cooking : 2013-11-21 Top Level Domain Holdings Limited +// cooking : 2013-11-21 Minds + Machines Group Limited cooking -// cool : 2013-11-14 Koko Lake, LLC +// cookingchannel : 2015-07-02 Lifestyle Domain Holdings, Inc. +cookingchannel + +// cool : 2013-11-14 Binky Moon, LLC cool -// corsica : 2014-09-25 Collectivité Territoriale de Corse +// corsica : 2014-09-25 Collectivité de Corse corsica -// country : 2013-12-19 Top Level Domain Holdings Limited +// country : 2013-12-19 DotCountry LLC country +// coupon : 2015-02-26 Amazon Registry Services, Inc. +coupon + +// coupons : 2015-03-26 Binky Moon, LLC +coupons + // courses : 2014-12-04 OPEN UNIVERSITIES AUSTRALIA PTY LTD courses -// credit : 2014-03-20 Snow Shadow, LLC +// credit : 2014-03-20 Binky Moon, LLC credit -// creditcard : 2014-03-20 Binky Frostbite, LLC +// creditcard : 2014-03-20 Binky Moon, LLC creditcard // creditunion : 2015-01-22 CUNA Performance Resources, LLC @@ -7277,7 +7812,10 @@ crown // crs : 2014-04-03 Federated Co-operatives Limited crs -// cruises : 2013-12-05 Spring Way, LLC +// cruise : 2015-12-10 Viking River Cruises (Bermuda) Ltd. +cruise + +// cruises : 2013-12-05 Binky Moon, LLC cruises // csc : 2014-09-25 Alliance-One Services, Inc. @@ -7301,10 +7839,13 @@ dad // dance : 2013-10-24 United TLD Holdco Ltd. dance +// data : 2016-06-02 Dish DBS Corporation +data + // date : 2014-11-20 dot Date Limited date -// dating : 2013-12-05 Pine Fest, LLC +// dating : 2013-12-05 Binky Moon, LLC dating // datsun : 2014-03-27 NISSAN MOTOR CO., LTD. @@ -7316,28 +7857,40 @@ day // dclk : 2014-11-20 Charleston Road Registry Inc. dclk +// dds : 2015-05-07 Minds + Machines Group Limited +dds + +// deal : 2015-06-25 Amazon Registry Services, Inc. +deal + // dealer : 2014-12-22 Dealer Dot Com, Inc. dealer -// deals : 2014-05-22 Sand Sunset, LLC +// deals : 2014-05-22 Binky Moon, LLC deals -// degree : 2014-03-06 +// degree : 2014-03-06 United TLD Holdco Ltd. degree -// delivery : 2014-09-11 Steel Station, LLC +// delivery : 2014-09-11 Binky Moon, LLC delivery // dell : 2014-10-24 Dell Inc. dell +// deloitte : 2015-07-31 Deloitte Touche Tohmatsu +deloitte + +// delta : 2015-02-19 Delta Air Lines, Inc. +delta + // democrat : 2013-10-24 United TLD Holdco Ltd. democrat -// dental : 2014-03-20 Tin Birch, LLC +// dental : 2014-03-20 Binky Moon, LLC dental -// dentist : 2014-03-20 +// dentist : 2014-03-20 United TLD Holdco Ltd. dentist // desi : 2013-11-14 Desi Networks LLC @@ -7349,124 +7902,184 @@ design // dev : 2014-10-16 Charleston Road Registry Inc. dev -// diamonds : 2013-09-22 John Edge, LLC +// dhl : 2015-07-23 Deutsche Post AG +dhl + +// diamonds : 2013-09-22 Binky Moon, LLC diamonds // diet : 2014-06-26 Uniregistry, Corp. diet -// digital : 2014-03-06 Dash Park, LLC +// digital : 2014-03-06 Binky Moon, LLC digital -// direct : 2014-04-10 Half Trail, LLC +// direct : 2014-04-10 Binky Moon, LLC direct -// directory : 2013-09-20 Extra Madison, LLC +// directory : 2013-09-20 Binky Moon, LLC directory -// discount : 2014-03-06 Holly Hill, LLC +// discount : 2014-03-06 Binky Moon, LLC discount +// discover : 2015-07-23 Discover Financial Services +discover + +// dish : 2015-07-30 Dish DBS Corporation +dish + +// diy : 2015-11-05 Lifestyle Domain Holdings, Inc. +diy + // dnp : 2013-12-13 Dai Nippon Printing Co., Ltd. dnp // docs : 2014-10-16 Charleston Road Registry Inc. docs -// dog : 2014-12-04 Koko Mill, LLC +// doctor : 2016-06-02 Binky Moon, LLC +doctor + +// dodge : 2015-07-30 FCA US LLC. +dodge + +// dog : 2014-12-04 Binky Moon, LLC dog // doha : 2014-09-18 Communications Regulatory Authority (CRA) doha -// domains : 2013-10-17 Sugar Cross, LLC +// domains : 2013-10-17 Binky Moon, LLC domains -// doosan : 2014-04-03 Doosan Corporation -doosan +// dot : 2015-05-21 Dish DBS Corporation +dot // download : 2014-11-20 dot Support Limited download +// drive : 2015-03-05 Charleston Road Registry Inc. +drive + +// dtv : 2015-06-04 Dish DBS Corporation +dtv + // dubai : 2015-01-01 Dubai Smart Government Department dubai +// duck : 2015-07-23 Johnson Shareholdings, Inc. +duck + +// dunlop : 2015-07-02 The Goodyear Tire & Rubber Company +dunlop + +// duns : 2015-08-06 The Dun & Bradstreet Corporation +duns + +// dupont : 2015-06-25 E. I. du Pont de Nemours and Company +dupont + // durban : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry durban // dvag : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG dvag +// dvr : 2016-05-26 Hughes Satellite Systems Corporation +dvr + // earth : 2014-12-04 Interlink Co., Ltd. earth // eat : 2014-01-23 Charleston Road Registry Inc. eat +// eco : 2016-07-08 Big Room Inc. +eco + // edeka : 2014-12-18 EDEKA Verband kaufmännischer Genossenschaften e.V. edeka -// education : 2013-11-07 Brice Way, LLC +// education : 2013-11-07 Binky Moon, LLC education -// email : 2013-10-31 Spring Madison, LLC +// email : 2013-10-31 Binky Moon, LLC email // emerck : 2014-04-03 Merck KGaA emerck -// energy : 2014-09-11 Binky Birch, LLC +// energy : 2014-09-11 Binky Moon, LLC energy // engineer : 2014-03-06 United TLD Holdco Ltd. engineer -// engineering : 2014-03-06 Romeo Canyon +// engineering : 2014-03-06 Binky Moon, LLC engineering -// enterprises : 2013-09-20 Snow Oaks, LLC +// enterprises : 2013-09-20 Binky Moon, LLC enterprises +// epost : 2015-07-23 Deutsche Post AG +epost + // epson : 2014-12-04 Seiko Epson Corporation epson -// equipment : 2013-08-27 Corn Station, LLC +// equipment : 2013-08-27 Binky Moon, LLC equipment +// ericsson : 2015-07-09 Telefonaktiebolaget L M Ericsson +ericsson + // erni : 2014-04-03 ERNI Group Holding AG erni // esq : 2014-05-08 Charleston Road Registry Inc. esq -// estate : 2013-08-27 Trixy Park, LLC +// estate : 2013-08-27 Binky Moon, LLC estate +// esurance : 2015-07-23 Esurance Insurance Company +esurance + +// etisalat : 2015-09-03 Emirates Telecommunications Corporation (trading as Etisalat) +etisalat + // eurovision : 2014-04-24 European Broadcasting Union (EBU) eurovision // eus : 2013-12-12 Puntueus Fundazioa eus -// events : 2013-12-05 Pioneer Maple, LLC +// events : 2013-12-05 Binky Moon, LLC events // everbank : 2014-05-15 EverBank everbank -// exchange : 2014-03-06 Spring Falls, LLC +// exchange : 2014-03-06 Binky Moon, LLC exchange -// expert : 2013-11-21 Magic Pass, LLC +// expert : 2013-11-21 Binky Moon, LLC expert -// exposed : 2013-12-05 Victor Beach, LLC +// exposed : 2013-12-05 Binky Moon, LLC exposed +// express : 2015-02-11 Binky Moon, LLC +express + +// extraspace : 2015-05-14 Extra Space Storage LLC +extraspace + // fage : 2014-12-18 Fage International S.A. fage -// fail : 2014-03-06 Atomic Pipe, LLC +// fail : 2014-03-06 Binky Moon, LLC fail // fairwinds : 2014-11-13 FairWinds Partners, LLC @@ -7475,133 +8088,220 @@ fairwinds // faith : 2014-11-20 dot Faith Limited faith -// fan : 2014-03-06 +// family : 2015-04-02 United TLD Holdco Ltd. +family + +// fan : 2014-03-06 Asiamix Digital Limited fan // fans : 2014-11-07 Asiamix Digital Limited fans -// farm : 2013-11-07 Just Maple, LLC +// farm : 2013-11-07 Binky Moon, LLC farm -// fashion : 2014-07-03 Top Level Domain Holdings Limited +// farmers : 2015-07-09 Farmers Insurance Exchange +farmers + +// fashion : 2014-07-03 Minds + Machines Group Limited fashion -// fast : 2014-12-18 Amazon EU S.à r.l. +// fast : 2014-12-18 Amazon Registry Services, Inc. fast +// fedex : 2015-08-06 Federal Express Corporation +fedex + // feedback : 2013-12-19 Top Level Spectrum, Inc. feedback +// ferrari : 2015-07-31 Fiat Chrysler Automobiles N.V. +ferrari + // ferrero : 2014-12-18 Ferrero Trading Lux S.A. ferrero +// fiat : 2015-07-31 Fiat Chrysler Automobiles N.V. +fiat + +// fidelity : 2015-07-30 Fidelity Brokerage Services LLC +fidelity + +// fido : 2015-08-06 Rogers Communications Canada Inc. +fido + // film : 2015-01-08 Motion Picture Domain Registry Pty Ltd film // final : 2014-10-16 Núcleo de Informação e Coordenação do Ponto BR - NIC.br final -// finance : 2014-03-20 Cotton Cypress, LLC +// finance : 2014-03-20 Binky Moon, LLC finance -// financial : 2014-03-06 Just Cover, LLC +// financial : 2014-03-06 Binky Moon, LLC financial -// firestone : 2014-12-18 Bridgestone Corporation +// fire : 2015-06-25 Amazon Registry Services, Inc. +fire + +// firestone : 2014-12-18 Bridgestone Licensing Services, Inc firestone // firmdale : 2014-03-27 Firmdale Holdings Limited firmdale -// fish : 2013-12-12 Fox Woods, LLC +// fish : 2013-12-12 Binky Moon, LLC fish -// fishing : 2013-11-21 Top Level Domain Holdings Limited +// fishing : 2013-11-21 Minds + Machines Group Limited fishing -// fit : 2014-11-07 Top Level Domain Holdings Limited +// fit : 2014-11-07 Minds + Machines Group Limited fit -// fitness : 2014-03-06 Brice Orchard, LLC +// fitness : 2014-03-06 Binky Moon, LLC fitness -// flights : 2013-12-05 Fox Station, LLC +// flickr : 2015-04-02 Yahoo! Domain Services Inc. +flickr + +// flights : 2013-12-05 Binky Moon, LLC flights -// florist : 2013-11-07 Half Cypress, LLC +// flir : 2015-07-23 FLIR Systems, Inc. +flir + +// florist : 2013-11-07 Binky Moon, LLC florist // flowers : 2014-10-09 Uniregistry, Corp. flowers -// flsmidth : 2014-07-24 FLSmidth A/S -flsmidth - // fly : 2014-05-08 Charleston Road Registry Inc. fly // foo : 2014-01-23 Charleston Road Registry Inc. foo -// football : 2014-12-18 Foggy Farms, LLC +// food : 2016-04-21 Lifestyle Domain Holdings, Inc. +food + +// foodnetwork : 2015-07-02 Lifestyle Domain Holdings, Inc. +foodnetwork + +// football : 2014-12-18 Binky Moon, LLC football // ford : 2014-11-13 Ford Motor Company ford -// forex : 2014-12-11 IG Group Holdings PLC +// forex : 2014-12-11 Dotforex Registry Limited forex -// forsale : 2014-05-22 +// forsale : 2014-05-22 United TLD Holdco Ltd. forsale -// foundation : 2013-12-05 John Dale, LLC +// forum : 2015-04-02 Fegistry, LLC +forum + +// foundation : 2013-12-05 Binky Moon, LLC foundation +// fox : 2015-09-11 FOX Registry, LLC +fox + +// free : 2015-12-10 Amazon Registry Services, Inc. +free + +// fresenius : 2015-07-30 Fresenius Immobilien-Verwaltungs-GmbH +fresenius + // frl : 2014-05-15 FRLregistry B.V. frl // frogans : 2013-12-19 OP3FT frogans -// fund : 2014-03-20 John Castle, LLC +// frontdoor : 2015-07-02 Lifestyle Domain Holdings, Inc. +frontdoor + +// frontier : 2015-02-05 Frontier Communications Corporation +frontier + +// ftr : 2015-07-16 Frontier Communications Corporation +ftr + +// fujitsu : 2015-07-30 Fujitsu Limited +fujitsu + +// fujixerox : 2015-07-23 Xerox DNHC LLC +fujixerox + +// fun : 2016-01-14 DotSpace Inc. +fun + +// fund : 2014-03-20 Binky Moon, LLC fund -// furniture : 2014-03-20 Lone Fields, LLC +// furniture : 2014-03-20 Binky Moon, LLC furniture -// futbol : 2013-09-20 +// futbol : 2013-09-20 United TLD Holdco Ltd. futbol +// fyi : 2015-04-02 Binky Moon, LLC +fyi + // gal : 2013-11-07 Asociación puntoGAL gal -// gallery : 2013-09-13 Sugar House, LLC +// gallery : 2013-09-13 Binky Moon, LLC gallery -// garden : 2014-06-26 Top Level Domain Holdings Limited +// gallo : 2015-06-11 Gallo Vineyards, Inc. +gallo + +// gallup : 2015-02-19 Gallup, Inc. +gallup + +// game : 2015-05-28 Uniregistry, Corp. +game + +// games : 2015-05-28 United TLD Holdco Ltd. +games + +// gap : 2015-07-31 The Gap, Inc. +gap + +// garden : 2014-06-26 Minds + Machines Group Limited garden // gbiz : 2014-07-17 Charleston Road Registry Inc. gbiz -// gdn : 2014-07-31 Joint Stock Company \ +// gdn : 2014-07-31 Joint Stock Company "Navigation-information systems" gdn // gea : 2014-12-04 GEA Group Aktiengesellschaft gea -// gent : 2014-01-23 COMBELL GROUP NV/SA +// gent : 2014-01-23 COMBELL NV gent +// genting : 2015-03-12 Resorts World Inc Pte. Ltd. +genting + +// george : 2015-07-31 Wal-Mart Stores, Inc. +george + // ggee : 2014-01-09 GMO Internet, Inc. ggee -// gift : 2013-10-17 Uniregistry, Corp. +// gift : 2013-10-17 DotGift, LLC gift -// gifts : 2014-07-03 Goose Sky, LLC +// gifts : 2014-07-03 Binky Moon, LLC gifts // gives : 2014-03-06 United TLD Holdco Ltd. @@ -7610,13 +8310,16 @@ gives // giving : 2014-11-13 Giving Limited giving -// glass : 2013-11-07 Black Cover, LLC +// glade : 2015-07-23 Johnson Shareholdings, Inc. +glade + +// glass : 2013-11-07 Binky Moon, LLC glass // gle : 2014-07-24 Charleston Road Registry Inc. gle -// global : 2014-04-17 Dot GLOBAL AS +// global : 2014-04-17 Dot Global Domain Registry Limited global // globo : 2013-12-19 Globo Comunicação e Participações S.A @@ -7625,24 +8328,33 @@ globo // gmail : 2014-05-01 Charleston Road Registry Inc. gmail -// gmo : 2014-01-09 GMO Internet, Inc. +// gmbh : 2016-01-29 Binky Moon, LLC +gmbh + +// gmo : 2014-01-09 GMO Internet Pte. Ltd. gmo // gmx : 2014-04-24 1&1 Mail & Media GmbH gmx -// gold : 2015-01-22 June Edge, LLC +// godaddy : 2015-07-23 Go Daddy East, LLC +godaddy + +// gold : 2015-01-22 Binky Moon, LLC gold // goldpoint : 2014-11-20 YODOBASHI CAMERA CO.,LTD. goldpoint -// golf : 2014-12-18 Lone falls, LLC +// golf : 2014-12-18 Binky Moon, LLC golf // goo : 2014-12-18 NTT Resonant Inc. goo +// goodyear : 2015-07-02 The Goodyear Tire & Rubber Company +goodyear + // goog : 2014-11-20 Charleston Road Registry Inc. goog @@ -7652,124 +8364,211 @@ google // gop : 2014-01-16 Republican State Leadership Committee, Inc. gop -// got : 2014-12-18 Amazon EU S.à r.l. +// got : 2014-12-18 Amazon Registry Services, Inc. got -// graphics : 2013-09-13 Over Madison, LLC +// grainger : 2015-05-07 Grainger Registry Services, LLC +grainger + +// graphics : 2013-09-13 Binky Moon, LLC graphics -// gratis : 2014-03-20 Pioneer Tigers, LLC +// gratis : 2014-03-20 Binky Moon, LLC gratis -// green : 2014-05-08 Afilias Limited +// green : 2014-05-08 Afilias plc green -// gripe : 2014-03-06 Corn Sunset, LLC +// gripe : 2014-03-06 Binky Moon, LLC gripe -// group : 2014-08-15 Romeo Town, LLC +// grocery : 2016-06-16 Wal-Mart Stores, Inc. +grocery + +// group : 2014-08-15 Binky Moon, LLC group +// guardian : 2015-07-30 The Guardian Life Insurance Company of America +guardian + // gucci : 2014-11-13 Guccio Gucci S.p.a. gucci // guge : 2014-08-28 Charleston Road Registry Inc. guge -// guide : 2013-09-13 Snow Moon, LLC +// guide : 2013-09-13 Binky Moon, LLC guide // guitars : 2013-11-14 Uniregistry, Corp. guitars -// guru : 2013-08-27 Pioneer Cypress, LLC +// guru : 2013-08-27 Binky Moon, LLC guru +// hair : 2015-12-03 L'Oréal +hair + // hamburg : 2014-02-20 Hamburg Top-Level-Domain GmbH hamburg // hangout : 2014-11-13 Charleston Road Registry Inc. hangout -// haus : 2013-12-05 +// haus : 2013-12-05 United TLD Holdco Ltd. haus -// healthcare : 2014-06-12 Silver Glen, LLC +// hbo : 2015-07-30 HBO Registry Services, Inc. +hbo + +// hdfc : 2015-07-30 HOUSING DEVELOPMENT FINANCE CORPORATION LIMITED +hdfc + +// hdfcbank : 2015-02-12 HDFC Bank Limited +hdfcbank + +// health : 2015-02-11 DotHealth, LLC +health + +// healthcare : 2014-06-12 Binky Moon, LLC healthcare // help : 2014-06-26 Uniregistry, Corp. help +// helsinki : 2015-02-05 City of Helsinki +helsinki + // here : 2014-02-06 Charleston Road Registry Inc. here // hermes : 2014-07-10 HERMES INTERNATIONAL hermes +// hgtv : 2015-07-02 Lifestyle Domain Holdings, Inc. +hgtv + // hiphop : 2014-03-06 Uniregistry, Corp. hiphop +// hisamitsu : 2015-07-16 Hisamitsu Pharmaceutical Co.,Inc. +hisamitsu + // hitachi : 2014-10-31 Hitachi, Ltd. hitachi -// hiv : 2014-03-13 dotHIV gemeinnuetziger e.V. +// hiv : 2014-03-13 Uniregistry, Corp. hiv -// holdings : 2013-08-27 John Madison, LLC +// hkt : 2015-05-14 PCCW-HKT DataCom Services Limited +hkt + +// hockey : 2015-03-19 Binky Moon, LLC +hockey + +// holdings : 2013-08-27 Binky Moon, LLC holdings -// holiday : 2013-11-07 Goose Woods, LLC +// holiday : 2013-11-07 Binky Moon, LLC holiday +// homedepot : 2015-04-02 Home Depot Product Authority, LLC +homedepot + +// homegoods : 2015-07-16 The TJX Companies, Inc. +homegoods + // homes : 2014-01-09 DERHomes, LLC homes +// homesense : 2015-07-16 The TJX Companies, Inc. +homesense + // honda : 2014-12-18 Honda Motor Co., Ltd. honda -// horse : 2013-11-21 Top Level Domain Holdings Limited +// honeywell : 2015-07-23 Honeywell GTLD LLC +honeywell + +// horse : 2013-11-21 Minds + Machines Group Limited horse +// hospital : 2016-10-20 Binky Moon, LLC +hospital + // host : 2014-04-17 DotHost Inc. host // hosting : 2014-05-29 Uniregistry, Corp. hosting +// hot : 2015-08-27 Amazon Registry Services, Inc. +hot + +// hoteles : 2015-03-05 Travel Reservations SRL +hoteles + +// hotels : 2016-04-07 Booking.com B.V. +hotels + // hotmail : 2014-12-18 Microsoft Corporation hotmail -// house : 2013-11-07 Sugar Park, LLC +// house : 2013-11-07 Binky Moon, LLC house // how : 2014-01-23 Charleston Road Registry Inc. how -// hsbc : 2014-10-24 HSBC Holdings PLC +// hsbc : 2014-10-24 HSBC Global Services (UK) Limited hsbc +// hughes : 2015-07-30 Hughes Satellite Systems Corporation +hughes + +// hyatt : 2015-07-30 Hyatt GTLD, L.L.C. +hyatt + +// hyundai : 2015-07-09 Hyundai Motor Company +hyundai + // ibm : 2014-07-31 International Business Machines Corporation ibm +// icbc : 2015-02-19 Industrial and Commercial Bank of China Limited +icbc + // ice : 2014-10-30 IntercontinentalExchange, Inc. ice -// icu : 2015-01-08 One.com A/S +// icu : 2015-01-08 ShortDot SA icu +// ieee : 2015-07-23 IEEE Global LLC +ieee + // ifm : 2014-01-30 ifm electronic gmbh ifm -// iinet : 2014-07-03 Connect West Pty. Ltd. -iinet +// ikano : 2015-07-09 Ikano S.A. +ikano -// immo : 2014-07-10 Auburn Bloom, LLC +// imamat : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation) +imamat + +// imdb : 2015-06-25 Amazon Registry Services, Inc. +imdb + +// immo : 2014-07-10 Binky Moon, LLC immo // immobilien : 2013-11-07 United TLD Holdco Ltd. immobilien -// industries : 2013-12-05 Outer House, LLC +// inc : 2018-03-10 GTLD Limited +inc + +// industries : 2013-12-05 Binky Moon, LLC industries // infiniti : 2014-03-27 NISSAN MOTOR CO., LTD. @@ -7781,24 +8580,39 @@ ing // ink : 2013-12-05 Top Level Design, LLC ink -// institute : 2013-11-07 Outer Maple, LLC +// institute : 2013-11-07 Binky Moon, LLC institute -// insure : 2014-03-20 Pioneer Willow, LLC +// insurance : 2015-02-19 fTLD Registry Services LLC +insurance + +// insure : 2014-03-20 Binky Moon, LLC insure -// international : 2013-11-07 Wild Way, LLC +// intel : 2015-08-06 Intel Corporation +intel + +// international : 2013-11-07 Binky Moon, LLC international -// investments : 2014-03-20 Holly Glen, LLC +// intuit : 2015-07-30 Intuit Administrative Services, Inc. +intuit + +// investments : 2014-03-20 Binky Moon, LLC investments // ipiranga : 2014-08-28 Ipiranga Produtos de Petroleo S.A. ipiranga -// irish : 2014-08-07 Dot-Irish LLC +// irish : 2014-08-07 Binky Moon, LLC irish +// iselect : 2015-02-11 iSelect Ltd +iselect + +// ismaili : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation) +ismaili + // ist : 2014-08-28 Istanbul Metropolitan Municipality ist @@ -7808,8 +8622,11 @@ istanbul // itau : 2014-10-02 Itau Unibanco Holding S.A. itau -// iwc : 2014-06-23 Richemont DNS Inc. -iwc +// itv : 2015-07-09 ITV Services Limited +itv + +// iveco : 2015-09-03 CNH Industrial N.V. +iveco // jaguar : 2014-11-13 Jaguar Land Rover Ltd jaguar @@ -7820,54 +8637,99 @@ java // jcb : 2014-11-20 JCB Co., Ltd. jcb -// jetzt : 2014-01-09 New TLD Company AB +// jcp : 2015-04-23 JCP Media, Inc. +jcp + +// jeep : 2015-07-30 FCA US LLC. +jeep + +// jetzt : 2014-01-09 Binky Moon, LLC jetzt -// jlc : 2014-12-04 Richemont DNS Inc. -jlc +// jewelry : 2015-03-05 Binky Moon, LLC +jewelry + +// jio : 2015-04-02 Reliance Industries Limited +jio + +// jll : 2015-04-02 Jones Lang LaSalle Incorporated +jll + +// jmp : 2015-03-26 Matrix IP LLC +jmp + +// jnj : 2015-06-18 Johnson & Johnson Services, Inc. +jnj // joburg : 2014-03-24 ZA Central Registry NPC trading as ZA Central Registry joburg -// jot : 2014-12-18 Amazon EU S.à r.l. +// jot : 2014-12-18 Amazon Registry Services, Inc. jot -// joy : 2014-12-18 Amazon EU S.à r.l. +// joy : 2014-12-18 Amazon Registry Services, Inc. joy +// jpmorgan : 2015-04-30 JPMorgan Chase Bank, National Association +jpmorgan + // jprs : 2014-09-18 Japan Registry Services Co., Ltd. jprs // juegos : 2014-03-20 Uniregistry, Corp. juegos +// juniper : 2015-07-30 JUNIPER NETWORKS, INC. +juniper + // kaufen : 2013-11-07 United TLD Holdco Ltd. kaufen // kddi : 2014-09-12 KDDI CORPORATION kddi +// kerryhotels : 2015-04-30 Kerry Trading Co. Limited +kerryhotels + +// kerrylogistics : 2015-04-09 Kerry Trading Co. Limited +kerrylogistics + +// kerryproperties : 2015-04-09 Kerry Trading Co. Limited +kerryproperties + // kfh : 2014-12-04 Kuwait Finance House kfh -// kim : 2013-09-23 Afilias Limited +// kia : 2015-07-09 KIA MOTORS CORPORATION +kia + +// kim : 2013-09-23 Afilias plc kim // kinder : 2014-11-07 Ferrero Trading Lux S.A. kinder -// kitchen : 2013-09-20 Just Goodbye, LLC +// kindle : 2015-06-25 Amazon Registry Services, Inc. +kindle + +// kitchen : 2013-09-20 Binky Moon, LLC kitchen // kiwi : 2013-09-20 DOT KIWI LIMITED kiwi -// koeln : 2014-01-09 NetCologne Gesellschaft für Telekommunikation mbH +// koeln : 2014-01-09 punkt.wien GmbH koeln // komatsu : 2015-01-08 Komatsu Ltd. komatsu +// kosher : 2015-08-20 Kosher Marketing Assets LLC +kosher + +// kpmg : 2015-04-23 KPMG International Cooperative (KPMG International Genossenschaft) +kpmg + // kpn : 2015-01-08 Koninklijke KPN N.V. kpn @@ -7877,43 +8739,82 @@ krd // kred : 2013-12-19 KredTLD Pty Ltd kred +// kuokgroup : 2015-04-09 Kerry Trading Co. Limited +kuokgroup + // kyoto : 2014-11-07 Academic Institution: Kyoto Jyoho Gakuen kyoto -// lacaixa : 2014-01-09 CAIXA D'ESTALVIS I PENSIONS DE BARCELONA +// lacaixa : 2014-01-09 Fundación Bancaria Caixa d’Estalvis i Pensions de Barcelona, “la Caixa” lacaixa -// land : 2013-09-10 Pine Moon, LLC +// ladbrokes : 2015-08-06 LADBROKES INTERNATIONAL PLC +ladbrokes + +// lamborghini : 2015-06-04 Automobili Lamborghini S.p.A. +lamborghini + +// lamer : 2015-10-01 The Estée Lauder Companies Inc. +lamer + +// lancaster : 2015-02-12 LANCASTER +lancaster + +// lancia : 2015-07-31 Fiat Chrysler Automobiles N.V. +lancia + +// lancome : 2015-07-23 L'Oréal +lancome + +// land : 2013-09-10 Binky Moon, LLC land // landrover : 2014-11-13 Jaguar Land Rover Ltd landrover +// lanxess : 2015-07-30 LANXESS Corporation +lanxess + +// lasalle : 2015-04-02 Jones Lang LaSalle Incorporated +lasalle + // lat : 2014-10-16 ECOM-LAC Federaciòn de Latinoamèrica y el Caribe para Internet y el Comercio Electrònico lat +// latino : 2015-07-30 Dish DBS Corporation +latino + // latrobe : 2014-06-16 La Trobe University latrobe // law : 2015-01-22 Minds + Machines Group Limited law -// lawyer : 2014-03-20 +// lawyer : 2014-03-20 United TLD Holdco Ltd. lawyer -// lds : 2014-03-20 IRI Domain Management, LLC (\ +// lds : 2014-03-20 IRI Domain Management, LLC ("Applicant") lds -// lease : 2014-03-06 Victor Trail, LLC +// lease : 2014-03-06 Binky Moon, LLC lease // leclerc : 2014-08-07 A.C.D. LEC Association des Centres Distributeurs Edouard Leclerc leclerc -// legal : 2014-10-16 Blue Falls, LLC +// lefrak : 2015-07-16 LeFrak Organization, Inc. +lefrak + +// legal : 2014-10-16 Binky Moon, LLC legal -// lgbt : 2014-05-08 Afilias Limited +// lego : 2015-07-16 LEGO Juris A/S +lego + +// lexus : 2015-04-23 TOYOTA MOTOR CORPORATION +lexus + +// lgbt : 2014-05-08 Afilias plc lgbt // liaison : 2014-10-02 Liaison Technologies, Incorporated @@ -7922,7 +8823,7 @@ liaison // lidl : 2014-09-18 Schwarz Domains und Services GmbH & Co. KG lidl -// life : 2014-02-06 Trixy Oaks, LLC +// life : 2014-02-06 Binky Moon, LLC life // lifeinsurance : 2015-01-15 American Council of Life Insurers @@ -7931,16 +8832,19 @@ lifeinsurance // lifestyle : 2014-12-11 Lifestyle Domain Holdings, Inc. lifestyle -// lighting : 2013-08-27 John McCook, LLC +// lighting : 2013-08-27 Binky Moon, LLC lighting -// like : 2014-12-18 Amazon EU S.à r.l. +// like : 2014-12-18 Amazon Registry Services, Inc. like -// limited : 2014-03-06 Big Fest, LLC +// lilly : 2015-07-31 Eli Lilly and Company +lilly + +// limited : 2014-03-06 Binky Moon, LLC limited -// limo : 2013-10-17 Hidden Frostbite, LLC +// limo : 2013-10-17 Binky Moon, LLC limo // lincoln : 2014-11-13 Ford Motor Company @@ -7952,49 +8856,85 @@ linde // link : 2013-11-14 Uniregistry, Corp. link -// live : 2014-12-04 Half Woods, LLC +// lipsy : 2015-06-25 Lipsy Ltd +lipsy + +// live : 2014-12-04 United TLD Holdco Ltd. live +// living : 2015-07-30 Lifestyle Domain Holdings, Inc. +living + +// lixil : 2015-03-19 LIXIL Group Corporation +lixil + +// llc : 2017-12-14 Afilias plc +llc + // loan : 2014-11-20 dot Loan Limited loan -// loans : 2014-03-20 June Woods, LLC +// loans : 2014-03-20 Binky Moon, LLC loans +// locker : 2015-06-04 Dish DBS Corporation +locker + +// locus : 2015-06-25 Locus Analytics LLC +locus + +// loft : 2015-07-30 Annco, Inc. +loft + +// lol : 2015-01-30 Uniregistry, Corp. +lol + // london : 2013-11-14 Dot London Domains Limited london // lotte : 2014-11-07 Lotte Holdings Co., Ltd. lotte -// lotto : 2014-04-10 Afilias Limited +// lotto : 2014-04-10 Afilias plc lotto // love : 2014-12-22 Merchant Law Group LLP love -// ltd : 2014-09-25 Over Corner, LLC +// lpl : 2015-07-30 LPL Holdings, Inc. +lpl + +// lplfinancial : 2015-07-30 LPL Holdings, Inc. +lplfinancial + +// ltd : 2014-09-25 Binky Moon, LLC ltd -// ltda : 2014-04-17 DOMAIN ROBOT SERVICOS DE HOSPEDAGEM NA INTERNET LTDA +// ltda : 2014-04-17 InterNetX, Corp ltda +// lundbeck : 2015-08-06 H. Lundbeck A/S +lundbeck + // lupin : 2014-11-07 LUPIN LIMITED lupin -// luxe : 2014-01-09 Top Level Domain Holdings Limited +// luxe : 2014-01-09 Minds + Machines Group Limited luxe // luxury : 2013-10-17 Luxury Partners, LLC luxury +// macys : 2015-07-31 Macys, Inc. +macys + // madrid : 2014-05-01 Comunidad de Madrid madrid // maif : 2014-10-02 Mutuelle Assurance Instituteur France (MAIF) maif -// maison : 2013-12-05 Victor Frostbite, LLC +// maison : 2013-12-05 Binky Moon, LLC maison // makeup : 2015-01-15 L'Oréal @@ -8003,28 +8943,49 @@ makeup // man : 2014-12-04 MAN SE man -// management : 2013-11-07 John Goodbye, LLC +// management : 2013-11-07 Binky Moon, LLC management // mango : 2013-10-24 PUNTO FA S.L. mango -// market : 2014-03-06 +// map : 2016-06-09 Charleston Road Registry Inc. +map + +// market : 2014-03-06 United TLD Holdco Ltd. market -// marketing : 2013-11-07 Fern Pass, LLC +// marketing : 2013-11-07 Binky Moon, LLC marketing -// markets : 2014-12-11 IG Group Holdings PLC +// markets : 2014-12-11 Dotmarkets Registry Limited markets // marriott : 2014-10-09 Marriott Worldwide Corporation marriott -// media : 2014-03-06 Grand Glen, LLC +// marshalls : 2015-07-16 The TJX Companies, Inc. +marshalls + +// maserati : 2015-07-31 Fiat Chrysler Automobiles N.V. +maserati + +// mattel : 2015-08-06 Mattel Sites, Inc. +mattel + +// mba : 2015-04-02 Binky Moon, LLC +mba + +// mckinsey : 2015-07-31 McKinsey Holdings, Inc. +mckinsey + +// med : 2015-08-06 Medistry LLC +med + +// media : 2014-03-06 Binky Moon, LLC media -// meet : 2014-01-16 Afilias Limited +// meet : 2014-01-16 Charleston Road Registry Inc. meet // melbourne : 2014-05-29 The Crown in right of the State of Victoria, represented by its Department of State Development, Business and Innovation @@ -8036,13 +8997,19 @@ meme // memorial : 2014-10-16 Dog Beach, LLC memorial +// men : 2015-02-26 Exclusive Registry Limited +men + // menu : 2013-09-11 Wedding TLD2, LLC menu -// meo : 2014-11-07 PT Comunicacoes S.A. -meo +// merckmsd : 2016-07-14 MSD Registry Holdings, Inc. +merckmsd -// miami : 2013-12-19 Top Level Domain Holdings Limited +// metlife : 2015-05-07 MetLife Services and Solutions, LLC +metlife + +// miami : 2013-12-19 Minds + Machines Group Limited miami // microsoft : 2014-12-18 Microsoft Corporation @@ -8051,9 +9018,27 @@ microsoft // mini : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft mini +// mint : 2015-07-30 Intuit Administrative Services, Inc. +mint + +// mit : 2015-07-02 Massachusetts Institute of Technology +mit + +// mitsubishi : 2015-07-23 Mitsubishi Corporation +mitsubishi + +// mlb : 2015-05-21 MLB Advanced Media DH, LLC +mlb + +// mls : 2015-04-23 The Canadian Real Estate Association +mls + // mma : 2014-11-07 MMA IARD mma +// mobile : 2016-06-02 Dish DBS Corporation +mobile + // mobily : 2014-12-18 GreenTech Consultancy Company W.L.L. mobily @@ -8063,72 +9048,117 @@ moda // moe : 2013-11-13 Interlink Co., Ltd. moe -// moi : 2014-12-18 Amazon EU S.à r.l. +// moi : 2014-12-18 Amazon Registry Services, Inc. moi +// mom : 2015-04-16 Uniregistry, Corp. +mom + // monash : 2013-09-30 Monash University monash -// money : 2014-10-16 Outer McCook, LLC +// money : 2014-10-16 Binky Moon, LLC money -// montblanc : 2014-06-23 Richemont DNS Inc. -montblanc +// monster : 2015-09-11 Monster Worldwide, Inc. +monster -// mormon : 2013-12-05 IRI Domain Management, LLC (\ +// mopar : 2015-07-30 FCA US LLC. +mopar + +// mormon : 2013-12-05 IRI Domain Management, LLC ("Applicant") mormon -// mortgage : 2014-03-20 +// mortgage : 2014-03-20 United TLD Holdco Ltd. mortgage // moscow : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID) moscow +// moto : 2015-06-04 Motorola Trademark Holdings, LLC +moto + // motorcycles : 2014-01-09 DERMotorcycles, LLC motorcycles // mov : 2014-01-30 Charleston Road Registry Inc. mov +// movie : 2015-02-05 Binky Moon, LLC +movie + // movistar : 2014-10-16 Telefónica S.A. movistar +// msd : 2015-07-23 MSD Registry Holdings, Inc. +msd + // mtn : 2014-12-04 MTN Dubai Limited mtn -// mtpc : 2014-11-20 Mitsubishi Tanabe Pharma Corporation -mtpc +// mtr : 2015-03-12 MTR Corporation Limited +mtr -// nadex : 2014-12-11 IG Group Holdings PLC +// mutual : 2015-04-02 Northwestern Mutual MU TLD Registry, LLC +mutual + +// nab : 2015-08-20 National Australia Bank Limited +nab + +// nadex : 2014-12-11 Nadex Domains, Inc. nadex // nagoya : 2013-10-24 GMO Registry, Inc. nagoya +// nationwide : 2015-07-23 Nationwide Mutual Insurance Company +nationwide + +// natura : 2015-03-12 NATURA COSMÉTICOS S.A. +natura + // navy : 2014-03-06 United TLD Holdco Ltd. navy +// nba : 2015-07-31 NBA REGISTRY, LLC +nba + // nec : 2015-01-08 NEC Corporation nec // netbank : 2014-06-26 COMMONWEALTH BANK OF AUSTRALIA netbank -// network : 2013-11-14 Trixy Manor, LLC +// netflix : 2015-06-18 Netflix, Inc. +netflix + +// network : 2013-11-14 Binky Moon, LLC network -// neustar : 2013-12-05 NeuStar, Inc. +// neustar : 2013-12-05 Registry Services, LLC neustar // new : 2014-01-30 Charleston Road Registry Inc. new -// news : 2014-12-18 Hidden Bloom, LLC +// newholland : 2015-09-03 CNH Industrial N.V. +newholland + +// news : 2014-12-18 United TLD Holdco Ltd. news +// next : 2015-06-18 Next plc +next + +// nextdirect : 2015-06-18 Next plc +nextdirect + // nexus : 2014-07-24 Charleston Road Registry Inc. nexus +// nfl : 2015-07-23 NFL Reg Ops LLC +nfl + // ngo : 2014-03-06 Public Interest Registry ngo @@ -8138,21 +9168,39 @@ nhk // nico : 2014-12-04 DWANGO Co., Ltd. nico +// nike : 2015-07-23 NIKE, Inc. +nike + +// nikon : 2015-05-21 NIKON CORPORATION +nikon + // ninja : 2013-11-07 United TLD Holdco Ltd. ninja // nissan : 2014-03-27 NISSAN MOTOR CO., LTD. nissan +// nissay : 2015-10-29 Nippon Life Insurance Company +nissay + // nokia : 2015-01-08 Nokia Corporation nokia +// northwesternmutual : 2015-06-18 Northwestern Mutual Registry, LLC +northwesternmutual + // norton : 2014-12-04 Symantec Corporation norton +// now : 2015-06-25 Amazon Registry Services, Inc. +now + // nowruz : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. nowruz +// nowtv : 2015-05-14 Starbucks (HK) Limited +nowtv + // nra : 2014-05-22 NRA Holdings Company, INC. nra @@ -8168,9 +9216,30 @@ nyc // obi : 2014-09-25 OBI Group Holding SE & Co. KGaA obi -// okinawa : 2013-12-05 BusinessRalliart Inc. +// observer : 2015-04-30 Top Level Spectrum, Inc. +observer + +// off : 2015-07-23 Johnson Shareholdings, Inc. +off + +// office : 2015-03-12 Microsoft Corporation +office + +// okinawa : 2013-12-05 BRregistry, Inc. okinawa +// olayan : 2015-05-14 Crescent Holding GmbH +olayan + +// olayangroup : 2015-05-14 Crescent Holding GmbH +olayangroup + +// oldnavy : 2015-07-31 The Gap, Inc. +oldnavy + +// ollo : 2015-06-04 Dish DBS Corporation +ollo + // omega : 2015-01-08 The Swatch Group Ltd omega @@ -8186,29 +9255,44 @@ onl // online : 2015-01-15 DotOnline Inc. online +// onyourside : 2015-07-23 Nationwide Mutual Insurance Company +onyourside + // ooo : 2014-01-09 INFIBEAM INCORPORATION LIMITED ooo +// open : 2015-07-31 American Express Travel Related Services Company, Inc. +open + // oracle : 2014-06-19 Oracle Corporation oracle -// organic : 2014-03-27 Afilias Limited +// orange : 2015-03-12 Orange Brand Services Limited +orange + +// organic : 2014-03-27 Afilias plc organic -// osaka : 2014-09-04 Interlink Co., Ltd. +// origins : 2015-10-01 The Estée Lauder Companies Inc. +origins + +// osaka : 2014-09-04 Osaka Registry Co., Ltd. osaka // otsuka : 2013-10-11 Otsuka Holdings Co., Ltd. otsuka +// ott : 2015-06-04 Dish DBS Corporation +ott + // ovh : 2014-01-16 OVH SAS ovh // page : 2014-12-04 Charleston Road Registry Inc. page -// panerai : 2014-11-07 Richemont DNS Inc. -panerai +// panasonic : 2015-07-30 Panasonic Corporation +panasonic // paris : 2014-01-30 City of Paris paris @@ -8216,28 +9300,49 @@ paris // pars : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. pars -// partners : 2013-12-05 Magic Glen, LLC +// partners : 2013-12-05 Binky Moon, LLC partners -// parts : 2013-12-05 Sea Goodbye, LLC +// parts : 2013-12-05 Binky Moon, LLC parts // party : 2014-09-11 Blue Sky Registry Limited party +// passagens : 2015-03-05 Travel Reservations SRL +passagens + +// pay : 2015-08-27 Amazon Registry Services, Inc. +pay + +// pccw : 2015-05-14 PCCW Enterprises Limited +pccw + +// pet : 2015-05-07 Afilias plc +pet + +// pfizer : 2015-09-11 Pfizer Inc. +pfizer + // pharmacy : 2014-06-19 National Association of Boards of Pharmacy pharmacy +// phd : 2016-07-28 Charleston Road Registry Inc. +phd + // philips : 2014-11-07 Koninklijke Philips N.V. philips +// phone : 2016-06-02 Dish DBS Corporation +phone + // photo : 2013-11-14 Uniregistry, Corp. photo -// photography : 2013-09-20 Sugar Glen, LLC +// photography : 2013-09-20 Binky Moon, LLC photography -// photos : 2013-10-17 Sea Corner, LLC +// photos : 2013-10-17 Binky Moon, LLC photos // physio : 2014-05-01 PhysBiz Pty Ltd @@ -8252,112 +9357,178 @@ pics // pictet : 2014-06-26 Pictet Europe S.A. pictet -// pictures : 2014-03-06 Foggy Sky, LLC +// pictures : 2014-03-06 Binky Moon, LLC pictures // pid : 2015-01-08 Top Level Spectrum, Inc. pid -// pin : 2014-12-18 Amazon EU S.à r.l. +// pin : 2014-12-18 Amazon Registry Services, Inc. pin -// pink : 2013-10-01 Afilias Limited +// ping : 2015-06-11 Ping Registry Provider, Inc. +ping + +// pink : 2013-10-01 Afilias plc pink -// pizza : 2014-06-26 Foggy Moon, LLC +// pioneer : 2015-07-16 Pioneer Corporation +pioneer + +// pizza : 2014-06-26 Binky Moon, LLC pizza -// place : 2014-04-24 Snow Galley, LLC +// place : 2014-04-24 Binky Moon, LLC place -// plumbing : 2013-09-10 Spring Tigers, LLC +// play : 2015-03-05 Charleston Road Registry Inc. +play + +// playstation : 2015-07-02 Sony Computer Entertainment Inc. +playstation + +// plumbing : 2013-09-10 Binky Moon, LLC plumbing +// plus : 2015-02-05 Binky Moon, LLC +plus + +// pnc : 2015-07-02 PNC Domain Co., LLC +pnc + // pohl : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG pohl -// poker : 2014-07-03 Afilias Domains No. 5 Limited +// poker : 2014-07-03 Afilias plc poker +// politie : 2015-08-20 Politie Nederland +politie + // porn : 2014-10-16 ICM Registry PN LLC porn +// pramerica : 2015-07-30 Prudential Financial, Inc. +pramerica + // praxi : 2013-12-05 Praxi S.p.A. praxi // press : 2014-04-03 DotPress Inc. press +// prime : 2015-06-25 Amazon Registry Services, Inc. +prime + // prod : 2014-01-23 Charleston Road Registry Inc. prod -// productions : 2013-12-05 Magic Birch, LLC +// productions : 2013-12-05 Binky Moon, LLC productions // prof : 2014-07-24 Charleston Road Registry Inc. prof -// promo : 2014-12-18 Play.PROMO Oy +// progressive : 2015-07-23 Progressive Casualty Insurance Company +progressive + +// promo : 2014-12-18 Afilias plc promo -// properties : 2013-12-05 Big Pass, LLC +// properties : 2013-12-05 Binky Moon, LLC properties // property : 2014-05-22 Uniregistry, Corp. property +// protection : 2015-04-23 XYZ.COM LLC +protection + +// pru : 2015-07-30 Prudential Financial, Inc. +pru + +// prudential : 2015-07-30 Prudential Financial, Inc. +prudential + // pub : 2013-12-12 United TLD Holdco Ltd. pub +// pwc : 2015-10-29 PricewaterhouseCoopers LLP +pwc + // qpon : 2013-11-14 dotCOOL, Inc. qpon // quebec : 2013-12-19 PointQuébec Inc quebec +// quest : 2015-03-26 Quest ION Limited +quest + +// qvc : 2015-07-30 QVC, Inc. +qvc + // racing : 2014-12-04 Premier Registry Limited racing -// read : 2014-12-18 Amazon EU S.à r.l. +// radio : 2016-07-21 European Broadcasting Union (EBU) +radio + +// raid : 2015-07-23 Johnson Shareholdings, Inc. +raid + +// read : 2014-12-18 Amazon Registry Services, Inc. read +// realestate : 2015-09-11 dotRealEstate LLC +realestate + // realtor : 2014-05-29 Real Estate Domains LLC realtor -// recipes : 2013-10-17 Grand Island, LLC +// realty : 2015-03-19 Fegistry, LLC +realty + +// recipes : 2013-10-17 Binky Moon, LLC recipes -// red : 2013-11-07 Afilias Limited +// red : 2013-11-07 Afilias plc red // redstone : 2014-10-31 Redstone Haute Couture Co., Ltd. redstone +// redumbrella : 2015-03-26 Travelers TLD, LLC +redumbrella + // rehab : 2014-03-06 United TLD Holdco Ltd. rehab -// reise : 2014-03-13 dotreise GmbH +// reise : 2014-03-13 Binky Moon, LLC reise -// reisen : 2014-03-06 New Cypress, LLC +// reisen : 2014-03-06 Binky Moon, LLC reisen // reit : 2014-09-04 National Association of Real Estate Investment Trusts, Inc. reit +// reliance : 2015-04-02 Reliance Industries Limited +reliance + // ren : 2013-12-12 Beijing Qianxiang Wangjing Technology Development Co., Ltd. ren -// rent : 2014-12-04 DERRent, LLC +// rent : 2014-12-04 XYZ.COM LLC rent -// rentals : 2013-12-05 Big Hollow,LLC +// rentals : 2013-12-05 Binky Moon, LLC rentals -// repair : 2013-11-07 Lone Sunset, LLC +// repair : 2013-11-07 Binky Moon, LLC repair -// report : 2013-12-05 Binky Glen, LLC +// report : 2013-12-05 Binky Moon, LLC report // republican : 2014-03-20 United TLD Holdco Ltd. @@ -8366,52 +9537,79 @@ republican // rest : 2013-12-19 Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable rest -// restaurant : 2014-07-03 Snow Avenue, LLC +// restaurant : 2014-07-03 Binky Moon, LLC restaurant // review : 2014-11-20 dot Review Limited review -// reviews : 2013-09-13 +// reviews : 2013-09-13 United TLD Holdco Ltd. reviews +// rexroth : 2015-06-18 Robert Bosch GMBH +rexroth + // rich : 2013-11-21 I-Registry Ltd. rich +// richardli : 2015-05-14 Pacific Century Asset Management (HK) Limited +richardli + // ricoh : 2014-11-20 Ricoh Company, Ltd. ricoh +// rightathome : 2015-07-23 Johnson Shareholdings, Inc. +rightathome + +// ril : 2015-04-02 Reliance Industries Limited +ril + // rio : 2014-02-27 Empresa Municipal de Informática SA - IPLANRIO rio // rip : 2014-07-10 United TLD Holdco Ltd. rip +// rmit : 2015-11-19 Royal Melbourne Institute of Technology +rmit + // rocher : 2014-12-18 Ferrero Trading Lux S.A. rocher -// rocks : 2013-11-14 +// rocks : 2013-11-14 United TLD Holdco Ltd. rocks -// rodeo : 2013-12-19 Top Level Domain Holdings Limited +// rodeo : 2013-12-19 Minds + Machines Group Limited rodeo -// room : 2014-12-18 Amazon EU S.à r.l. +// rogers : 2015-08-06 Rogers Communications Canada Inc. +rogers + +// room : 2014-12-18 Amazon Registry Services, Inc. room // rsvp : 2014-05-08 Charleston Road Registry Inc. rsvp +// rugby : 2016-12-15 World Rugby Strategic Developments Limited +rugby + // ruhr : 2013-10-02 regiodot GmbH & Co. KG ruhr -// ryukyu : 2014-01-09 BusinessRalliart Inc. +// run : 2015-03-19 Binky Moon, LLC +run + +// rwe : 2015-04-02 RWE AG +rwe + +// ryukyu : 2014-01-09 BRregistry, Inc. ryukyu // saarland : 2013-12-12 dotSaarland GmbH saarland -// safe : 2014-12-18 Amazon EU S.à r.l. +// safe : 2014-12-18 Amazon Registry Services, Inc. safe // safety : 2015-01-08 Safety Registry Services, LLC. @@ -8420,12 +9618,15 @@ safety // sakura : 2014-12-18 SAKURA Internet Inc. sakura -// sale : 2014-10-16 +// sale : 2014-10-16 United TLD Holdco Ltd. sale -// salon : 2014-12-11 Outer Orchard, LLC +// salon : 2014-12-11 Binky Moon, LLC salon +// samsclub : 2015-07-31 Wal-Mart Stores, Inc. +samsclub + // samsung : 2014-04-03 SAMSUNG SDS CO., LTD samsung @@ -8441,34 +9642,43 @@ sanofi // sap : 2014-03-27 SAP AG sap -// sapo : 2014-11-07 PT Comunicacoes S.A. -sapo - -// sarl : 2014-07-03 Delta Orchard, LLC +// sarl : 2014-07-03 Binky Moon, LLC sarl +// sas : 2015-04-02 Research IP LLC +sas + +// save : 2015-06-25 Amazon Registry Services, Inc. +save + // saxo : 2014-10-31 Saxo Bank A/S saxo +// sbi : 2015-03-12 STATE BANK OF INDIA +sbi + // sbs : 2014-11-07 SPECIAL BROADCASTING SERVICE CORPORATION sbs // sca : 2014-03-13 SVENSKA CELLULOSA AKTIEBOLAGET SCA (publ) sca -// scb : 2014-02-20 The Siam Commercial Bank Public Company Limited (\ +// scb : 2014-02-20 The Siam Commercial Bank Public Company Limited ("SCB") scb +// schaeffler : 2015-08-06 Schaeffler Technologies AG & Co. KG +schaeffler + // schmidt : 2014-04-03 SALM S.A.S. schmidt // scholarships : 2014-04-24 Scholarships.com, LLC scholarships -// school : 2014-12-18 Little Galley, LLC +// school : 2014-12-18 Binky Moon, LLC school -// schule : 2014-03-06 Outer Moon, LLC +// schule : 2014-03-06 Binky Moon, LLC schule // schwarz : 2014-09-18 Schwarz Domains und Services GmbH & Co. KG @@ -8477,24 +9687,45 @@ schwarz // science : 2014-09-11 dot Science Limited science +// scjohnson : 2015-07-23 Johnson Shareholdings, Inc. +scjohnson + // scor : 2014-10-31 SCOR SE scor // scot : 2014-01-23 Dot Scot Registry Limited scot +// search : 2016-06-09 Charleston Road Registry Inc. +search + // seat : 2014-05-22 SEAT, S.A. (Sociedad Unipersonal) seat +// secure : 2015-08-27 Amazon Registry Services, Inc. +secure + +// security : 2015-05-14 XYZ.COM LLC +security + // seek : 2014-12-04 Seek Limited seek +// select : 2015-10-08 iSelect Ltd +select + // sener : 2014-10-24 Sener Ingeniería y Sistemas, S.A. sener -// services : 2014-02-27 Fox Castle, LLC +// services : 2014-02-27 Binky Moon, LLC services +// ses : 2015-07-23 SES +ses + +// seven : 2015-08-06 Seven West Media Ltd +seven + // sew : 2014-07-17 SEW-EURODRIVE GmbH & Co KG sew @@ -8504,57 +9735,108 @@ sex // sexy : 2013-09-11 Uniregistry, Corp. sexy +// sfr : 2015-08-13 Societe Francaise du Radiotelephone - SFR +sfr + +// shangrila : 2015-09-03 Shangri‐La International Hotel Management Limited +shangrila + // sharp : 2014-05-01 Sharp Corporation sharp +// shaw : 2015-04-23 Shaw Cablesystems G.P. +shaw + +// shell : 2015-07-30 Shell Information Technology International Inc +shell + // shia : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. shia -// shiksha : 2013-11-14 Afilias Limited +// shiksha : 2013-11-14 Afilias plc shiksha -// shoes : 2013-10-02 Binky Galley, LLC +// shoes : 2013-10-02 Binky Moon, LLC shoes +// shop : 2016-04-08 GMO Registry, Inc. +shop + +// shopping : 2016-03-31 Binky Moon, LLC +shopping + // shouji : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. shouji +// show : 2015-03-05 Binky Moon, LLC +show + +// showtime : 2015-08-06 CBS Domains Inc. +showtime + // shriram : 2014-01-23 Shriram Capital Ltd. shriram -// singles : 2013-08-27 Fern Madison, LLC +// silk : 2015-06-25 Amazon Registry Services, Inc. +silk + +// sina : 2015-03-12 Sina Corporation +sina + +// singles : 2013-08-27 Binky Moon, LLC singles // site : 2015-01-15 DotSite Inc. site +// ski : 2015-04-09 Afilias plc +ski + // skin : 2015-01-15 L'Oréal skin -// sky : 2014-06-19 Sky IP International Ltd, a company incorporated in England and Wales, operating via its registered Swiss branch +// sky : 2014-06-19 Sky International AG sky // skype : 2014-12-18 Microsoft Corporation skype -// smile : 2014-12-18 Amazon EU S.à r.l. +// sling : 2015-07-30 Hughes Satellite Systems Corporation +sling + +// smart : 2015-07-09 Smart Communications, Inc. (SMART) +smart + +// smile : 2014-12-18 Amazon Registry Services, Inc. smile +// sncf : 2015-02-19 Société Nationale des Chemins de fer Francais S N C F +sncf + +// soccer : 2015-03-26 Binky Moon, LLC +soccer + // social : 2013-11-07 United TLD Holdco Ltd. social -// software : 2014-03-20 +// softbank : 2015-07-02 SoftBank Corp. +softbank + +// software : 2014-03-20 United TLD Holdco Ltd. software // sohu : 2013-12-19 Sohu.com Limited sohu -// solar : 2013-11-07 Ruby Town, LLC +// solar : 2013-11-07 Binky Moon, LLC solar -// solutions : 2013-11-07 Silver Cover, LLC +// solutions : 2013-11-07 Binky Moon, LLC solutions +// song : 2015-02-26 Amazon Registry Services, Inc. +song + // sony : 2015-01-08 Sony Corporation sony @@ -8567,17 +9849,38 @@ space // spiegel : 2014-02-05 SPIEGEL-Verlag Rudolf Augstein GmbH & Co. KG spiegel -// spreadbetting : 2014-12-11 IG Group Holdings PLC +// sport : 2017-11-16 Global Association of International Sports Federations (GAISF) +sport + +// spot : 2015-02-26 Amazon Registry Services, Inc. +spot + +// spreadbetting : 2014-12-11 Dotspreadbetting Registry Limited spreadbetting +// srl : 2015-05-07 InterNetX, Corp +srl + +// srt : 2015-07-30 FCA US LLC. +srt + // stada : 2014-11-13 STADA Arzneimittel AG stada +// staples : 2015-07-30 Staples, Inc. +staples + // star : 2015-01-08 Star India Private Limited star -// statoil : 2014-12-04 Statoil ASA -statoil +// starhub : 2015-02-05 StarHub Ltd +starhub + +// statebank : 2015-03-12 STATE BANK OF INDIA +statebank + +// statefarm : 2015-07-30 State Farm Mutual Automobile Insurance Company +statefarm // stc : 2014-10-09 Saudi Telecom Company stc @@ -8588,31 +9891,40 @@ stcgroup // stockholm : 2014-12-18 Stockholms kommun stockholm -// storage : 2014-12-22 Self Storage Company LLC +// storage : 2014-12-22 XYZ.COM LLC storage +// store : 2015-04-09 DotStore Inc. +store + +// stream : 2016-01-08 dot Stream Limited +stream + +// studio : 2015-02-11 United TLD Holdco Ltd. +studio + // study : 2014-12-11 OPEN UNIVERSITIES AUSTRALIA PTY LTD study // style : 2014-12-04 Binky Moon, LLC style -// sucks : 2014-12-22 Vox Populi Registry Inc. +// sucks : 2014-12-22 Vox Populi Registry Ltd. sucks -// supplies : 2013-12-19 Atomic Fields, LLC +// supplies : 2013-12-19 Binky Moon, LLC supplies -// supply : 2013-12-19 Half Falls, LLC +// supply : 2013-12-19 Binky Moon, LLC supply -// support : 2013-10-24 Grand Orchard, LLC +// support : 2013-10-24 Binky Moon, LLC support -// surf : 2014-01-09 Top Level Domain Holdings Limited +// surf : 2014-01-09 Minds + Machines Group Limited surf -// surgery : 2014-03-20 Tin Avenue, LLC +// surgery : 2014-03-20 Binky Moon, LLC surgery // suzuki : 2014-02-20 SUZUKI MOTOR CORPORATION @@ -8621,6 +9933,9 @@ suzuki // swatch : 2015-01-08 The Swatch Group Ltd swatch +// swiftcover : 2015-07-23 Swiftcover Insurance Services Limited +swiftcover + // swiss : 2014-10-16 Swiss Confederation swiss @@ -8630,7 +9945,7 @@ sydney // symantec : 2014-12-04 Symantec Corporation symantec -// systems : 2013-11-07 Dash Cypress, LLC +// systems : 2013-11-07 Binky Moon, LLC systems // tab : 2014-12-04 Tabcorp Holdings Limited @@ -8639,22 +9954,43 @@ tab // taipei : 2014-07-10 Taipei City Government taipei +// talk : 2015-04-09 Amazon Registry Services, Inc. +talk + // taobao : 2015-01-15 Alibaba Group Holding Limited taobao -// tatar : 2014-04-24 Limited Liability Company \ +// target : 2015-07-31 Target Domain Holdings, LLC +target + +// tatamotors : 2015-03-12 Tata Motors Ltd +tatamotors + +// tatar : 2014-04-24 Limited Liability Company "Coordination Center of Regional Domain of Tatarstan Republic" tatar // tattoo : 2013-08-30 Uniregistry, Corp. tattoo -// tax : 2014-03-20 Storm Orchard, LLC +// tax : 2014-03-20 Binky Moon, LLC tax +// taxi : 2015-03-19 Binky Moon, LLC +taxi + // tci : 2014-09-12 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. tci -// technology : 2013-09-13 Auburn Falls +// tdk : 2015-06-11 TDK Corporation +tdk + +// team : 2015-03-05 Binky Moon, LLC +team + +// tech : 2015-01-30 Personals TLD Inc. +tech + +// technology : 2013-09-13 Binky Moon, LLC technology // telefonica : 2014-10-16 Telefónica S.A. @@ -8663,34 +9999,64 @@ telefonica // temasek : 2014-08-07 Temasek Holdings (Private) Limited temasek -// tennis : 2014-12-04 Cotton Bloom, LLC +// tennis : 2014-12-04 Binky Moon, LLC tennis -// tienda : 2013-11-14 Victor Manor, LLC +// teva : 2015-07-02 Teva Pharmaceutical Industries Limited +teva + +// thd : 2015-04-02 Home Depot Product Authority, LLC +thd + +// theater : 2015-03-19 Binky Moon, LLC +theater + +// theatre : 2015-05-07 XYZ.COM LLC +theatre + +// tiaa : 2015-07-23 Teachers Insurance and Annuity Association of America +tiaa + +// tickets : 2015-02-05 Accent Media Limited +tickets + +// tienda : 2013-11-14 Binky Moon, LLC tienda -// tips : 2013-09-20 Corn Willow, LLC +// tiffany : 2015-01-30 Tiffany and Company +tiffany + +// tips : 2013-09-20 Binky Moon, LLC tips -// tires : 2014-11-07 Dog Edge, LLC +// tires : 2014-11-07 Binky Moon, LLC tires // tirol : 2014-04-24 punkt Tirol GmbH tirol +// tjmaxx : 2015-07-16 The TJX Companies, Inc. +tjmaxx + +// tjx : 2015-07-16 The TJX Companies, Inc. +tjx + +// tkmaxx : 2015-07-16 The TJX Companies, Inc. +tkmaxx + // tmall : 2015-01-15 Alibaba Group Holding Limited tmall -// today : 2013-09-20 Pearl Woods, LLC +// today : 2013-09-20 Binky Moon, LLC today // tokyo : 2013-11-13 GMO Registry, Inc. tokyo -// tools : 2013-11-21 Pioneer North, LLC +// tools : 2013-11-21 Binky Moon, LLC tools -// top : 2014-03-20 Jiangsu Bangning Science & Technology Co.,Ltd. +// top : 2014-03-20 .TOP Registry top // toray : 2014-12-18 Toray Industries, Inc. @@ -8699,37 +10065,76 @@ toray // toshiba : 2014-04-10 TOSHIBA Corporation toshiba -// tours : 2015-01-22 Sugar Station, LLC +// total : 2015-08-06 Total SA +total + +// tours : 2015-01-22 Binky Moon, LLC tours -// town : 2014-03-06 Koko Moon, LLC +// town : 2014-03-06 Binky Moon, LLC town -// toys : 2014-03-06 Pioneer Orchard, LLC +// toyota : 2015-04-23 TOYOTA MOTOR CORPORATION +toyota + +// toys : 2014-03-06 Binky Moon, LLC toys // trade : 2014-01-23 Elite Registry Limited trade -// trading : 2014-12-11 IG Group Holdings PLC +// trading : 2014-12-11 Dottrading Registry Limited trading -// training : 2013-11-07 Wild Willow, LLC +// training : 2013-11-07 Binky Moon, LLC training -// trust : 2014-10-16 +// travel : Dog Beach, LLC +travel + +// travelchannel : 2015-07-02 Lifestyle Domain Holdings, Inc. +travelchannel + +// travelers : 2015-03-26 Travelers TLD, LLC +travelers + +// travelersinsurance : 2015-03-26 Travelers TLD, LLC +travelersinsurance + +// trust : 2014-10-16 NCC Group Inc. trust +// trv : 2015-03-26 Travelers TLD, LLC +trv + +// tube : 2015-06-11 Latin American Telecom LLC +tube + // tui : 2014-07-03 TUI AG tui -// tushu : 2014-12-18 Amazon EU S.à r.l. +// tunes : 2015-02-26 Amazon Registry Services, Inc. +tunes + +// tushu : 2014-12-18 Amazon Registry Services, Inc. tushu +// tvs : 2015-02-19 T V SUNDRAM IYENGAR & SONS LIMITED +tvs + +// ubank : 2015-08-20 National Australia Bank Limited +ubank + // ubs : 2014-12-11 UBS AG ubs -// university : 2014-03-06 Little Station, LLC +// uconnect : 2015-07-30 FCA US LLC. +uconnect + +// unicom : 2015-10-15 China United Network Communications Corporation Limited +unicom + +// university : 2014-03-06 Binky Moon, LLC university // uno : 2013-09-11 Dot Latin LLC @@ -8738,44 +10143,62 @@ uno // uol : 2014-05-01 UBN INTERNET LTDA. uol -// vacations : 2013-12-05 Atomic Tigers, LLC +// ups : 2015-06-25 UPS Market Driver, Inc. +ups + +// vacations : 2013-12-05 Binky Moon, LLC vacations // vana : 2014-12-11 Lifestyle Domain Holdings, Inc. vana +// vanguard : 2015-09-03 The Vanguard Group, Inc. +vanguard + // vegas : 2014-01-16 Dot Vegas, Inc. vegas -// ventures : 2013-08-27 Binky Lake, LLC +// ventures : 2013-08-27 Binky Moon, LLC ventures -// versicherung : 2014-03-20 dotversicherung-registry GmbH +// verisign : 2015-08-13 VeriSign, Inc. +verisign + +// versicherung : 2014-03-20 TLD-BOX Registrydienstleistungen GmbH versicherung -// vet : 2014-03-06 +// vet : 2014-03-06 United TLD Holdco Ltd. vet -// viajes : 2013-10-17 Black Madison, LLC +// viajes : 2013-10-17 Binky Moon, LLC viajes -// video : 2014-10-16 +// video : 2014-10-16 United TLD Holdco Ltd. video -// villas : 2013-12-05 New Sky, LLC +// vig : 2015-05-14 VIENNA INSURANCE GROUP AG Wiener Versicherung Gruppe +vig + +// viking : 2015-04-02 Viking River Cruises (Bermuda) Ltd. +viking + +// villas : 2013-12-05 Binky Moon, LLC villas +// vin : 2015-06-18 Binky Moon, LLC +vin + // vip : 2015-01-22 Minds + Machines Group Limited vip // virgin : 2014-09-25 Virgin Enterprises Limited virgin -// vision : 2013-12-05 Koko Station, LLC -vision +// visa : 2015-07-30 Visa Worldwide Pte. Limited +visa -// vista : 2014-09-18 Vistaprint Limited -vista +// vision : 2013-12-05 Binky Moon, LLC +vision // vistaprint : 2014-09-18 Vistaprint Limited vistaprint @@ -8783,12 +10206,21 @@ vistaprint // viva : 2014-11-07 Saudi Telecom Company viva +// vivo : 2015-07-31 Telefonica Brasil S.A. +vivo + // vlaanderen : 2014-02-06 DNS.be vzw vlaanderen -// vodka : 2013-12-19 Top Level Domain Holdings Limited +// vodka : 2013-12-19 Minds + Machines Group Limited vodka +// volkswagen : 2015-05-14 Volkswagen Group of America Inc. +volkswagen + +// volvo : 2015-11-12 Volvo Holding Sverige Aktiebolag +volvo + // vote : 2013-11-21 Monolith Registry LLC vote @@ -8798,42 +10230,63 @@ voting // voto : 2013-11-21 Monolith Registry LLC voto -// voyage : 2013-08-27 Ruby House, LLC +// voyage : 2013-08-27 Binky Moon, LLC voyage +// vuelos : 2015-03-05 Travel Reservations SRL +vuelos + // wales : 2014-05-08 Nominet UK wales +// walmart : 2015-07-31 Wal-Mart Stores, Inc. +walmart + // walter : 2014-11-13 Sandvik AB walter -// wang : 2013-10-24 Zodiac Leo Limited +// wang : 2013-10-24 Zodiac Wang Limited wang -// wanggou : 2014-12-18 Amazon EU S.à r.l. +// wanggou : 2014-12-18 Amazon Registry Services, Inc. wanggou -// watch : 2013-11-14 Sand Shadow, LLC +// warman : 2015-06-18 Weir Group IP Limited +warman + +// watch : 2013-11-14 Binky Moon, LLC watch // watches : 2014-12-22 Richemont DNS Inc. watches -// weather : 2015-01-08 The Weather Channel, LLC +// weather : 2015-01-08 International Business Machines Corporation weather +// weatherchannel : 2015-03-12 International Business Machines Corporation +weatherchannel + // webcam : 2014-01-23 dot Webcam Limited webcam +// weber : 2015-06-04 Saint-Gobain Weber SA +weber + // website : 2014-04-03 DotWebsite Inc. website // wed : 2013-10-01 Atgron, Inc. wed -// wedding : 2014-04-24 Top Level Domain Holdings Limited +// wedding : 2014-04-24 Minds + Machines Group Limited wedding +// weibo : 2015-03-05 Sina Corporation +weibo + +// weir : 2015-01-29 Weir Group IP Limited +weir + // whoswho : 2014-02-20 Who's Who Registry whoswho @@ -8852,22 +10305,37 @@ win // windows : 2014-12-18 Microsoft Corporation windows +// wine : 2015-06-18 Binky Moon, LLC +wine + +// winners : 2015-07-16 The TJX Companies, Inc. +winners + // wme : 2014-02-13 William Morris Endeavor Entertainment, LLC wme -// work : 2013-12-19 Top Level Domain Holdings Limited +// wolterskluwer : 2015-08-06 Wolters Kluwer N.V. +wolterskluwer + +// woodside : 2015-07-09 Woodside Petroleum Limited +woodside + +// work : 2013-12-19 Minds + Machines Group Limited work -// works : 2013-11-14 Little Dynamite, LLC +// works : 2013-11-14 Binky Moon, LLC works -// world : 2014-06-12 Bitter Fields, LLC +// world : 2014-06-12 Binky Moon, LLC world +// wow : 2015-10-08 Amazon Registry Services, Inc. +wow + // wtc : 2013-12-19 World Trade Centers Association, Inc. wtc -// wtf : 2014-03-06 Hidden Way, LLC +// wtf : 2014-03-06 Binky Moon, LLC wtf // xbox : 2014-12-18 Microsoft Corporation @@ -8876,6 +10344,9 @@ xbox // xerox : 2014-10-24 Xerox DNHC LLC xerox +// xfinity : 2015-07-09 Comcast IP Holdings I, LLC +xfinity + // xihuan : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. xihuan @@ -8885,6 +10356,9 @@ xin // xn--11b4c3d : 2015-01-15 VeriSign Sarl कॉम +// xn--1ck2e1b : 2015-02-26 Amazon Registry Services, Inc. +セール + // xn--1qqw23a : 2014-01-09 Guangzhou YU Wei Information Technology Co., Ltd. 佛山 @@ -8897,13 +10371,16 @@ xin // xn--3ds443g : 2013-09-08 TLD REGISTRY LIMITED 在线 +// xn--3oq18vl8pn36a : 2015-07-02 Volkswagen (China) Investment Co., Ltd. +大众汽车 + // xn--3pxu8k : 2015-01-15 VeriSign Sarl 点看 // xn--42c2d9a : 2015-01-15 VeriSign Sarl คอม -// xn--45q11c : 2013-11-21 Zodiac Scorpio Limited +// xn--45q11c : 2013-11-21 Zodiac Gemini Ltd 八卦 // xn--4gbrim : 2013-10-04 Suhub Electronic Establishment @@ -8912,13 +10389,16 @@ xin // xn--55qw42g : 2013-11-08 China Organizational Name Administration Center 公益 -// xn--55qx5d : 2013-11-14 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center) +// xn--55qx5d : 2013-11-14 China Internet Network Information Center (CNNIC) 公司 +// xn--5su34j936bgsg : 2015-09-03 Shangri‐La International Hotel Management Limited +香格里拉 + // xn--5tzm5g : 2014-12-22 Global Website TLD Asia Limited 网站 -// xn--6frz82g : 2013-09-23 Afilias Limited +// xn--6frz82g : 2013-09-23 Afilias plc 移动 // xn--6qq986b3xl : 2013-09-13 Tycoon Treasure Limited @@ -8927,48 +10407,69 @@ xin // xn--80adxhks : 2013-12-19 Foundation for Assistance for Internet Technologies and Infrastructure Development (FAITID) москва +// xn--80aqecdr1a : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +католик + // xn--80asehdb : 2013-07-14 CORE Association онлайн // xn--80aswg : 2013-07-14 CORE Association сайт +// xn--8y0a063a : 2015-03-26 China United Network Communications Corporation Limited +联通 + // xn--9dbq2a : 2015-01-15 VeriSign Sarl קום // xn--9et52u : 2014-06-12 RISE VICTORY LIMITED 时尚 +// xn--9krt00a : 2015-03-12 Sina Corporation +微博 + // xn--b4w605ferd : 2014-08-07 Temasek Holdings (Private) Limited 淡马锡 +// xn--bck1b9a5dre4c : 2015-02-26 Amazon Registry Services, Inc. +ファッション + // xn--c1avg : 2013-11-14 Public Interest Registry орг // xn--c2br7g : 2015-01-15 VeriSign Sarl नेट +// xn--cck2b3b : 2015-02-26 Amazon Registry Services, Inc. +ストア + // xn--cg4bki : 2013-09-27 SAMSUNG SDS CO., LTD 삼성 -// xn--czr694b : 2014-01-16 HU YI GLOBAL INFORMATION RESOURCES(HOLDING) COMPANY.HONGKONG LIMITED +// xn--czr694b : 2014-01-16 Dot Trademark TLD Holding Company Limited 商标 -// xn--czrs0t : 2013-12-19 Wild Island, LLC +// xn--czrs0t : 2013-12-19 Binky Moon, LLC 商店 -// xn--czru2d : 2013-11-21 Zodiac Capricorn Limited +// xn--czru2d : 2013-11-21 Zodiac Aquarius Limited 商城 // xn--d1acj3b : 2013-11-20 The Foundation for Network Initiatives “The Smart Internet” дети -// xn--eckvdtc9d : 2014-12-18 Amazon EU S.à r.l. +// xn--eckvdtc9d : 2014-12-18 Amazon Registry Services, Inc. ポイント -// xn--efvy88h : 2014-08-22 Xinhua News Agency Guangdong Branch 新华通讯社广东分社 +// xn--efvy88h : 2014-08-22 Guangzhou YU Wei Information Technology Co., Ltd. 新闻 +// xn--estv75g : 2015-02-19 Industrial and Commercial Bank of China Limited +工行 + +// xn--fct429k : 2015-04-09 Amazon Registry Services, Inc. +家電 + // xn--fhbei : 2015-01-15 VeriSign Sarl كوم @@ -8978,22 +10479,34 @@ xin // xn--fiq64b : 2013-10-14 CITIC Group Corporation 中信 -// xn--fjq720a : 2014-05-22 Will Bloom, LLC +// xn--fjq720a : 2014-05-22 Binky Moon, LLC 娱乐 // xn--flw351e : 2014-07-31 Charleston Road Registry Inc. 谷歌 -// xn--hxt814e : 2014-05-15 Zodiac Libra Limited +// xn--fzys8d69uvgm : 2015-05-14 PCCW Enterprises Limited +電訊盈科 + +// xn--g2xx48c : 2015-01-30 Minds + Machines Group Limited +购物 + +// xn--gckr3f0f : 2015-02-26 Amazon Registry Services, Inc. +クラウド + +// xn--gk3at1e : 2015-10-08 Amazon Registry Services, Inc. +通販 + +// xn--hxt814e : 2014-05-15 Zodiac Taurus Limited 网店 // xn--i1b6b1a6a2e : 2013-11-14 Public Interest Registry संगठन -// xn--imr513n : 2014-12-11 HU YI GLOBAL INFORMATION RESOURCES (HOLDING) COMPANY. HONGKONG LIMITED +// xn--imr513n : 2014-12-11 Dot Trademark TLD Holding Company Limited 餐厅 -// xn--io0a7i : 2013-11-14 Computer Network Information Center of Chinese Academy of Sciences (China Internet Network Information Center) +// xn--io0a7i : 2013-11-14 China Internet Network Information Center (CNNIC) 网络 // xn--j1aef : 2015-01-15 VeriSign Sarl @@ -9002,6 +10515,9 @@ xin // xn--jlq61u9w7b : 2015-01-08 Nokia Corporation 诺基亚 +// xn--jvr189m : 2015-02-26 Amazon Registry Services, Inc. +食品 + // xn--kcrx77d1x4a : 2014-11-07 Koninklijke Philips N.V. 飞利浦 @@ -9014,12 +10530,24 @@ xin // xn--mgba3a3ejt : 2014-11-20 Aramco Services Company ارامكو +// xn--mgba7c0bbn0a : 2015-05-14 Crescent Holding GmbH +العليان + +// xn--mgbaakc7dvf : 2015-09-03 Emirates Telecommunications Corporation (trading as Etisalat) +اتصالات + // xn--mgbab2bd : 2013-10-31 CORE Association بازار // xn--mgbb9fbpob : 2014-12-18 GreenTech Consultancy Company W.L.L. موبايلي +// xn--mgbca7dzdo : 2015-07-30 Abu Dhabi Systems and Information Centre +ابوظبي + +// xn--mgbi4ecexp : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +كاثوليك + // xn--mgbt3dhd : 2014-09-04 Asia Green IT System Bilgisayar San. ve Tic. Ltd. Sti. همراه @@ -9035,6 +10563,9 @@ xin // xn--ngbe9e0a : 2014-12-04 Kuwait Finance House بيتك +// xn--ngbrx : 2015-11-12 League of Arab States +عرب + // xn--nqv7f : 2013-11-14 Public Interest Registry 机构 @@ -9044,6 +10575,9 @@ xin // xn--nyqy26a : 2014-11-07 Stable Tone Limited 健康 +// xn--otu796d : 2017-08-06 Dot Trademark TLD Holding Company Limited +招聘 + // xn--p1acf : 2013-12-12 Rusnames Limited рус @@ -9062,7 +10596,10 @@ xin // xn--rhqv96g : 2013-09-11 Stable Tone Limited 世界 -// xn--ses554g : 2014-01-16 +// xn--rovu88b : 2015-02-26 Amazon Registry Services, Inc. +書籍 + +// xn--ses554g : 2014-01-16 KNET Co., Ltd. 网址 // xn--t60b56a : 2015-01-15 VeriSign Sarl @@ -9071,7 +10608,10 @@ xin // xn--tckwe : 2015-01-15 VeriSign Sarl コム -// xn--unup4y : 2013-07-14 Spring Fields, LLC +// xn--tiq49xqyj : 2015-10-21 Pontificium Consilium de Comunicationibus Socialibus (PCCS) (Pontifical Council for Social Communication) +天主教 + +// xn--unup4y : 2013-07-14 Binky Moon, LLC 游戏 // xn--vermgensberater-ctb : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG @@ -9080,12 +10620,18 @@ vermögensberater // xn--vermgensberatung-pwb : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG vermögensberatung -// xn--vhquv : 2013-08-27 Dash McCook, LLC +// xn--vhquv : 2013-08-27 Binky Moon, LLC 企业 // xn--vuq861b : 2014-10-16 Beijing Tele-info Network Technology Co., Ltd. 信息 +// xn--w4r85el8fhu5dnra : 2015-04-30 Kerry Trading Co. Limited +嘉里大酒店 + +// xn--w4rs40l : 2015-07-30 Kerry Trading Co. Limited +嘉里 + // xn--xhq521b : 2013-11-14 Guangzhou YU Wei Information Technology Co., Ltd. 广东 @@ -9098,7 +10644,10 @@ xyz // yachts : 2014-01-09 DERYachts, LLC yachts -// yamaxun : 2014-12-18 Amazon EU S.à r.l. +// yahoo : 2015-04-02 Yahoo! Domain Services Inc. +yahoo + +// yamaxun : 2014-12-18 Amazon Registry Services, Inc. yamaxun // yandex : 2014-04-10 YANDEX, LLC @@ -9107,28 +10656,37 @@ yandex // yodobashi : 2014-11-20 YODOBASHI CAMERA CO.,LTD. yodobashi -// yoga : 2014-05-29 Top Level Domain Holdings Limited +// yoga : 2014-05-29 Minds + Machines Group Limited yoga // yokohama : 2013-12-12 GMO Registry, Inc. yokohama +// you : 2015-04-09 Amazon Registry Services, Inc. +you + // youtube : 2014-05-01 Charleston Road Registry Inc. youtube // yun : 2015-01-08 QIHOO 360 TECHNOLOGY CO. LTD. yun +// zappos : 2015-06-25 Amazon Registry Services, Inc. +zappos + // zara : 2014-11-07 Industria de Diseño Textil, S.A. (INDITEX, S.A.) zara -// zero : 2014-12-18 Amazon EU S.à r.l. +// zero : 2014-12-18 Amazon Registry Services, Inc. zero // zip : 2014-05-08 Charleston Road Registry Inc. zip -// zone : 2013-11-14 Outer Falls, LLC +// zippo : 2015-07-02 Zadco Company +zippo + +// zone : 2013-11-14 Binky Moon, LLC zone // zuerich : 2014-11-07 Kanton Zürich (Canton of Zurich) @@ -9139,65 +10697,211 @@ zuerich // ===BEGIN PRIVATE DOMAINS=== // (Note: these are in alphabetical order by company name) +// 1GB LLC : https://www.1gb.ua/ +// Submitted by 1GB LLC +cc.ua +inf.ua +ltd.ua + +// Agnat sp. z o.o. : https://domena.pl +// Submitted by Przemyslaw Plewa +beep.pl + +// Alces Software Ltd : http://alces-software.com +// Submitted by Mark J. Titorenko +*.compute.estate +*.alces.network + +// alwaysdata : https://www.alwaysdata.com +// Submitted by Cyril +alwaysdata.net + // Amazon CloudFront : https://aws.amazon.com/cloudfront/ -// Submitted by Donavan Miller 2013-03-22 +// Submitted by Donavan Miller cloudfront.net -// Amazon Elastic Compute Cloud: https://aws.amazon.com/ec2/ -// Submitted by Osman Surkatty 2014-12-16 -ap-northeast-1.compute.amazonaws.com -ap-southeast-1.compute.amazonaws.com -ap-southeast-2.compute.amazonaws.com -cn-north-1.compute.amazonaws.cn -compute.amazonaws.cn -compute.amazonaws.com -compute-1.amazonaws.com -eu-west-1.compute.amazonaws.com -eu-central-1.compute.amazonaws.com -sa-east-1.compute.amazonaws.com +// Amazon Elastic Compute Cloud : https://aws.amazon.com/ec2/ +// Submitted by Luke Wells +*.compute.amazonaws.com +*.compute-1.amazonaws.com +*.compute.amazonaws.com.cn us-east-1.amazonaws.com -us-gov-west-1.compute.amazonaws.com -us-west-1.compute.amazonaws.com -us-west-2.compute.amazonaws.com -z-1.compute-1.amazonaws.com -z-2.compute-1.amazonaws.com // Amazon Elastic Beanstalk : https://aws.amazon.com/elasticbeanstalk/ -// Submitted by Adam Stein 2013-04-02 +// Submitted by Luke Wells +cn-north-1.eb.amazonaws.com.cn +cn-northwest-1.eb.amazonaws.com.cn elasticbeanstalk.com +ap-northeast-1.elasticbeanstalk.com +ap-northeast-2.elasticbeanstalk.com +ap-northeast-3.elasticbeanstalk.com +ap-south-1.elasticbeanstalk.com +ap-southeast-1.elasticbeanstalk.com +ap-southeast-2.elasticbeanstalk.com +ca-central-1.elasticbeanstalk.com +eu-central-1.elasticbeanstalk.com +eu-west-1.elasticbeanstalk.com +eu-west-2.elasticbeanstalk.com +eu-west-3.elasticbeanstalk.com +sa-east-1.elasticbeanstalk.com +us-east-1.elasticbeanstalk.com +us-east-2.elasticbeanstalk.com +us-gov-west-1.elasticbeanstalk.com +us-west-1.elasticbeanstalk.com +us-west-2.elasticbeanstalk.com // Amazon Elastic Load Balancing : https://aws.amazon.com/elasticloadbalancing/ -// Submitted by Scott Vidmar 2013-03-27 -elb.amazonaws.com +// Submitted by Luke Wells +*.elb.amazonaws.com +*.elb.amazonaws.com.cn // Amazon S3 : https://aws.amazon.com/s3/ -// Submitted by Courtney Eckhardt 2013-03-22 +// Submitted by Luke Wells s3.amazonaws.com -s3-us-west-2.amazonaws.com -s3-us-west-1.amazonaws.com -s3-eu-west-1.amazonaws.com +s3-ap-northeast-1.amazonaws.com +s3-ap-northeast-2.amazonaws.com +s3-ap-south-1.amazonaws.com s3-ap-southeast-1.amazonaws.com s3-ap-southeast-2.amazonaws.com -s3-ap-northeast-1.amazonaws.com +s3-ca-central-1.amazonaws.com +s3-eu-central-1.amazonaws.com +s3-eu-west-1.amazonaws.com +s3-eu-west-2.amazonaws.com +s3-eu-west-3.amazonaws.com +s3-external-1.amazonaws.com +s3-fips-us-gov-west-1.amazonaws.com s3-sa-east-1.amazonaws.com s3-us-gov-west-1.amazonaws.com -s3-fips-us-gov-west-1.amazonaws.com +s3-us-east-2.amazonaws.com +s3-us-west-1.amazonaws.com +s3-us-west-2.amazonaws.com +s3.ap-northeast-2.amazonaws.com +s3.ap-south-1.amazonaws.com +s3.cn-north-1.amazonaws.com.cn +s3.ca-central-1.amazonaws.com +s3.eu-central-1.amazonaws.com +s3.eu-west-2.amazonaws.com +s3.eu-west-3.amazonaws.com +s3.us-east-2.amazonaws.com +s3.dualstack.ap-northeast-1.amazonaws.com +s3.dualstack.ap-northeast-2.amazonaws.com +s3.dualstack.ap-south-1.amazonaws.com +s3.dualstack.ap-southeast-1.amazonaws.com +s3.dualstack.ap-southeast-2.amazonaws.com +s3.dualstack.ca-central-1.amazonaws.com +s3.dualstack.eu-central-1.amazonaws.com +s3.dualstack.eu-west-1.amazonaws.com +s3.dualstack.eu-west-2.amazonaws.com +s3.dualstack.eu-west-3.amazonaws.com +s3.dualstack.sa-east-1.amazonaws.com +s3.dualstack.us-east-1.amazonaws.com +s3.dualstack.us-east-2.amazonaws.com s3-website-us-east-1.amazonaws.com -s3-website-us-west-2.amazonaws.com s3-website-us-west-1.amazonaws.com -s3-website-eu-west-1.amazonaws.com +s3-website-us-west-2.amazonaws.com +s3-website-ap-northeast-1.amazonaws.com s3-website-ap-southeast-1.amazonaws.com s3-website-ap-southeast-2.amazonaws.com -s3-website-ap-northeast-1.amazonaws.com +s3-website-eu-west-1.amazonaws.com s3-website-sa-east-1.amazonaws.com -s3-website-us-gov-west-1.amazonaws.com +s3-website.ap-northeast-2.amazonaws.com +s3-website.ap-south-1.amazonaws.com +s3-website.ca-central-1.amazonaws.com +s3-website.eu-central-1.amazonaws.com +s3-website.eu-west-2.amazonaws.com +s3-website.eu-west-3.amazonaws.com +s3-website.us-east-2.amazonaws.com + +// Amune : https://amune.org/ +// Submitted by Team Amune +t3l3p0rt.net +tele.amune.org + +// Apigee : https://apigee.com/ +// Submitted by Apigee Security Team +apigee.io + +// Aptible : https://www.aptible.com/ +// Submitted by Thomas Orozco +on-aptible.com + +// Asociación Amigos de la Informática "Euskalamiga" : http://encounter.eus/ +// Submitted by Hector Martin +user.party.eus + +// Association potager.org : https://potager.org/ +// Submitted by Lunar +pimienta.org +poivron.org +potager.org +sweetpepper.org + +// ASUSTOR Inc. : http://www.asustor.com +// Submitted by Vincent Tseng +myasustor.com + +// Automattic Inc. : https://automattic.com/ +// Submitted by Alex Concha +go-vip.co +wpcomstaging.com + +// AVM : https://avm.de +// Submitted by Andreas Weise +myfritz.net + +// AW AdvisorWebsites.com Software Inc : https://advisorwebsites.com +// Submitted by James Kennedy +*.awdev.ca +*.advisor.ws + +// backplane : https://www.backplane.io +// Submitted by Anthony Voutas +backplaneapp.io // BetaInABox -// Submitted by adrian@betainabox.com 2012-09-13 +// Submitted by Adrian betainabox.com +// BinaryLane : http://www.binarylane.com +// Submitted by Nathan O'Sullivan +bnr.la + +// Blackbaud, Inc. : https://www.blackbaud.com +// Submitted by Paul Crowder +blackbaudcdn.net + +// Boomla : https://boomla.com +// Submitted by Tibor Halter +boomla.net + +// Boxfuse : https://boxfuse.com +// Submitted by Axel Fontaine +boxfuse.io + +// bplaced : https://www.bplaced.net/ +// Submitted by Miroslav Bozic +square7.ch +bplaced.com +bplaced.de +square7.de +bplaced.net +square7.net + +// BrowserSafetyMark +// Submitted by Dave Tharp +browsersafetymark.io + +// Bytemark Hosting : https://www.bytemark.co.uk +// Submitted by Paul Cammish +dh.bytemark.co.uk +vm.bytemark.co.uk + +// callidomus : https://www.callidomus.com/ +// Submitted by Marcus Popp +mycd.eu + // CentralNic : http://www.centralnic.com/names/domains -// Submitted by registry 2012-09-27 +// Submitted by registry ae.org ar.com br.com @@ -9218,7 +10922,6 @@ no.com qc.com ru.com sa.com -se.com se.net uk.com uk.net @@ -9228,52 +10931,206 @@ za.bz za.com // Africa.com Web Solutions Ltd : https://registry.africa.com -// Submitted by Gavin Brown 2014-02-04 +// Submitted by Gavin Brown africa.com // iDOT Services Limited : http://www.domain.gr.com -// Submitted by Gavin Brown 2014-02-04 +// Submitted by Gavin Brown gr.com // Radix FZC : http://domains.in.net -// Submitted by Gavin Brown 2014-02-04 +// Submitted by Gavin Brown in.net // US REGISTRY LLC : http://us.org -// Submitted by Gavin Brown 2014-02-04 +// Submitted by Gavin Brown us.org // co.com Registry, LLC : https://registry.co.com -// Submitted by Gavin Brown 2014-02-04 +// Submitted by Gavin Brown co.com // c.la : http://www.c.la/ c.la +// certmgr.org : https://certmgr.org +// Submitted by B. Blechschmidt +certmgr.org + +// Citrix : https://citrix.com +// Submitted by Alex Stoddard +xenapponazure.com + +// ClearVox : http://www.clearvox.nl/ +// Submitted by Leon Rowland +virtueeldomein.nl + +// Clever Cloud : https://www.clever-cloud.com/ +// Submitted by Quentin Adam +cleverapps.io + +// Cloud66 : https://www.cloud66.com/ +// Submitted by Khash Sajadi +c66.me +cloud66.ws + +// CloudAccess.net : https://www.cloudaccess.net/ +// Submitted by Pawel Panek +jdevcloud.com +wpdevcloud.com +cloudaccess.host +freesite.host +cloudaccess.net + // cloudControl : https://www.cloudcontrol.com/ -// Submitted by Tobias Wilken 2013-07-23 +// Submitted by Tobias Wilken cloudcontrolled.com cloudcontrolapp.com // co.ca : http://registry.co.ca/ co.ca +// Co & Co : https://co-co.nl/ +// Submitted by Govert Versluis +*.otap.co + +// i-registry s.r.o. : http://www.i-registry.cz/ +// Submitted by Martin Semrad +co.cz + +// CDN77.com : http://www.cdn77.com +// Submitted by Jan Krpes +c.cdn77.org +cdn77-ssl.net +r.cdn77.net +rsc.cdn77.org +ssl.origin.cdn77-secure.org + +// Cloud DNS Ltd : http://www.cloudns.net +// Submitted by Aleksander Hristov +cloudns.asia +cloudns.biz +cloudns.club +cloudns.cc +cloudns.eu +cloudns.in +cloudns.info +cloudns.org +cloudns.pro +cloudns.pw +cloudns.us + +// Cloudeity Inc : https://cloudeity.com +// Submitted by Stefan Dimitrov +cloudeity.net + +// CNPY : https://cnpy.gdn +// Submitted by Angelo Gladding +cnpy.gdn + // CoDNS B.V. co.nl co.no -// Commerce Guys, SAS -// Submitted by Damien Tournoud 2015-01-22 -*.platform.sh +// Combell.com : https://www.combell.com +// Submitted by Thomas Wouters +webhosting.be +hosting-cluster.nl + +// COSIMO GmbH : http://www.cosimo.de +// Submitted by Rene Marticke +dyn.cosidns.de +dynamisches-dns.de +dnsupdater.de +internet-dns.de +l-o-g-i-n.de +dynamic-dns.info +feste-ip.net +knx-server.net +static-access.net + +// Craynic, s.r.o. : http://www.craynic.com/ +// Submitted by Ales Krajnik +realm.cz + +// Cryptonomic : https://cryptonomic.net/ +// Submitted by Andrew Cady +*.cryptonomic.net // Cupcake : https://cupcake.io/ -// Submitted by Jonathan Rudenberg 2013-10-08 +// Submitted by Jonathan Rudenberg cupcake.is +// cyon GmbH : https://www.cyon.ch/ +// Submitted by Dominic Luechinger +cyon.link +cyon.site + +// Daplie, Inc : https://daplie.com +// Submitted by AJ ONeal +daplie.me +localhost.daplie.me + +// Datto, Inc. : https://www.datto.com/ +// Submitted by Philipp Heckel +dattolocal.com +dattorelay.com +dattoweb.com +mydatto.com +dattolocal.net +mydatto.net + +// Dansk.net : http://www.dansk.net/ +// Submitted by Anani Voule +biz.dk +co.dk +firm.dk +reg.dk +store.dk + +// Debian : https://www.debian.org/ +// Submitted by Peter Palfrader / Debian Sysadmin Team +debian.net + +// deSEC : https://desec.io/ +// Submitted by Peter Thomassen +dedyn.io + +// DNShome : https://www.dnshome.de/ +// Submitted by Norbert Auler +dnshome.de + +// DotArai : https://www.dotarai.com/ +// Submitted by Atsadawat Netcharadsang +online.th +shop.th + +// DrayTek Corp. : https://www.draytek.com/ +// Submitted by Paul Fang +drayddns.com + // DreamHost : http://www.dreamhost.com/ -// Submitted by Andrew Farmer 2012-10-02 +// Submitted by Andrew Farmer dreamhosters.com +// Drobo : http://www.drobo.com/ +// Submitted by Ricardo Padilha +mydrobo.com + +// Drud Holdings, LLC. : https://www.drud.com/ +// Submitted by Kevin Bridges +drud.io +drud.us + +// DuckDNS : http://www.duckdns.org/ +// Submitted by Richard Harper +duckdns.org + +// dy.fi : http://dy.fi/ +// Submitted by Heikki Hannikainen +dy.fi +tunk.org + // DynDNS.com : http://www.dyndns.com/services/dns/dyndns/ dyndns-at-home.com dyndns-at-work.com @@ -9555,54 +11412,358 @@ webhop.org worse-than.tv writesthisblog.com -// Fastly Inc. http://www.fastly.com/ -// Submitted by Vladimir Vuksan 2013-05-31 +// ddnss.de : https://www.ddnss.de/ +// Submitted by Robert Niedziela +ddnss.de +dyn.ddnss.de +dyndns.ddnss.de +dyndns1.de +dyn-ip24.de +home-webserver.de +dyn.home-webserver.de +myhome-server.de +ddnss.org + +// Definima : http://www.definima.com/ +// Submitted by Maxence Bitterli +definima.net +definima.io + +// dnstrace.pro : https://dnstrace.pro/ +// Submitted by Chris Partridge +bci.dnstrace.pro + +// Dynu.com : https://www.dynu.com/ +// Submitted by Sue Ye +ddnsfree.com +ddnsgeek.com +giize.com +gleeze.com +kozow.com +loseyourip.com +ooguy.com +theworkpc.com +casacam.net +dynu.net +accesscam.org +camdvr.org +freeddns.org +mywire.org +webredirect.org +myddns.rocks +blogsite.xyz + +// dynv6 : https://dynv6.com +// Submitted by Dominik Menke +dynv6.net + +// E4YOU spol. s.r.o. : https://e4you.cz/ +// Submitted by Vladimir Dudr +e4.cz + +// Enalean SAS: https://www.enalean.com +// Submitted by Thomas Cottier +mytuleap.com + +// Enonic : http://enonic.com/ +// Submitted by Erik Kaareng-Sunde +enonic.io +customer.enonic.io + +// EU.org https://eu.org/ +// Submitted by Pierre Beyssac +eu.org +al.eu.org +asso.eu.org +at.eu.org +au.eu.org +be.eu.org +bg.eu.org +ca.eu.org +cd.eu.org +ch.eu.org +cn.eu.org +cy.eu.org +cz.eu.org +de.eu.org +dk.eu.org +edu.eu.org +ee.eu.org +es.eu.org +fi.eu.org +fr.eu.org +gr.eu.org +hr.eu.org +hu.eu.org +ie.eu.org +il.eu.org +in.eu.org +int.eu.org +is.eu.org +it.eu.org +jp.eu.org +kr.eu.org +lt.eu.org +lu.eu.org +lv.eu.org +mc.eu.org +me.eu.org +mk.eu.org +mt.eu.org +my.eu.org +net.eu.org +ng.eu.org +nl.eu.org +no.eu.org +nz.eu.org +paris.eu.org +pl.eu.org +pt.eu.org +q-a.eu.org +ro.eu.org +ru.eu.org +se.eu.org +si.eu.org +sk.eu.org +tr.eu.org +uk.eu.org +us.eu.org + +// Evennode : http://www.evennode.com/ +// Submitted by Michal Kralik +eu-1.evennode.com +eu-2.evennode.com +eu-3.evennode.com +eu-4.evennode.com +us-1.evennode.com +us-2.evennode.com +us-3.evennode.com +us-4.evennode.com + +// eDirect Corp. : https://hosting.url.com.tw/ +// Submitted by C.S. chang +twmail.cc +twmail.net +twmail.org +mymailer.com.tw +url.tw + +// Facebook, Inc. +// Submitted by Peter Ruibal +apps.fbsbx.com + +// FAITID : https://faitid.org/ +// Submitted by Maxim Alzoba +// https://www.flexireg.net/stat_info +ru.net +adygeya.ru +bashkiria.ru +bir.ru +cbg.ru +com.ru +dagestan.ru +grozny.ru +kalmykia.ru +kustanai.ru +marine.ru +mordovia.ru +msk.ru +mytis.ru +nalchik.ru +nov.ru +pyatigorsk.ru +spb.ru +vladikavkaz.ru +vladimir.ru +abkhazia.su +adygeya.su +aktyubinsk.su +arkhangelsk.su +armenia.su +ashgabad.su +azerbaijan.su +balashov.su +bashkiria.su +bryansk.su +bukhara.su +chimkent.su +dagestan.su +east-kazakhstan.su +exnet.su +georgia.su +grozny.su +ivanovo.su +jambyl.su +kalmykia.su +kaluga.su +karacol.su +karaganda.su +karelia.su +khakassia.su +krasnodar.su +kurgan.su +kustanai.su +lenug.su +mangyshlak.su +mordovia.su +msk.su +murmansk.su +nalchik.su +navoi.su +north-kazakhstan.su +nov.su +obninsk.su +penza.su +pokrovsk.su +sochi.su +spb.su +tashkent.su +termez.su +togliatti.su +troitsk.su +tselinograd.su +tula.su +tuva.su +vladikavkaz.su +vladimir.su +vologda.su + +// Fancy Bits, LLC : http://getchannels.com +// Submitted by Aman Gupta +channelsdvr.net + +// Fastly Inc. : http://www.fastly.com/ +// Submitted by Fastly Security +fastlylb.net +map.fastlylb.net +freetls.fastly.net +map.fastly.net +a.prod.fastly.net +global.prod.fastly.net a.ssl.fastly.net b.ssl.fastly.net global.ssl.fastly.net -a.prod.fastly.net -global.prod.fastly.net + +// FASTVPS EESTI OU : https://fastvps.ru/ +// Submitted by Likhachev Vasiliy +fastpanel.direct +fastvps-server.com + +// Featherhead : https://featherhead.xyz/ +// Submitted by Simon Menke +fhapp.xyz + +// Fedora : https://fedoraproject.org/ +// submitted by Patrick Uiterwijk +fedorainfracloud.org +fedorapeople.org +cloud.fedoraproject.org +app.os.fedoraproject.org +app.os.stg.fedoraproject.org + +// Fermax : https://fermax.com/ +// submitted by Koen Van Isterdael +mydobiss.com + +// Filegear Inc. : https://www.filegear.com +// Submitted by Jason Zhu +filegear.me // Firebase, Inc. -// Submitted by Chris Raynor 2014-01-21 +// Submitted by Chris Raynor firebaseapp.com // Flynn : https://flynn.io -// Submitted by Jonathan Rudenberg 2014-07-12 +// Submitted by Jonathan Rudenberg flynnhub.com +flynnhosting.net + +// Freebox : http://www.freebox.fr +// Submitted by Romain Fliedel +freebox-os.com +freeboxos.com +fbx-os.fr +fbxos.fr +freebox-os.fr +freeboxos.fr + +// freedesktop.org : https://www.freedesktop.org +// Submitted by Daniel Stone +freedesktop.org + +// Futureweb OG : http://www.futureweb.at +// Submitted by Andreas Schnederle-Wagner +*.futurecms.at +*.ex.futurecms.at +*.in.futurecms.at +futurehosting.at +futuremailing.at +*.ex.ortsinfo.at +*.kunden.ortsinfo.at +*.statics.cloud // GDS : https://www.gov.uk/service-manual/operations/operating-servicegovuk-subdomains -// Submitted by David Illsley 2014-08-28 +// Submitted by David Illsley service.gov.uk // GitHub, Inc. -// Submitted by Ben Toews 2014-02-06 +// Submitted by Patrick Toomey github.io githubusercontent.com +// GitLab, Inc. +// Submitted by Alex Hanselka +gitlab.io + +// UKHomeOffice : https://www.gov.uk/government/organisations/home-office +// Submitted by Jon Shanks +homeoffice.gov.uk + // GlobeHosting, Inc. -// Submitted by Zoltan Egresi 2013-07-12 -ro.com +// Submitted by Zoltan Egresi +ro.im +shop.ro + +// GoIP DNS Services : http://www.goip.de +// Submitted by Christian Poulter +goip.de // Google, Inc. -// Submitted by Eduardo Vela 2014-12-19 +// Submitted by Eduardo Vela +*.0emm.com appspot.com blogspot.ae +blogspot.al +blogspot.am +blogspot.ba blogspot.be +blogspot.bg blogspot.bj blogspot.ca blogspot.cf blogspot.ch +blogspot.cl blogspot.co.at +blogspot.co.id blogspot.co.il +blogspot.co.ke blogspot.co.nz blogspot.co.uk +blogspot.co.za blogspot.com blogspot.com.ar blogspot.com.au blogspot.com.br +blogspot.com.by +blogspot.com.co +blogspot.com.cy +blogspot.com.ee +blogspot.com.eg blogspot.com.es +blogspot.com.mt +blogspot.com.ng blogspot.com.tr +blogspot.com.uy blogspot.cv blogspot.cz blogspot.de @@ -9611,73 +11772,539 @@ blogspot.fi blogspot.fr blogspot.gr blogspot.hk +blogspot.hr blogspot.hu blogspot.ie blogspot.in +blogspot.is blogspot.it blogspot.jp blogspot.kr +blogspot.li +blogspot.lt +blogspot.lu +blogspot.md +blogspot.mk blogspot.mr blogspot.mx +blogspot.my blogspot.nl blogspot.no +blogspot.pe blogspot.pt +blogspot.qa blogspot.re blogspot.ro +blogspot.rs blogspot.ru blogspot.se blogspot.sg +blogspot.si blogspot.sk +blogspot.sn blogspot.td blogspot.tw +blogspot.ug +blogspot.vn +cloudfunctions.net +cloud.goog codespot.com googleapis.com googlecode.com pagespeedmobilizer.com +publishproxy.com withgoogle.com +withyoutube.com + +// Hashbang : https://hashbang.sh +hashbang.sh + +// Hasura : https://hasura.io +// Submitted by Shahidh K Muhammed +hasura.app +hasura-app.io + +// Hepforge : https://www.hepforge.org +// Submitted by David Grellscheid +hepforge.org // Heroku : https://www.heroku.com/ -// Submitted by Tom Maher 2013-05-02 +// Submitted by Tom Maher herokuapp.com herokussl.com +// Hibernating Rhinos +// Submitted by Oren Eini +myravendb.com +ravendb.community +ravendb.me +development.run +ravendb.run + +// Ici la Lune : http://www.icilalune.com/ +// Submitted by Simon Morvan +moonscale.net + // iki.fi -// Submitted by Hannu Aronsson 2009-11-05 +// Submitted by Hannu Aronsson iki.fi // info.at : http://www.info.at/ biz.at info.at +// info.cx : http://info.cx +// Submitted by Jacob Slater +info.cx + +// Interlegis : http://www.interlegis.leg.br +// Submitted by Gabriel Ferreira +ac.leg.br +al.leg.br +am.leg.br +ap.leg.br +ba.leg.br +ce.leg.br +df.leg.br +es.leg.br +go.leg.br +ma.leg.br +mg.leg.br +ms.leg.br +mt.leg.br +pa.leg.br +pb.leg.br +pe.leg.br +pi.leg.br +pr.leg.br +rj.leg.br +rn.leg.br +ro.leg.br +rr.leg.br +rs.leg.br +sc.leg.br +se.leg.br +sp.leg.br +to.leg.br + +// intermetrics GmbH : https://pixolino.com/ +// Submitted by Wolfgang Schwarz +pixolino.com + +// IPiFony Systems, Inc. : https://www.ipifony.com/ +// Submitted by Matthew Hardeman +ipifony.net + +// IServ GmbH : https://iserv.eu +// Submitted by Kim-Alexander Brodowski +mein-iserv.de +test-iserv.de + +// Jino : https://www.jino.ru +// Submitted by Sergey Ulyashin +myjino.ru +*.hosting.myjino.ru +*.landing.myjino.ru +*.spectrum.myjino.ru +*.vps.myjino.ru + +// Joyent : https://www.joyent.com/ +// Submitted by Brian Bennett +*.triton.zone +*.cns.joyent.com + +// JS.ORG : http://dns.js.org +// Submitted by Stefan Keim +js.org + +// Keyweb AG : https://www.keyweb.de +// Submitted by Martin Dannehl +keymachine.de + +// KnightPoint Systems, LLC : http://www.knightpoint.com/ +// Submitted by Roy Keene +knightpoint.systems + +// .KRD : http://nic.krd/data/krd/Registration%20Policy.pdf +co.krd +edu.krd + +// LCube - Professional hosting e.K. : https://www.lcube-webhosting.de +// Submitted by Lars Laehn +git-repos.de +lcube-server.de +svn-repos.de + +// Lightmaker Property Manager, Inc. : https://app.lmpm.com/ +// Submitted by Greg Holland +app.lmpm.com + +// Linki Tools UG : https://linki.tools +// Submitted by Paulo Matos +linkitools.space + +// linkyard ldt: https://www.linkyard.ch/ +// Submitted by Mario Siegenthaler +linkyard.cloud +linkyard-cloud.ch + +// LiquidNet Ltd : http://www.liquidnetlimited.com/ +// Submitted by Victor Velchev +we.bs + +// LubMAN UMCS Sp. z o.o : https://lubman.pl/ +// Submitted by Ireneusz Maliszewski +krasnik.pl +leczna.pl +lubartow.pl +lublin.pl +poniatowa.pl +swidnik.pl + +// Lug.org.uk : https://lug.org.uk +// Submitted by Jon Spriggs +uklugs.org +glug.org.uk +lug.org.uk +lugs.org.uk + +// Lukanet Ltd : https://lukanet.com +// Submitted by Anton Avramov +barsy.bg +barsy.co.uk +barsyonline.co.uk +barsycenter.com +barsyonline.com +barsy.club +barsy.de +barsy.eu +barsy.in +barsy.info +barsy.io +barsy.me +barsy.menu +barsy.mobi +barsy.net +barsy.online +barsy.org +barsy.pro +barsy.pub +barsy.shop +barsy.site +barsy.support +barsy.uk + +// Magento Commerce +// Submitted by Damien Tournoud +*.magentosite.cloud + +// May First - People Link : https://mayfirst.org/ +// Submitted by Jamie McClelland +mayfirst.info +mayfirst.org + +// Mail.Ru Group : https://hb.cldmail.ru +// Submitted by Ilya Zaretskiy +hb.cldmail.ru + +// Memset hosting : https://www.memset.com +// Submitted by Tom Whitwell +miniserver.com +memset.net + +// MetaCentrum, CESNET z.s.p.o. : https://www.metacentrum.cz/en/ +// Submitted by Zdeněk Šustr +cloud.metacentrum.cz +custom.metacentrum.cz + +// MetaCentrum, CESNET z.s.p.o. : https://www.metacentrum.cz/en/ +// Submitted by Radim Janča +flt.cloud.muni.cz +usr.cloud.muni.cz + +// Meteor Development Group : https://www.meteor.com/hosting +// Submitted by Pierre Carrier +meteorapp.com +eu.meteorapp.com + // Michau Enterprises Limited : http://www.co.pl/ co.pl -// Microsoft : http://microsoft.com -// Submitted by Barry Dorrans 2014-01-24 +// Microsoft Corporation : http://microsoft.com +// Submitted by Justin Luk +azurecontainer.io azurewebsites.net azure-mobile.net cloudapp.net +// Mozilla Corporation : https://mozilla.com +// Submitted by Ben Francis +mozilla-iot.org + +// Mozilla Foundation : https://mozilla.org/ +// Submitted by glob +bmoattachments.org + +// MSK-IX : https://www.msk-ix.ru/ +// Submitted by Khannanov Roman +net.ru +org.ru +pp.ru + +// Netlify : https://www.netlify.com +// Submitted by Jessica Parsons +bitballoon.com +netlify.com + +// Neustar Inc. +// Submitted by Trung Tran +4u.com + +// ngrok : https://ngrok.com/ +// Submitted by Alan Shreve +ngrok.io + +// Nimbus Hosting Ltd. : https://www.nimbushosting.co.uk/ +// Submitted by Nicholas Ford +nh-serv.co.uk + // NFSN, Inc. : https://www.NearlyFreeSpeech.NET/ -// Submitted by Jeff Wheelhouse 2014-02-02 +// Submitted by Jeff Wheelhouse nfshost.com +// Now-DNS : https://now-dns.com +// Submitted by Steve Russell +dnsking.ch +mypi.co +n4t.co +001www.com +ddnslive.com +myiphost.com +forumz.info +16-b.it +32-b.it +64-b.it +soundcast.me +tcp4.me +dnsup.net +hicam.net +now-dns.net +ownip.net +vpndns.net +dynserv.org +now-dns.org +x443.pw +now-dns.top +ntdll.top +freeddns.us +crafting.xyz +zapto.xyz + +// nsupdate.info : https://www.nsupdate.info/ +// Submitted by Thomas Waldmann +nsupdate.info +nerdpol.ovh + +// No-IP.com : https://noip.com/ +// Submitted by Deven Reza +blogsyte.com +brasilia.me +cable-modem.org +ciscofreak.com +collegefan.org +couchpotatofries.org +damnserver.com +ddns.me +ditchyourip.com +dnsfor.me +dnsiskinky.com +dvrcam.info +dynns.com +eating-organic.net +fantasyleague.cc +geekgalaxy.com +golffan.us +health-carereform.com +homesecuritymac.com +homesecuritypc.com +hopto.me +ilovecollege.info +loginto.me +mlbfan.org +mmafan.biz +myactivedirectory.com +mydissent.net +myeffect.net +mymediapc.net +mypsx.net +mysecuritycamera.com +mysecuritycamera.net +mysecuritycamera.org +net-freaks.com +nflfan.org +nhlfan.net +no-ip.ca +no-ip.co.uk +no-ip.net +noip.us +onthewifi.com +pgafan.net +point2this.com +pointto.us +privatizehealthinsurance.net +quicksytes.com +read-books.org +securitytactics.com +serveexchange.com +servehumour.com +servep2p.com +servesarcasm.com +stufftoread.com +ufcfan.org +unusualperson.com +workisboring.com +3utilities.com +bounceme.net +ddns.net +ddnsking.com +gotdns.ch +hopto.org +myftp.biz +myftp.org +myvnc.com +no-ip.biz +no-ip.info +no-ip.org +noip.me +redirectme.net +servebeer.com +serveblog.net +servecounterstrike.com +serveftp.com +servegame.com +servehalflife.com +servehttp.com +serveirc.com +serveminecraft.net +servemp3.com +servepics.com +servequake.com +sytes.net +webhop.me +zapto.org + +// NodeArt : https://nodeart.io +// Submitted by Konstantin Nosov +stage.nodeart.io + +// Nodum B.V. : https://nodum.io/ +// Submitted by Wietse Wind +nodum.co +nodum.io + +// Nucleos Inc. : https://nucleos.com +// Submitted by Piotr Zduniak +pcloud.host + // NYC.mn : http://www.information.nyc.mn -// Submitted by Matthew Brown 2013-03-11 +// Submitted by Matthew Brown nyc.mn +// NymNom : https://nymnom.com/ +// Submitted by Dave McCormack +nom.ae +nom.af +nom.ai +nom.al +nym.by +nym.bz +nom.cl +nom.gd +nom.ge +nom.gl +nym.gr +nom.gt +nym.gy +nom.hn +nym.ie +nom.im +nom.ke +nym.kz +nym.la +nym.lc +nom.li +nym.li +nym.lt +nym.lu +nym.me +nom.mk +nym.mn +nym.mx +nom.nu +nym.nz +nym.pe +nym.pt +nom.pw +nom.qa +nym.ro +nom.rs +nom.si +nym.sk +nom.st +nym.su +nym.sx +nom.tj +nym.tw +nom.ug +nom.uy +nom.vc +nom.vg + +// Octopodal Solutions, LLC. : https://ulterius.io/ +// Submitted by Andrew Sampson +cya.gg + +// Omnibond Systems, LLC. : https://www.omnibond.com +// Submitted by Cole Estep +cloudycluster.net + // One Fold Media : http://www.onefoldmedia.com/ -// Submitted by Eddie Jones 2014-06-10 +// Submitted by Eddie Jones nid.io +// OpenCraft GmbH : http://opencraft.com/ +// Submitted by Sven Marnach +opencraft.hosting + // Opera Software, A.S.A. -// Submitted by Yngve Pettersen 2009-11-26 +// Submitted by Yngve Pettersen operaunite.com // OutSystems -// Submitted by Duarte Santos 2014-03-11 +// Submitted by Duarte Santos outsystemscloud.com +// OwnProvider GmbH: http://www.ownprovider.com +// Submitted by Jan Moennich +ownprovider.com +own.pm + +// OX : http://www.ox.rs +// Submitted by Adam Grand +ox.rs + +// oy.lc +// Submitted by Charly Coste +oy.lc + +// Pagefog : https://pagefog.com/ +// Submitted by Derek Myers +pgfog.com + +// Pagefront : https://www.pagefronthq.com/ +// Submitted by Jason Kriss +pagefrontapp.com + // .pl domains (grandfathered) art.pl gliwice.pl @@ -9686,19 +12313,214 @@ poznan.pl wroc.pl zakopane.pl +// Pantheon Systems, Inc. : https://pantheon.io/ +// Submitted by Gary Dylina +pantheonsite.io +gotpantheon.com + +// Peplink | Pepwave : http://peplink.com/ +// Submitted by Steve Leung +mypep.link + +// Planet-Work : https://www.planet-work.com/ +// Submitted by Frédéric VANNIÈRE +on-web.fr + +// Platform.sh : https://platform.sh +// Submitted by Nikola Kotur +*.platform.sh +*.platformsh.site + +// prgmr.com : https://prgmr.com/ +// Submitted by Sarah Newman +xen.prgmr.com + // priv.at : http://www.nic.priv.at/ -// Submitted by registry 2008-06-09 +// Submitted by registry priv.at +// Protonet GmbH : http://protonet.io +// Submitted by Martin Meier +protonet.io + +// Publication Presse Communication SARL : https://ppcom.fr +// Submitted by Yaacov Akiba Slama +chirurgiens-dentistes-en-france.fr +byen.site + +// Redstar Consultants : https://www.redstarconsultants.com/ +// Submitted by Jons Slemmer +instantcloud.cn + +// Russian Academy of Sciences +// Submitted by Tech Support +ras.ru + +// QA2 +// Submitted by Daniel Dent (https://www.danieldent.com/) +qa2.com + +// QNAP System Inc : https://www.qnap.com +// Submitted by Nick Chang +dev-myqnapcloud.com +alpha-myqnapcloud.com +myqnapcloud.com + +// Quip : https://quip.com +// Submitted by Patrick Linehan +*.quipelements.com + +// Qutheory LLC : http://qutheory.io +// Submitted by Jonas Schwartz +vapor.cloud +vaporcloud.io + +// Rackmaze LLC : https://www.rackmaze.com +// Submitted by Kirill Pertsev +rackmaze.com +rackmaze.net + +// Read The Docs, Inc : https://www.readthedocs.org +// Submitted by David Fischer +readthedocs.io + // Red Hat, Inc. OpenShift : https://openshift.redhat.com/ -// Submitted by Tim Kramer 2012-10-24 +// Submitted by Tim Kramer rhcloud.com +// Resin.io : https://resin.io +// Submitted by Tim Perry +resindevice.io +devices.resinstaging.io + +// RethinkDB : https://www.rethinkdb.com/ +// Submitted by Chris Kastorff +hzc.io + +// Revitalised Limited : http://www.revitalised.co.uk +// Submitted by Jack Price +wellbeingzone.eu +ptplus.fit +wellbeingzone.co.uk + +// Sandstorm Development Group, Inc. : https://sandcats.io/ +// Submitted by Asheesh Laroia +sandcats.io + +// SBE network solutions GmbH : https://www.sbe.de/ +// Submitted by Norman Meilick +logoip.de +logoip.com + +// schokokeks.org GbR : https://schokokeks.org/ +// Submitted by Hanno Böck +schokokeks.net + +// Scry Security : http://www.scrysec.com +// Submitted by Shante Adam +scrysec.com + +// Securepoint GmbH : https://www.securepoint.de +// Submitted by Erik Anders +firewall-gateway.com +firewall-gateway.de +my-gateway.de +my-router.de +spdns.de +spdns.eu +firewall-gateway.net +my-firewall.org +myfirewall.org +spdns.org + +// SensioLabs, SAS : https://sensiolabs.com/ +// Submitted by Fabien Potencier +*.s5y.io +*.sensiosite.cloud + +// Service Online LLC : http://drs.ua/ +// Submitted by Serhii Bulakh +biz.ua +co.ua +pp.ua + +// ShiftEdit : https://shiftedit.net/ +// Submitted by Adam Jimenez +shiftedit.io + +// Shopblocks : http://www.shopblocks.com/ +// Submitted by Alex Bowers +myshopblocks.com + // SinaAppEngine : http://sae.sina.com.cn/ -// Submitted by SinaAppEngine 2015-02-02 +// Submitted by SinaAppEngine +1kapp.com +appchizi.com +applinzi.com sinaapp.com vipsinaapp.com -1kapp.com + +// Siteleaf : https://www.siteleaf.com/ +// Submitted by Skylar Challand +siteleaf.net + +// Skyhat : http://www.skyhat.io +// Submitted by Shante Adam +bounty-full.com +alpha.bounty-full.com +beta.bounty-full.com + +// staticland : https://static.land +// Submitted by Seth Vincent +static.land +dev.static.land +sites.static.land + +// SourceLair PC : https://www.sourcelair.com +// Submitted by Antonis Kalipetis +apps.lair.io +*.stolos.io + +// SpaceKit : https://www.spacekit.io/ +// Submitted by Reza Akhavan +spacekit.io + +// SpeedPartner GmbH: https://www.speedpartner.de/ +// Submitted by Stefan Neufeind +customer.speedpartner.de + +// Storj Labs Inc. : https://storj.io/ +// Submitted by Philip Hutchins +storj.farm + +// Studenten Net Twente : http://www.snt.utwente.nl/ +// Submitted by Silke Hofstra +utwente.io + +// Sub 6 Limited: http://www.sub6.com +// Submitted by Dan Miller +temp-dns.com + +// Synology, Inc. : https://www.synology.com/ +// Submitted by Rony Weng +diskstation.me +dscloud.biz +dscloud.me +dscloud.mobi +dsmynas.com +dsmynas.net +dsmynas.org +familyds.com +familyds.net +familyds.org +i234.me +myds.me +synology.me +vpnplus.to + +// TAIFUN Software AG : http://taifun-software.de +// Submitted by Bjoern Henke +taifun-dns.de // TASK geographical domains (www.task.gda.pl/uslugi/dns) gda.pl @@ -9707,20 +12529,167 @@ gdynia.pl med.pl sopot.pl +// The Gwiddle Foundation : https://gwiddlefoundation.org.uk +// Submitted by Joshua Bayfield +gwiddle.co.uk + +// Thingdust AG : https://thingdust.com/ +// Submitted by Adrian Imboden +cust.dev.thingdust.io +cust.disrec.thingdust.io +cust.prod.thingdust.io +cust.testing.thingdust.io + +// TownNews.com : http://www.townnews.com +// Submitted by Dustin Ward +bloxcms.com +townnews-staging.com + +// TrafficPlex GmbH : https://www.trafficplex.de/ +// Submitted by Phillipp Röll +12hp.at +2ix.at +4lima.at +lima-city.at +12hp.ch +2ix.ch +4lima.ch +lima-city.ch +trafficplex.cloud +de.cool +12hp.de +2ix.de +4lima.de +lima-city.de +1337.pictures +clan.rip +lima-city.rocks +webspace.rocks +lima.zone + +// TransIP : https://www.transip.nl +// Submitted by Rory Breuk +*.transurl.be +*.transurl.eu +*.transurl.nl + +// TuxFamily : http://tuxfamily.org +// Submitted by TuxFamily administrators +tuxfamily.org + +// TwoDNS : https://www.twodns.de/ +// Submitted by TwoDNS-Support +dd-dns.de +diskstation.eu +diskstation.org +dray-dns.de +draydns.de +dyn-vpn.de +dynvpn.de +mein-vigor.de +my-vigor.de +my-wan.de +syno-ds.de +synology-diskstation.de +synology-ds.de + +// Uberspace : https://uberspace.de +// Submitted by Moritz Werner +uber.space +*.uberspace.de + // UDR Limited : http://www.udr.hk.com -// Submitted by registry 2014-11-07 +// Submitted by registry hk.com hk.org ltd.hk inc.hk +// United Gameserver GmbH : https://united-gameserver.de +// Submitted by Stefan Schwarz +virtualuser.de +virtual-user.de + +// .US +// Submitted by Ed Moore +lib.de.us + +// VeryPositive SIA : http://very.lv +// Submitted by Danko Aleksejevs +2038.io + +// Viprinet Europe GmbH : http://www.viprinet.com +// Submitted by Simon Kissel +router.management + +// Virtual-Info : https://www.virtual-info.info/ +// Submitted by Adnan RIHAN +v-info.info + +// WeDeploy by Liferay, Inc. : https://www.wedeploy.com +// Submitted by Henrique Vicente +wedeploy.io +wedeploy.me +wedeploy.sh + +// Western Digital Technologies, Inc : https://www.wdc.com +// Submitted by Jung Jin +remotewd.com + +// Wikimedia Labs : https://wikitech.wikimedia.org +// Submitted by Yuvi Panda +wmflabs.org + +// XenonCloud GbR: https://xenoncloud.net +// Submitted by Julian Uphoff +half.host + +// XnBay Technology : http://www.xnbay.com/ +// Submitted by XnBay Developer +xnbay.com +u2.xnbay.com +u2-local.xnbay.com + +// XS4ALL Internet bv : https://www.xs4all.nl/ +// Submitted by Daniel Mostertman +cistron.nl +demon.nl +xs4all.space + +// YesCourse Pty Ltd : https://yescourse.com +// Submitted by Atul Bhouraskar +official.academy + // Yola : https://www.yola.com/ -// Submitted by Stefano Rivera 2014-07-09 +// Submitted by Stefano Rivera yolasite.com +// Yombo : https://yombo.net +// Submitted by Mitch Schwenk +ybo.faith +yombo.me +homelink.one +ybo.party +ybo.review +ybo.science +ybo.trade + +// Yunohost : https://yunohost.org +// Submitted by Valentin Grimaud +nohost.me +noho.st + // ZaNiC : http://www.za.net/ -// Submitted by registry 2009-10-03 +// Submitted by registry za.net za.org +// Zeit, Inc. : https://zeit.domains/ +// Submitted by Olli Vanhoja +now.sh + +// Zone.id : https://zone.id/ +// Submitted by Su Hendro +zone.id + // ===END PRIVATE DOMAINS=== diff --git a/netwerk/protocol/http/InterceptedChannel.h b/netwerk/protocol/http/InterceptedChannel.h index 9d800da798..cf3eb70143 100644 --- a/netwerk/protocol/http/InterceptedChannel.h +++ b/netwerk/protocol/http/InterceptedChannel.h @@ -8,7 +8,7 @@ #define InterceptedChannel_h #include "nsINetworkInterceptController.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "mozilla/Maybe.h" class nsICacheEntry; diff --git a/security/manager/ssl/src/nsNSSComponent.cpp b/security/manager/ssl/src/nsNSSComponent.cpp index 707d7f3ae9..f15ccf8b7b 100644 --- a/security/manager/ssl/src/nsNSSComponent.cpp +++ b/security/manager/ssl/src/nsNSSComponent.cpp @@ -1602,7 +1602,8 @@ nsNSSComponent::GetDefaultCertVerifier() { MutexAutoLock lock(mutex); MOZ_ASSERT(mNSSInitialized); - return mDefaultCertVerifier; + RefPtr certVerifier(mDefaultCertVerifier); + return certVerifier.forget(); } namespace mozilla { namespace psm { diff --git a/widget/VsyncDispatcher.h b/widget/VsyncDispatcher.h index e836067224..149b357380 100644 --- a/widget/VsyncDispatcher.h +++ b/widget/VsyncDispatcher.h @@ -10,7 +10,7 @@ #include "mozilla/TimeStamp.h" #include "nsISupportsImpl.h" #include "nsTArray.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" namespace mozilla { diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index 8a3fbc4d58..a3552897d1 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -2538,7 +2538,7 @@ nsChildView::StartRemoteDrawing() return nullptr; } - return drawTarget; + return drawTarget.forget(); } void @@ -2655,7 +2655,7 @@ RectTextureImage::BeginUpdate(const nsIntSize& aNewSize, mInUpdate = true; RefPtr drawTarget = mUpdateDrawTarget; - return drawTarget; + return drawTarget.forget(); } #define NSFoundationVersionWithProperStrideSupportForSubtextureUpload NSFoundationVersionNumber10_6_3 diff --git a/widget/gonk/GoannaTouchDispatcher.h b/widget/gonk/GoannaTouchDispatcher.h index 1ee3e127a7..d46406e917 100644 --- a/widget/gonk/GoannaTouchDispatcher.h +++ b/widget/gonk/GoannaTouchDispatcher.h @@ -15,14 +15,14 @@ * limitations under the License. */ -#ifndef GECKO_TOUCH_INPUT_DISPATCHER_h -#define GECKO_TOUCH_INPUT_DISPATCHER_h +#ifndef GOANNA_TOUCH_INPUT_DISPATCHER_h +#define GOANNA_TOUCH_INPUT_DISPATCHER_h #include "InputData.h" #include "Units.h" #include "mozilla/Mutex.h" #include -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" class nsIWidget; @@ -86,4 +86,4 @@ private: }; } // namespace mozilla -#endif // GECKO_TOUCH_INPUT_DISPATCHER_h +#endif // GOANNA_TOUCH_INPUT_DISPATCHER_h diff --git a/widget/gonk/nativewindow/GonkBufferQueueJB.cpp b/widget/gonk/nativewindow/GonkBufferQueueJB.cpp index 7ab236eed9..f70b537ed5 100644 --- a/widget/gonk/nativewindow/GonkBufferQueueJB.cpp +++ b/widget/gonk/nativewindow/GonkBufferQueueJB.cpp @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * Copyright (C) 2012 The Android Open Source Project * Copyright (C) 2013 Mozilla Foundation @@ -136,7 +137,8 @@ GonkBufferQueue::getTextureClientFromBuffer(ANativeWindowBuffer* buffer) for (int i = 0; i < NUM_BUFFER_SLOTS; i++) { if (mSlots[i].mGraphicBuffer != NULL && mSlots[i].mGraphicBuffer->handle == buffer->handle) { - return mSlots[i].mTextureClient; + RefPtr client(mSlots[i].mTextureClient); + return client.forget(); } } ST_LOGE("getSlotFromBufferLocked: unknown buffer: %p", buffer->handle); diff --git a/widget/gonk/nativewindow/GonkBufferQueueKK.cpp b/widget/gonk/nativewindow/GonkBufferQueueKK.cpp index 88d7260dd8..1d9a88e00d 100644 --- a/widget/gonk/nativewindow/GonkBufferQueueKK.cpp +++ b/widget/gonk/nativewindow/GonkBufferQueueKK.cpp @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * Copyright (C) 2012 The Android Open Source Project * Copyright (C) 2013 Mozilla Foundation @@ -128,7 +129,8 @@ GonkBufferQueue::getTextureClientFromBuffer(ANativeWindowBuffer* buffer) for (int i = 0; i < NUM_BUFFER_SLOTS; i++) { if (mSlots[i].mGraphicBuffer != NULL && mSlots[i].mGraphicBuffer->handle == buffer->handle) { - return mSlots[i].mTextureClient; + RefPtr client(mSlots[i].mTextureClient); + return client.forget(); } } ALOGE("getSlotFromBufferLocked: unknown buffer: %p", buffer->handle); diff --git a/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueConsumer.cpp b/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueConsumer.cpp index b9543ed48a..5e7d4b378c 100644 --- a/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueConsumer.cpp +++ b/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueConsumer.cpp @@ -531,7 +531,8 @@ GonkBufferQueueConsumer::getTextureClientFromBuffer(ANativeWindowBuffer* buffer) for (int i = 0; i < GonkBufferQueueDefs::NUM_BUFFER_SLOTS; i++) { if (mSlots[i].mGraphicBuffer != NULL && mSlots[i].mGraphicBuffer->handle == buffer->handle) { - return mSlots[i].mTextureClient; + RefPtr client(mSlots[i].mTextureClient); + return client.forget(); } } ALOGE("getSlotFromBufferLocked: unknown buffer: %p", buffer->handle); diff --git a/widget/gonk/nativewindow/GonkNativeWindowICS.cpp b/widget/gonk/nativewindow/GonkNativeWindowICS.cpp index 3065d113c9..6874efc930 100644 --- a/widget/gonk/nativewindow/GonkNativeWindowICS.cpp +++ b/widget/gonk/nativewindow/GonkNativeWindowICS.cpp @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* * Copyright (C) 2010 The Android Open Source Project * Copyright (C) 2012-2013 Mozilla Foundation @@ -409,7 +410,8 @@ GonkNativeWindow::getTextureClientFromBuffer(ANativeWindowBuffer* buffer) return nullptr; } - return mSlots[buf].mTextureClient; + RefPtr client(mSlots[buf].mTextureClient); + return client.forget(); } status_t GonkNativeWindow::queueBuffer(int buf, int64_t timestamp, @@ -487,7 +489,8 @@ GonkNativeWindow::getCurrentBuffer() { mDequeueCondition.signal(); mSlots[buf].mTextureClient->SetRecycleCallback(GonkNativeWindow::RecycleCallback, this); - return mSlots[buf].mTextureClient; + RefPtr client(mSlots[buf].mTextureClient); + return client.forget(); } diff --git a/widget/gonk/nativewindow/GonkNativeWindowJB.cpp b/widget/gonk/nativewindow/GonkNativeWindowJB.cpp index ee6f2669f8..252b0ff0e2 100644 --- a/widget/gonk/nativewindow/GonkNativeWindowJB.cpp +++ b/widget/gonk/nativewindow/GonkNativeWindowJB.cpp @@ -125,8 +125,8 @@ GonkNativeWindow::getCurrentBuffer() { if (!textureClient) { return NULL; } - textureClient->SetRecycleCallback(GonkNativeWindow::RecycleCallback, this); - return textureClient; + textureClient->SetRecycleCallback(GonkNativeWindow::RecycleCallback, this); + return textureClient.forget(); } /* static */ void diff --git a/widget/gonk/nativewindow/GonkNativeWindowKK.cpp b/widget/gonk/nativewindow/GonkNativeWindowKK.cpp index dce3cf664b..22be01d19e 100644 --- a/widget/gonk/nativewindow/GonkNativeWindowKK.cpp +++ b/widget/gonk/nativewindow/GonkNativeWindowKK.cpp @@ -125,8 +125,8 @@ GonkNativeWindow::getCurrentBuffer() { if (!textureClient) { return NULL; } - textureClient->SetRecycleCallback(GonkNativeWindow::RecycleCallback, this); - return textureClient; + textureClient->SetRecycleCallback(GonkNativeWindow::RecycleCallback, this); + return textureClient.forget(); } /* static */ void diff --git a/widget/gonk/nativewindow/GonkNativeWindowLL.cpp b/widget/gonk/nativewindow/GonkNativeWindowLL.cpp index ee939ce740..bb943ec797 100644 --- a/widget/gonk/nativewindow/GonkNativeWindowLL.cpp +++ b/widget/gonk/nativewindow/GonkNativeWindowLL.cpp @@ -137,7 +137,7 @@ GonkNativeWindow::getCurrentBuffer() { return NULL; } textureClient->SetRecycleCallback(GonkNativeWindow::RecycleCallback, this); - return textureClient; + return textureClient.forget(); } /* static */ void diff --git a/widget/gonk/nsWindow.cpp b/widget/gonk/nsWindow.cpp index 8b3724ffde..8a7347288a 100644 --- a/widget/gonk/nsWindow.cpp +++ b/widget/gonk/nsWindow.cpp @@ -710,7 +710,8 @@ nsWindow::StartRemoteDrawing() mBackBuffer = mFramebufferTarget->CreateSimilarDrawTarget( mFramebufferTarget->GetSize(), mFramebufferTarget->GetFormat()); } - return mBackBuffer; + RefPtr buffer(mBackBuffer); + return buffer.forget(); } void diff --git a/xpcom/base/moz.build b/xpcom/base/moz.build index c2cd3bda77..6e5ebdbdd9 100644 --- a/xpcom/base/moz.build +++ b/xpcom/base/moz.build @@ -55,7 +55,6 @@ EXPORTS += [ 'nsISizeOf.h', 'nsISupportsBase.h', 'nsObjCExceptions.h', - 'nsRefPtr.h', 'nsStackWalk.h', 'nsTraceRefcnt.h', 'nsWeakPtr.h', diff --git a/xpcom/base/nsAutoPtr.h b/xpcom/base/nsAutoPtr.h index a02dc6aa6d..e4b488d55c 100644 --- a/xpcom/base/nsAutoPtr.h +++ b/xpcom/base/nsAutoPtr.h @@ -8,7 +8,7 @@ #define nsAutoPtr_h #include "nsCOMPtr.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsCycleCollectionNoteChild.h" #include "mozilla/MemoryReporting.h" diff --git a/xpcom/glue/nsCOMPtr.h b/xpcom/glue/nsCOMPtr.h index c869027fb1..80923689de 100644 --- a/xpcom/glue/nsCOMPtr.h +++ b/xpcom/glue/nsCOMPtr.h @@ -28,6 +28,7 @@ #include "nsDebug.h" // for |NS_ASSERTION| #include "nsISupportsUtils.h" // for |nsresult|, |NS_ADDREF|, |NS_GET_TEMPLATE_IID| et al +#include "mozilla/nsRefPtr.h" #include "nsCycleCollectionNoteChild.h" @@ -1369,4 +1370,27 @@ CallQueryInterface(nsCOMPtr& aSourcePtr, DestinationType** aDestPtr) return CallQueryInterface(aSourcePtr.get(), aDestPtr); } +template +nsRefPtr::nsRefPtr(const nsCOMPtr_helper& aHelper) +{ + void* newRawPtr; + if (NS_FAILED(aHelper(NS_GET_TEMPLATE_IID(T), &newRawPtr))) { + newRawPtr = 0; + } + mRawPtr = static_cast(newRawPtr); +} + +template +nsRefPtr& +nsRefPtr::operator=(const nsCOMPtr_helper& aHelper) +{ + void* newRawPtr; + if (NS_FAILED(aHelper(NS_GET_TEMPLATE_IID(T), &newRawPtr))) { + newRawPtr = 0; + } + assign_assuming_AddRef(static_cast(newRawPtr)); + return *this; +} + + #endif // !defined(nsCOMPtr_h___) diff --git a/xpcom/glue/nsISupportsUtils.h b/xpcom/glue/nsISupportsUtils.h index 373b367ec2..979ce77b01 100644 --- a/xpcom/glue/nsISupportsUtils.h +++ b/xpcom/glue/nsISupportsUtils.h @@ -12,6 +12,7 @@ #include "nsError.h" #include "nsDebug.h" #include "nsISupportsImpl.h" +#include "mozilla/nsRefPtr.h" #include "mozilla/TypeTraits.h" /** @@ -141,4 +142,11 @@ CallQueryInterface(T* aSource, DestinationType** aDestination) reinterpret_cast(aDestination)); } +template +inline nsresult +CallQueryInterface(nsRefPtr& aSourcePtr, DestinationType** aDestPtr) +{ + return CallQueryInterface(aSourcePtr.get(), aDestPtr); +} + #endif /* __nsISupportsUtils_h */ diff --git a/xpcom/io/nsPipe3.cpp b/xpcom/io/nsPipe3.cpp index 3ad65ab527..4b340066a6 100644 --- a/xpcom/io/nsPipe3.cpp +++ b/xpcom/io/nsPipe3.cpp @@ -12,7 +12,7 @@ #include "nsIEventTarget.h" #include "nsISeekableStream.h" #include "nsIProgrammingLanguage.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsSegmentedBuffer.h" #include "nsStreamUtils.h" #include "nsCOMPtr.h" diff --git a/xpcom/tests/gtest/TestStrings.cpp b/xpcom/tests/gtest/TestStrings.cpp index 9a3ec9cbb1..92eca542e2 100644 --- a/xpcom/tests/gtest/TestStrings.cpp +++ b/xpcom/tests/gtest/TestStrings.cpp @@ -9,7 +9,7 @@ #include "nsStringBuffer.h" #include "nsReadableUtils.h" #include "nsCRTGlue.h" -#include "nsRefPtr.h" +#include "mozilla/nsRefPtr.h" #include "nsTArray.h" #include "gtest/gtest.h"