author | Chris Peterson <cpeterson@mozilla.com> |
Sun, 17 Feb 2019 23:05:15 -0800 | |
changeset 461615 | 0df9a1e522afbc4fedd23fa72bc307aac7d06185 |
parent 461614 | 13bf48ec0625e11cd3a21e0db5da6bbc26b965fa |
child 461616 | 63536a044a29b3f723e3ee829f260dafc41feb54 |
push id | 35626 |
push user | csabou@mozilla.com |
push date | Thu, 28 Feb 2019 11:31:08 +0000 |
treeherder | mozilla-central@2ea0c1db7e60 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mattwoodrow |
bugs | 1528881 |
milestone | 67.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/gfx/layers/basic/TextureHostBasic.h +++ b/gfx/layers/basic/TextureHostBasic.h @@ -10,16 +10,20 @@ #include "CompositableHost.h" #include "mozilla/layers/LayersSurfaces.h" #include "mozilla/layers/TextureHost.h" #include "mozilla/gfx/2D.h" namespace mozilla { namespace layers { +already_AddRefed<TextureHost> CreateTextureHostBasic( + const SurfaceDescriptor& aDesc, ISurfaceAllocator* aDeallocator, + LayersBackend aBackend, TextureFlags aFlags); + /** * A texture source interface that can be used by the software Compositor. */ class TextureSourceBasic { public: TextureSourceBasic() : mFromYCBCR(false) {} virtual ~TextureSourceBasic() {} virtual gfx::SourceSurface* GetSurface(gfx::DrawTarget* aTarget) = 0;
--- a/gfx/layers/composite/TextureHost.cpp +++ b/gfx/layers/composite/TextureHost.cpp @@ -48,16 +48,17 @@ # include "mozilla/layers/X11TextureHost.h" #endif #ifdef XP_MACOSX # include "../opengl/MacIOSurfaceTextureHostOGL.h" #endif #ifdef XP_WIN +# include "mozilla/layers/TextureD3D11.h" # include "mozilla/layers/TextureDIB.h" #endif #if 0 # define RECYCLE_LOG(...) printf_stderr(__VA_ARGS__) #else # define RECYCLE_LOG(...) \ do { \ @@ -158,31 +159,16 @@ uint64_t TextureHost::GetTextureSerial(P PTextureParent* TextureHost::GetIPDLActor() { return mActor; } void TextureHost::SetLastFwdTransactionId(uint64_t aTransactionId) { MOZ_ASSERT(mFwdTransactionId <= aTransactionId); mFwdTransactionId = aTransactionId; } -// implemented in TextureHostOGL.cpp -already_AddRefed<TextureHost> CreateTextureHostOGL( - const SurfaceDescriptor& aDesc, ISurfaceAllocator* aDeallocator, - LayersBackend aBackend, TextureFlags aFlags); - -// implemented in TextureHostBasic.cpp -already_AddRefed<TextureHost> CreateTextureHostBasic( - const SurfaceDescriptor& aDesc, ISurfaceAllocator* aDeallocator, - LayersBackend aBackend, TextureFlags aFlags); - -// implemented in TextureD3D11.cpp -already_AddRefed<TextureHost> CreateTextureHostD3D11( - const SurfaceDescriptor& aDesc, ISurfaceAllocator* aDeallocator, - LayersBackend aBackend, TextureFlags aFlags); - already_AddRefed<TextureHost> TextureHost::Create( const SurfaceDescriptor& aDesc, const ReadLockDescriptor& aReadLock, ISurfaceAllocator* aDeallocator, LayersBackend aBackend, TextureFlags aFlags, wr::MaybeExternalImageId& aExternalImageId) { RefPtr<TextureHost> result; switch (aDesc.type()) { case SurfaceDescriptor::TSurfaceDescriptorBuffer:
--- a/gfx/layers/d3d11/TextureD3D11.h +++ b/gfx/layers/d3d11/TextureD3D11.h @@ -20,16 +20,20 @@ namespace mozilla { namespace gl { class GLBlitHelper; } namespace layers { +already_AddRefed<TextureHost> CreateTextureHostD3D11( + const SurfaceDescriptor& aDesc, ISurfaceAllocator* aDeallocator, + LayersBackend aBackend, TextureFlags aFlags); + class MOZ_RAII AutoTextureLock { public: AutoTextureLock(IDXGIKeyedMutex* aMutex, HRESULT& aResult, uint32_t aTimeout = 0); ~AutoTextureLock(); private: RefPtr<IDXGIKeyedMutex> mMutex;
--- a/gfx/layers/opengl/TextureHostOGL.h +++ b/gfx/layers/opengl/TextureHostOGL.h @@ -48,16 +48,20 @@ class Compositor; class CompositorOGL; class TextureImageTextureSourceOGL; class GLTextureSource; void ApplySamplingFilterToBoundTexture(gl::GLContext* aGL, gfx::SamplingFilter aSamplingFilter, GLuint aTarget = LOCAL_GL_TEXTURE_2D); +already_AddRefed<TextureHost> CreateTextureHostOGL( + const SurfaceDescriptor& aDesc, ISurfaceAllocator* aDeallocator, + LayersBackend aBackend, TextureFlags aFlags); + /* * TextureHost implementations for the OpenGL backend. * * Note that it is important to be careful about the ownership model with * the OpenGL backend, due to some widget limitation on Linux: before * the nsBaseWidget associated with our OpenGL context has been completely * deleted, every resource belonging to the OpenGL context MUST have been * released. At the moment the teardown sequence happens in the middle of