Bug 1707943 - webrender_bindings: Fix warnings and apply suggestions form static analysis, r=gfx-reviewers,lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D113603
This commit is contained in:
Robert Mader 2021-04-28 12:33:55 +00:00
Родитель 1055294cdd
Коммит 68fa6c04b1
20 изменённых файлов: 94 добавлений и 96 удалений

Просмотреть файл

@ -30,8 +30,7 @@
# include "mozilla/webrender/RenderCompositorNative.h"
#endif
namespace mozilla {
namespace wr {
namespace mozilla::wr {
void wr_compositor_add_surface(void* aCompositor, wr::NativeSurfaceId aId,
const wr::CompositorSurfaceTransform* aTransform,
@ -142,23 +141,23 @@ void wr_compositor_unmap_tile(void* aCompositor) {
}
void wr_partial_present_compositor_set_buffer_damage_region(
void* aCompositor, const wr::DeviceIntRect* aRects, size_t aNumRects) {
void* aCompositor, const wr::DeviceIntRect* aRects, size_t aNRects) {
RenderCompositor* compositor = static_cast<RenderCompositor*>(aCompositor);
compositor->SetBufferDamageRegion(aRects, aNumRects);
compositor->SetBufferDamageRegion(aRects, aNRects);
}
/* static */
UniquePtr<RenderCompositor> RenderCompositor::Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError) {
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError) {
if (aWidget->GetCompositorOptions().UseSoftwareWebRender()) {
#ifdef XP_MACOSX
// Mac uses NativeLayerCA
if (!gfxPlatform::IsHeadless()) {
return RenderCompositorNativeSWGL::Create(std::move(aWidget), aError);
return RenderCompositorNativeSWGL::Create(aWidget, aError);
}
#endif
UniquePtr<RenderCompositor> comp =
RenderCompositorLayersSWGL::Create(std::move(aWidget), aError);
RenderCompositorLayersSWGL::Create(aWidget, aError);
if (comp) {
return comp;
}
@ -169,12 +168,12 @@ UniquePtr<RenderCompositor> RenderCompositor::Create(
return nullptr;
}
#endif
return RenderCompositorSWGL::Create(std::move(aWidget), aError);
return RenderCompositorSWGL::Create(aWidget, aError);
}
#ifdef XP_WIN
if (gfx::gfxVars::UseWebRenderANGLE()) {
return RenderCompositorANGLE::Create(std::move(aWidget), aError);
return RenderCompositorANGLE::Create(aWidget, aError);
}
#endif
@ -191,13 +190,14 @@ UniquePtr<RenderCompositor> RenderCompositor::Create(
return nullptr;
#elif defined(XP_MACOSX)
// Mac uses NativeLayerCA
return RenderCompositorNativeOGL::Create(std::move(aWidget), aError);
return RenderCompositorNativeOGL::Create(aWidget, aError);
#else
return RenderCompositorOGL::Create(std::move(aWidget), aError);
return RenderCompositorOGL::Create(aWidget, aError);
#endif
}
RenderCompositor::RenderCompositor(RefPtr<widget::CompositorWidget>&& aWidget)
RenderCompositor::RenderCompositor(
const RefPtr<widget::CompositorWidget>& aWidget)
: mWidget(aWidget) {}
RenderCompositor::~RenderCompositor() = default;
@ -235,5 +235,4 @@ GLenum RenderCompositor::IsContextLost(bool aForce) {
return resetStatus;
}
} // namespace wr
} // namespace mozilla
} // namespace mozilla::wr

Просмотреть файл

@ -38,9 +38,9 @@ class RenderCompositorD3D11SWGL;
class RenderCompositor {
public:
static UniquePtr<RenderCompositor> Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError);
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError);
RenderCompositor(RefPtr<widget::CompositorWidget>&& aWidget);
RenderCompositor(const RefPtr<widget::CompositorWidget>& aWidget);
virtual ~RenderCompositor();
virtual bool BeginFrame() = 0;

Просмотреть файл

@ -43,7 +43,7 @@ namespace wr {
/* static */
UniquePtr<RenderCompositor> RenderCompositorANGLE::Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError) {
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError) {
const auto& gl = RenderThread::Get()->SingletonGL(aError);
if (!gl) {
if (aError.IsEmpty()) {
@ -55,7 +55,7 @@ UniquePtr<RenderCompositor> RenderCompositorANGLE::Create(
}
UniquePtr<RenderCompositorANGLE> compositor =
MakeUnique<RenderCompositorANGLE>(std::move(aWidget));
MakeUnique<RenderCompositorANGLE>(aWidget);
if (!compositor->Initialize(aError)) {
return nullptr;
}
@ -63,8 +63,8 @@ UniquePtr<RenderCompositor> RenderCompositorANGLE::Create(
}
RenderCompositorANGLE::RenderCompositorANGLE(
RefPtr<widget::CompositorWidget>&& aWidget)
: RenderCompositor(std::move(aWidget)),
const RefPtr<widget::CompositorWidget>& aWidget)
: RenderCompositor(aWidget),
mEGLConfig(nullptr),
mEGLSurface(nullptr),
mUseTripleBuffering(false),

Просмотреть файл

@ -33,9 +33,10 @@ class DCLayerTree;
class RenderCompositorANGLE : public RenderCompositor {
public:
static UniquePtr<RenderCompositor> Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError);
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError);
explicit RenderCompositorANGLE(RefPtr<widget::CompositorWidget>&& aWidget);
explicit RenderCompositorANGLE(
const RefPtr<widget::CompositorWidget>& aWidget);
virtual ~RenderCompositorANGLE();
bool Initialize(nsACString& aError);

Просмотреть файл

@ -37,7 +37,7 @@ RenderCompositorD3D11SWGL::GetUploadMode() {
}
UniquePtr<RenderCompositor> RenderCompositorD3D11SWGL::Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError) {
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError) {
if (!aWidget->GetCompositorOptions().AllowSoftwareWebRenderD3D11() ||
!gfx::gfxConfig::IsEnabled(gfx::Feature::D3D11_COMPOSITING)) {
return nullptr;
@ -59,14 +59,13 @@ UniquePtr<RenderCompositor> RenderCompositorD3D11SWGL::Create(
}
compositor->UseForSoftwareWebRender();
return MakeUnique<RenderCompositorD3D11SWGL>(compositor, std::move(aWidget),
ctx);
return MakeUnique<RenderCompositorD3D11SWGL>(compositor, aWidget, ctx);
}
RenderCompositorD3D11SWGL::RenderCompositorD3D11SWGL(
CompositorD3D11* aCompositor, RefPtr<widget::CompositorWidget>&& aWidget,
void* aContext)
: RenderCompositorLayersSWGL(aCompositor, std::move(aWidget), aContext) {
CompositorD3D11* aCompositor,
const RefPtr<widget::CompositorWidget>& aWidget, void* aContext)
: RenderCompositorLayersSWGL(aCompositor, aWidget, aContext) {
mSyncObject = GetCompositorD3D11()->GetSyncObject();
}

Просмотреть файл

@ -21,10 +21,10 @@ class SurfaceD3D11SWGL;
class RenderCompositorD3D11SWGL : public RenderCompositorLayersSWGL {
public:
static UniquePtr<RenderCompositor> Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError);
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError);
RenderCompositorD3D11SWGL(layers::CompositorD3D11* aCompositor,
RefPtr<widget::CompositorWidget>&& aWidget,
const RefPtr<widget::CompositorWidget>& aWidget,
void* aContext);
virtual ~RenderCompositorD3D11SWGL();

Просмотреть файл

@ -34,7 +34,7 @@ namespace mozilla::wr {
/* static */
UniquePtr<RenderCompositor> RenderCompositorEGL::Create(
RefPtr<widget::CompositorWidget> aWidget, nsACString& aError) {
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError) {
#ifdef MOZ_WAYLAND
if (!gfx::gfxVars::UseEGL()) {
return nullptr;
@ -58,8 +58,8 @@ EGLSurface RenderCompositorEGL::CreateEGLSurface() {
}
RenderCompositorEGL::RenderCompositorEGL(
RefPtr<widget::CompositorWidget> aWidget)
: RenderCompositor(std::move(aWidget)), mEGLSurface(EGL_NO_SURFACE) {}
const RefPtr<widget::CompositorWidget>& aWidget)
: RenderCompositor(aWidget), mEGLSurface(EGL_NO_SURFACE) {}
RenderCompositorEGL::~RenderCompositorEGL() {
#ifdef MOZ_WIDGET_ANDROID

Просмотреть файл

@ -17,9 +17,9 @@ namespace wr {
class RenderCompositorEGL : public RenderCompositor {
public:
static UniquePtr<RenderCompositor> Create(
RefPtr<widget::CompositorWidget> aWidget, nsACString& aError);
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError);
explicit RenderCompositorEGL(RefPtr<widget::CompositorWidget> aWidget);
explicit RenderCompositorEGL(const RefPtr<widget::CompositorWidget>& aWidget);
virtual ~RenderCompositorEGL();
bool BeginFrame() override;

Просмотреть файл

@ -29,20 +29,21 @@ using namespace layers;
namespace wr {
UniquePtr<RenderCompositor> RenderCompositorLayersSWGL::Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError) {
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError) {
#ifdef XP_WIN
return RenderCompositorD3D11SWGL::Create(std::move(aWidget), aError);
return RenderCompositorD3D11SWGL::Create(aWidget, aError);
#else
return RenderCompositorOGLSWGL::Create(std::move(aWidget), aError);
return RenderCompositorOGLSWGL::Create(aWidget, aError);
#endif
}
RenderCompositorLayersSWGL::RenderCompositorLayersSWGL(
Compositor* aCompositor, RefPtr<widget::CompositorWidget>&& aWidget,
Compositor* aCompositor, const RefPtr<widget::CompositorWidget>& aWidget,
void* aContext)
: RenderCompositor(std::move(aWidget)),
: RenderCompositor(aWidget),
mCompositor(aCompositor),
mContext(aContext) {
mContext(aContext),
mCurrentTileId(wr::NativeTileId()) {
MOZ_ASSERT(mCompositor);
MOZ_ASSERT(mContext);
}

Просмотреть файл

@ -24,10 +24,10 @@ class SurfaceD3D11SWGL;
class RenderCompositorLayersSWGL : public RenderCompositor {
public:
static UniquePtr<RenderCompositor> Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError);
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError);
RenderCompositorLayersSWGL(layers::Compositor* aCompositor,
RefPtr<widget::CompositorWidget>&& aWidget,
const RefPtr<widget::CompositorWidget>& aWidget,
void* aContext);
virtual ~RenderCompositorLayersSWGL();

Просмотреть файл

@ -24,8 +24,8 @@ namespace mozilla {
namespace wr {
RenderCompositorNative::RenderCompositorNative(
RefPtr<widget::CompositorWidget>&& aWidget, gl::GLContext* aGL)
: RenderCompositor(std::move(aWidget)),
const RefPtr<widget::CompositorWidget>& aWidget, gl::GLContext* aGL)
: RenderCompositor(aWidget),
mNativeLayerRoot(GetWidget()->GetNativeLayerRoot()) {
#ifdef XP_MACOSX
auto pool = RenderThread::Get()->SharedSurfacePool();
@ -414,7 +414,7 @@ void RenderCompositorNative::AddSurface(
/* static */
UniquePtr<RenderCompositor> RenderCompositorNativeOGL::Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError) {
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError) {
RefPtr<gl::GLContext> gl = RenderThread::Get()->SingletonGL();
if (!gl) {
gl = gl::GLContextProvider::CreateForCompositorWidget(
@ -426,13 +426,13 @@ UniquePtr<RenderCompositor> RenderCompositorNativeOGL::Create(
<< gfx::hexa(gl.get());
return nullptr;
}
return MakeUnique<RenderCompositorNativeOGL>(std::move(aWidget),
std::move(gl));
return MakeUnique<RenderCompositorNativeOGL>(aWidget, std::move(gl));
}
RenderCompositorNativeOGL::RenderCompositorNativeOGL(
RefPtr<widget::CompositorWidget>&& aWidget, RefPtr<gl::GLContext>&& aGL)
: RenderCompositorNative(std::move(aWidget), aGL), mGL(aGL) {
const RefPtr<widget::CompositorWidget>& aWidget,
RefPtr<gl::GLContext>&& aGL)
: RenderCompositorNative(aWidget, aGL), mGL(aGL) {
MOZ_ASSERT(mGL);
}
@ -530,18 +530,18 @@ void RenderCompositorNativeOGL::Unbind() {
/* static */
UniquePtr<RenderCompositor> RenderCompositorNativeSWGL::Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError) {
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError) {
void* ctx = wr_swgl_create_context();
if (!ctx) {
gfxCriticalNote << "Failed SWGL context creation for WebRender";
return nullptr;
}
return MakeUnique<RenderCompositorNativeSWGL>(std::move(aWidget), ctx);
return MakeUnique<RenderCompositorNativeSWGL>(aWidget, ctx);
}
RenderCompositorNativeSWGL::RenderCompositorNativeSWGL(
RefPtr<widget::CompositorWidget>&& aWidget, void* aContext)
: RenderCompositorNative(std::move(aWidget)), mContext(aContext) {
const RefPtr<widget::CompositorWidget>& aWidget, void* aContext)
: RenderCompositorNative(aWidget), mContext(aContext) {
MOZ_ASSERT(mContext);
}

Просмотреть файл

@ -81,8 +81,9 @@ class RenderCompositorNative : public RenderCompositor {
};
protected:
explicit RenderCompositorNative(RefPtr<widget::CompositorWidget>&& aWidget,
gl::GLContext* aGL = nullptr);
explicit RenderCompositorNative(
const RefPtr<widget::CompositorWidget>& aWidget,
gl::GLContext* aGL = nullptr);
virtual bool InitDefaultFramebuffer(const gfx::IntRect& aBounds) = 0;
virtual void DoSwap() = 0;
@ -149,9 +150,9 @@ static inline bool operator==(const RenderCompositorNative::TileKey& a0,
class RenderCompositorNativeOGL : public RenderCompositorNative {
public:
static UniquePtr<RenderCompositor> Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError);
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError);
RenderCompositorNativeOGL(RefPtr<widget::CompositorWidget>&& aWidget,
RenderCompositorNativeOGL(const RefPtr<widget::CompositorWidget>& aWidget,
RefPtr<gl::GLContext>&& aGL);
virtual ~RenderCompositorNativeOGL();
@ -183,9 +184,9 @@ class RenderCompositorNativeOGL : public RenderCompositorNative {
class RenderCompositorNativeSWGL : public RenderCompositorNative {
public:
static UniquePtr<RenderCompositor> Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError);
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError);
RenderCompositorNativeSWGL(RefPtr<widget::CompositorWidget>&& aWidget,
RenderCompositorNativeSWGL(const RefPtr<widget::CompositorWidget>& aWidget,
void* aContext);
virtual ~RenderCompositorNativeSWGL();

Просмотреть файл

@ -14,12 +14,11 @@
#include "mozilla/webrender/RenderThread.h"
#include "mozilla/widget/CompositorWidget.h"
namespace mozilla {
namespace wr {
namespace mozilla::wr {
/* static */
UniquePtr<RenderCompositor> RenderCompositorOGL::Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError) {
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError) {
RefPtr<gl::GLContext> gl = RenderThread::Get()->SingletonGL();
if (!gl) {
gl = gl::GLContextProvider::CreateForCompositorWidget(
@ -31,12 +30,13 @@ UniquePtr<RenderCompositor> RenderCompositorOGL::Create(
<< gfx::hexa(gl.get());
return nullptr;
}
return MakeUnique<RenderCompositorOGL>(std::move(gl), std::move(aWidget));
return MakeUnique<RenderCompositorOGL>(std::move(gl), aWidget);
}
RenderCompositorOGL::RenderCompositorOGL(
RefPtr<gl::GLContext>&& aGL, RefPtr<widget::CompositorWidget>&& aWidget)
: RenderCompositor(std::move(aWidget)), mGL(aGL) {
RefPtr<gl::GLContext>&& aGL,
const RefPtr<widget::CompositorWidget>& aWidget)
: RenderCompositor(aWidget), mGL(aGL) {
MOZ_ASSERT(mGL);
mIsEGL = aGL->GetContextType() == mozilla::gl::GLContextType::EGL;
@ -119,5 +119,4 @@ size_t RenderCompositorOGL::GetBufferAge() const {
return gl()->GetBufferAge();
}
} // namespace wr
} // namespace mozilla
} // namespace mozilla::wr

Просмотреть файл

@ -16,10 +16,10 @@ namespace wr {
class RenderCompositorOGL : public RenderCompositor {
public:
static UniquePtr<RenderCompositor> Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError);
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError);
RenderCompositorOGL(RefPtr<gl::GLContext>&& aGL,
RefPtr<widget::CompositorWidget>&& aWidget);
const RefPtr<widget::CompositorWidget>& aWidget);
virtual ~RenderCompositorOGL();
bool BeginFrame() override;

Просмотреть файл

@ -36,7 +36,7 @@ using namespace layers;
namespace wr {
UniquePtr<RenderCompositor> RenderCompositorOGLSWGL::Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError) {
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError) {
if (!aWidget->GetCompositorOptions().AllowSoftwareWebRenderOGL()) {
return nullptr;
}
@ -88,14 +88,13 @@ UniquePtr<RenderCompositor> RenderCompositorOGLSWGL::Create(
return nullptr;
}
return MakeUnique<RenderCompositorOGLSWGL>(compositor, std::move(aWidget),
ctx);
return MakeUnique<RenderCompositorOGLSWGL>(compositor, aWidget, ctx);
}
RenderCompositorOGLSWGL::RenderCompositorOGLSWGL(
Compositor* aCompositor, RefPtr<widget::CompositorWidget>&& aWidget,
Compositor* aCompositor, const RefPtr<widget::CompositorWidget>& aWidget,
void* aContext)
: RenderCompositorLayersSWGL(aCompositor, std::move(aWidget), aContext) {}
: RenderCompositorLayersSWGL(aCompositor, aWidget, aContext) {}
RenderCompositorOGLSWGL::~RenderCompositorOGLSWGL() {
#ifdef OZ_WIDGET_ANDROID

Просмотреть файл

@ -21,10 +21,10 @@ namespace wr {
class RenderCompositorOGLSWGL : public RenderCompositorLayersSWGL {
public:
static UniquePtr<RenderCompositor> Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError);
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError);
RenderCompositorOGLSWGL(layers::Compositor* aCompositor,
RefPtr<widget::CompositorWidget>&& aWidget,
const RefPtr<widget::CompositorWidget>& aWidget,
void* aContext);
virtual ~RenderCompositorOGLSWGL();

Просмотреть файл

@ -16,18 +16,18 @@ namespace wr {
/* static */
UniquePtr<RenderCompositor> RenderCompositorSWGL::Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError) {
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError) {
void* ctx = wr_swgl_create_context();
if (!ctx) {
gfxCriticalNote << "Failed SWGL context creation for WebRender";
return nullptr;
}
return MakeUnique<RenderCompositorSWGL>(std::move(aWidget), ctx);
return MakeUnique<RenderCompositorSWGL>(aWidget, ctx);
}
RenderCompositorSWGL::RenderCompositorSWGL(
RefPtr<widget::CompositorWidget>&& aWidget, void* aContext)
: RenderCompositor(std::move(aWidget)), mContext(aContext) {
const RefPtr<widget::CompositorWidget>& aWidget, void* aContext)
: RenderCompositor(aWidget), mContext(aContext) {
MOZ_ASSERT(mContext);
}

Просмотреть файл

@ -17,9 +17,9 @@ namespace wr {
class RenderCompositorSWGL : public RenderCompositor {
public:
static UniquePtr<RenderCompositor> Create(
RefPtr<widget::CompositorWidget>&& aWidget, nsACString& aError);
const RefPtr<widget::CompositorWidget>& aWidget, nsACString& aError);
RenderCompositorSWGL(RefPtr<widget::CompositorWidget>&& aWidget,
RenderCompositorSWGL(const RefPtr<widget::CompositorWidget>& aWidget,
void* aContext);
virtual ~RenderCompositorSWGL();

Просмотреть файл

@ -55,8 +55,7 @@ static already_AddRefed<gl::GLContext> CreateGLContext(nsACString& aError);
MOZ_DEFINE_MALLOC_SIZE_OF(WebRenderRendererMallocSizeOf)
namespace mozilla {
namespace wr {
namespace mozilla::wr {
static StaticRefPtr<RenderThread> sRenderThread;
@ -384,7 +383,7 @@ void RenderThread::SetClearColor(wr::WindowId aWindowId, wr::ColorF aColor) {
}
}
void RenderThread::SetProfilerUI(wr::WindowId aWindowId, nsCString aUI) {
void RenderThread::SetProfilerUI(wr::WindowId aWindowId, const nsCString& aUI) {
if (mHasShutdown) {
return;
}
@ -417,7 +416,7 @@ void RenderThread::RunEvent(wr::WindowId aWindowId,
}
static void NotifyDidRender(layers::CompositorBridgeParent* aBridge,
RefPtr<const WebRenderPipelineInfo> aInfo,
const RefPtr<const WebRenderPipelineInfo>& aInfo,
VsyncId aCompositeStartId,
TimeStamp aCompositeStart, TimeStamp aRenderStart,
TimeStamp aEnd, bool aRender,
@ -904,7 +903,7 @@ bool RenderThread::IsHandlingWebRenderError() {
gl::GLContext* RenderThread::SingletonGL() {
nsAutoCString err;
auto gl = SingletonGL(err);
auto* gl = SingletonGL(err);
if (!err.IsEmpty()) {
gfxCriticalNote << err.get();
}
@ -1064,8 +1063,7 @@ WebRenderProgramCache::~WebRenderProgramCache() {
wr_program_cache_delete(mProgramCache);
}
} // namespace wr
} // namespace mozilla
} // namespace mozilla::wr
#ifdef XP_WIN
static already_AddRefed<gl::GLContext> CreateGLContextANGLE(
@ -1222,8 +1220,9 @@ void wr_schedule_render(mozilla::wr::WrWindowId aWindowId) {
"NotifyScheduleRender", &NotifyScheduleRender, aWindowId));
}
static void NotifyDidSceneBuild(mozilla::wr::WrWindowId aWindowId,
RefPtr<const wr::WebRenderPipelineInfo> aInfo) {
static void NotifyDidSceneBuild(
mozilla::wr::WrWindowId aWindowId,
const RefPtr<const wr::WebRenderPipelineInfo>& aInfo) {
RefPtr<mozilla::layers::CompositorBridgeParent> cbp = mozilla::layers::
CompositorBridgeParent::GetCompositorBridgeParentFromWindowId(aWindowId);
if (cbp) {
@ -1232,9 +1231,9 @@ static void NotifyDidSceneBuild(mozilla::wr::WrWindowId aWindowId,
}
void wr_finished_scene_build(mozilla::wr::WrWindowId aWindowId,
mozilla::wr::WrPipelineInfo* aInfo) {
mozilla::wr::WrPipelineInfo* aPipelineInfo) {
RefPtr<wr::WebRenderPipelineInfo> info = new wr::WebRenderPipelineInfo();
info->Raw() = std::move(*aInfo);
info->Raw() = std::move(*aPipelineInfo);
layers::CompositorThread()->Dispatch(NewRunnableFunction(
"NotifyDidSceneBuild", &NotifyDidSceneBuild, aWindowId, info));
}

Просмотреть файл

@ -178,14 +178,14 @@ class RenderThread final {
void SetClearColor(wr::WindowId aWindowId, wr::ColorF aColor);
/// Automatically forwarded to the render thread.
void SetProfilerUI(wr::WindowId aWindowId, nsCString aUI);
void SetProfilerUI(wr::WindowId aWindowId, const nsCString& aUI);
/// Automatically forwarded to the render thread.
void PipelineSizeChanged(wr::WindowId aWindowId, uint64_t aPipelineId,
float aWidth, float aHeight);
/// Automatically forwarded to the render thread.
void RunEvent(wr::WindowId aWindowId, UniquePtr<RendererEvent> aCallBack);
void RunEvent(wr::WindowId aWindowId, UniquePtr<RendererEvent> aEvent);
/// Can only be called from the render thread.
void UpdateAndRender(wr::WindowId aWindowId, const VsyncId& aStartId,