Bug 1523969 part 8 - Move method definition inline comments to new line in 'gfx/'. r=kats

Differential Revision: https://phabricator.services.mozilla.com/D21108

--HG--
extra : rebase_source : 48a4586f507891f3a2f0f970e9b9a0b15f0f3d61
This commit is contained in:
Ryan Hunt 2019-02-25 16:07:19 -06:00
Родитель f11762a961
Коммит 85ff4bdc33
126 изменённых файлов: 1002 добавлений и 719 удалений

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

@ -438,8 +438,8 @@ static already_AddRefed<DataSourceSurface> GetDataSurfaceInRect(
return target.forget();
}
/* static */ already_AddRefed<FilterNode> FilterNodeSoftware::Create(
FilterType aType) {
/* static */
already_AddRefed<FilterNode> FilterNodeSoftware::Create(FilterType aType) {
RefPtr<FilterNodeSoftware> filter;
switch (aType) {
case FilterType::BLEND:

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

@ -388,13 +388,15 @@ size_t MacIOSurface::GetPlaneCount() {
return MacIOSurfaceLib::IOSurfaceGetPlaneCount(mIOSurfacePtr);
}
/*static*/ size_t MacIOSurface::GetMaxWidth() {
/*static*/
size_t MacIOSurface::GetMaxWidth() {
if (!MacIOSurfaceLib::isInit()) return -1;
return MacIOSurfaceLib::IOSurfaceGetPropertyMaximum(
MacIOSurfaceLib::kPropWidth);
}
/*static*/ size_t MacIOSurface::GetMaxHeight() {
/*static*/
size_t MacIOSurface::GetMaxHeight() {
if (!MacIOSurfaceLib::isInit()) return -1;
return MacIOSurfaceLib::IOSurfaceGetPropertyMaximum(
MacIOSurfaceLib::kPropHeight);

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

@ -19,94 +19,102 @@ static UniquePtr<gfxConfig> sConfig;
return sConfig->GetState(aFeature);
}
/* static */ bool gfxConfig::IsEnabled(Feature aFeature) {
/* static */
bool gfxConfig::IsEnabled(Feature aFeature) {
const FeatureState& state = sConfig->GetState(aFeature);
return state.IsEnabled();
}
/* static */ bool gfxConfig::IsDisabledByDefault(Feature aFeature) {
/* static */
bool gfxConfig::IsDisabledByDefault(Feature aFeature) {
const FeatureState& state = sConfig->GetState(aFeature);
return state.DisabledByDefault();
}
/* static */ bool gfxConfig::IsForcedOnByUser(Feature aFeature) {
/* static */
bool gfxConfig::IsForcedOnByUser(Feature aFeature) {
const FeatureState& state = sConfig->GetState(aFeature);
return state.IsForcedOnByUser();
}
/* static */ FeatureStatus gfxConfig::GetValue(Feature aFeature) {
/* static */
FeatureStatus gfxConfig::GetValue(Feature aFeature) {
const FeatureState& state = sConfig->GetState(aFeature);
return state.GetValue();
}
/* static */ bool gfxConfig::SetDefault(Feature aFeature, bool aEnable,
FeatureStatus aDisableStatus,
const char* aDisableMessage) {
/* static */
bool gfxConfig::SetDefault(Feature aFeature, bool aEnable,
FeatureStatus aDisableStatus,
const char* aDisableMessage) {
FeatureState& state = sConfig->GetState(aFeature);
return state.SetDefault(aEnable, aDisableStatus, aDisableMessage);
}
/* static */ void gfxConfig::DisableByDefault(Feature aFeature,
FeatureStatus aDisableStatus,
const char* aDisableMessage,
const nsACString& aFailureId) {
/* static */
void gfxConfig::DisableByDefault(Feature aFeature, FeatureStatus aDisableStatus,
const char* aDisableMessage,
const nsACString& aFailureId) {
FeatureState& state = sConfig->GetState(aFeature);
state.DisableByDefault(aDisableStatus, aDisableMessage, aFailureId);
}
/* static */ void gfxConfig::EnableByDefault(Feature aFeature) {
/* static */
void gfxConfig::EnableByDefault(Feature aFeature) {
FeatureState& state = sConfig->GetState(aFeature);
state.EnableByDefault();
}
/* static */ void gfxConfig::SetDefaultFromPref(Feature aFeature,
const char* aPrefName,
bool aIsEnablePref,
bool aDefaultValue) {
/* static */
void gfxConfig::SetDefaultFromPref(Feature aFeature, const char* aPrefName,
bool aIsEnablePref, bool aDefaultValue) {
FeatureState& state = sConfig->GetState(aFeature);
return state.SetDefaultFromPref(aPrefName, aIsEnablePref, aDefaultValue);
}
/* static */ bool gfxConfig::InitOrUpdate(Feature aFeature, bool aEnable,
FeatureStatus aDisableStatus,
const char* aDisableMessage) {
/* static */
bool gfxConfig::InitOrUpdate(Feature aFeature, bool aEnable,
FeatureStatus aDisableStatus,
const char* aDisableMessage) {
FeatureState& state = sConfig->GetState(aFeature);
return state.InitOrUpdate(aEnable, aDisableStatus, aDisableMessage);
}
/* static */ void gfxConfig::SetFailed(Feature aFeature, FeatureStatus aStatus,
const char* aMessage,
const nsACString& aFailureId) {
/* static */
void gfxConfig::SetFailed(Feature aFeature, FeatureStatus aStatus,
const char* aMessage, const nsACString& aFailureId) {
FeatureState& state = sConfig->GetState(aFeature);
state.SetFailed(aStatus, aMessage, aFailureId);
}
/* static */ void gfxConfig::Disable(Feature aFeature, FeatureStatus aStatus,
const char* aMessage,
const nsACString& aFailureId) {
/* static */
void gfxConfig::Disable(Feature aFeature, FeatureStatus aStatus,
const char* aMessage, const nsACString& aFailureId) {
FeatureState& state = sConfig->GetState(aFeature);
state.Disable(aStatus, aMessage, aFailureId);
}
/* static */ void gfxConfig::UserEnable(Feature aFeature,
const char* aMessage) {
/* static */
void gfxConfig::UserEnable(Feature aFeature, const char* aMessage) {
FeatureState& state = sConfig->GetState(aFeature);
state.UserEnable(aMessage);
}
/* static */ void gfxConfig::UserForceEnable(Feature aFeature,
const char* aMessage) {
/* static */
void gfxConfig::UserForceEnable(Feature aFeature, const char* aMessage) {
FeatureState& state = sConfig->GetState(aFeature);
state.UserForceEnable(aMessage);
}
/* static */ void gfxConfig::UserDisable(Feature aFeature, const char* aMessage,
const nsACString& aFailureId) {
/* static */
void gfxConfig::UserDisable(Feature aFeature, const char* aMessage,
const nsACString& aFailureId) {
FeatureState& state = sConfig->GetState(aFeature);
state.UserDisable(aMessage, aFailureId);
}
/* static */ void gfxConfig::Reenable(Feature aFeature, Fallback aFallback) {
/* static */
void gfxConfig::Reenable(Feature aFeature, Fallback aFallback) {
FeatureState& state = sConfig->GetState(aFeature);
MOZ_ASSERT(IsFeatureStatusFailure(state.GetValue()));
@ -115,12 +123,14 @@ static UniquePtr<gfxConfig> sConfig;
state.SetRuntime(FeatureStatus::Available, nullptr);
}
/* static */ void gfxConfig::Reset(Feature aFeature) {
/* static */
void gfxConfig::Reset(Feature aFeature) {
FeatureState& state = sConfig->GetState(aFeature);
state.Reset();
}
/* static */ void gfxConfig::Inherit(Feature aFeature, FeatureStatus aStatus) {
/* static */
void gfxConfig::Inherit(Feature aFeature, FeatureStatus aStatus) {
FeatureState& state = sConfig->GetState(aFeature);
state.Reset();
@ -142,12 +152,13 @@ static UniquePtr<gfxConfig> sConfig;
}
}
/* static */ bool gfxConfig::UseFallback(Fallback aFallback) {
/* static */
bool gfxConfig::UseFallback(Fallback aFallback) {
return sConfig->UseFallbackImpl(aFallback);
}
/* static */ void gfxConfig::EnableFallback(Fallback aFallback,
const char* aMessage) {
/* static */
void gfxConfig::EnableFallback(Fallback aFallback, const char* aMessage) {
if (!NS_IsMainThread()) {
nsCString message(aMessage);
NS_DispatchToMainThread(
@ -193,8 +204,8 @@ static const FeatureInfo sFeatureInfo[] = {
#undef FOR_EACH_FEATURE
{nullptr, nullptr}};
/* static */ void gfxConfig::ForEachFeature(
const FeatureIterCallback& aCallback) {
/* static */
void gfxConfig::ForEachFeature(const FeatureIterCallback& aCallback) {
for (size_t i = 0; i < kNumFeatures; i++) {
FeatureState& state = GetFeature(static_cast<Feature>(i));
if (!state.IsInitialized()) {
@ -211,8 +222,8 @@ static const char* sFallbackNames[] = {
#undef FOR_EACH_FALLBACK
nullptr};
/* static */ void gfxConfig::ForEachFallback(
const FallbackIterCallback& aCallback) {
/* static */
void gfxConfig::ForEachFallback(const FallbackIterCallback& aCallback) {
sConfig->ForEachFallbackImpl(aCallback);
}
@ -228,8 +239,8 @@ void gfxConfig::ForEachFallbackImpl(const FallbackIterCallback& aCallback) {
return state.GetFailureId();
}
/* static */ void gfxConfig::ImportChange(Feature aFeature,
const FeatureChange& aChange) {
/* static */
void gfxConfig::ImportChange(Feature aFeature, const FeatureChange& aChange) {
if (aChange.type() == FeatureChange::Tnull_t) {
return;
}
@ -239,11 +250,11 @@ void gfxConfig::ForEachFallbackImpl(const FallbackIterCallback& aCallback) {
failure.failureId());
}
/* static */ void gfxConfig::Init() {
sConfig = mozilla::MakeUnique<gfxConfig>();
}
/* static */
void gfxConfig::Init() { sConfig = mozilla::MakeUnique<gfxConfig>(); }
/* static */ void gfxConfig::Shutdown() { sConfig = nullptr; }
/* static */
void gfxConfig::Shutdown() { sConfig = nullptr; }
} // namespace gfx
} // namespace mozilla

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

@ -73,7 +73,8 @@ void gfxVars::Shutdown() {
gGfxVarInitUpdates = nullptr;
}
/* static */ void gfxVars::ApplyUpdate(const GfxVarUpdate& aUpdate) {
/* static */
void gfxVars::ApplyUpdate(const GfxVarUpdate& aUpdate) {
// Only subprocesses receive updates and apply them locally.
MOZ_ASSERT(!XRE_IsParentProcess());
MOZ_DIAGNOSTIC_ASSERT(sVarList || gGfxVarInitUpdates);
@ -86,7 +87,8 @@ void gfxVars::Shutdown() {
}
}
/* static */ void gfxVars::AddReceiver(gfxVarReceiver* aReceiver) {
/* static */
void gfxVars::AddReceiver(gfxVarReceiver* aReceiver) {
MOZ_ASSERT(NS_IsMainThread());
// Don't double-add receivers, in case a broken content process sends two
@ -96,7 +98,8 @@ void gfxVars::Shutdown() {
}
}
/* static */ void gfxVars::RemoveReceiver(gfxVarReceiver* aReceiver) {
/* static */
void gfxVars::RemoveReceiver(gfxVarReceiver* aReceiver) {
MOZ_ASSERT(NS_IsMainThread());
if (sInstance) {
@ -104,7 +107,8 @@ void gfxVars::Shutdown() {
}
}
/* static */ nsTArray<GfxVarUpdate> gfxVars::FetchNonDefaultVars() {
/* static */
nsTArray<GfxVarUpdate> gfxVars::FetchNonDefaultVars() {
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(sVarList);

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

@ -33,7 +33,8 @@ EGLImage CreateEGLImage(GLContext* gl, GLuint tex) {
////////////////////////////////////////////////////////////////////////
// EGLImageWrapper
/*static*/ EGLImageWrapper* EGLImageWrapper::Create(GLContext* gl, GLuint tex) {
/*static*/
EGLImageWrapper* EGLImageWrapper::Create(GLContext* gl, GLuint tex) {
MOZ_ASSERT(DoesEGLContextSupportSharingWithEGLImage(gl));
auto* egl = gl::GLLibraryEGL::Get();

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

@ -223,8 +223,8 @@ static bool ParseVersion(const std::string& versionStr,
return true;
}
/*static*/ uint8_t GLContext::ChooseDebugFlags(
const CreateContextFlags createFlags) {
/*static*/
uint8_t GLContext::ChooseDebugFlags(const CreateContextFlags createFlags) {
uint8_t debugFlags = 0;
#ifdef MOZ_GL_DEBUG
@ -294,11 +294,11 @@ GLContext::~GLContext() {
#endif
}
/*static*/ void GLContext::StaticDebugCallback(GLenum source, GLenum type,
GLuint id, GLenum severity,
GLsizei length,
const GLchar* message,
const GLvoid* userParam) {
/*static*/
void GLContext::StaticDebugCallback(GLenum source, GLenum type, GLuint id,
GLenum severity, GLsizei length,
const GLchar* message,
const GLvoid* userParam) {
GLContext* gl = (GLContext*)userParam;
gl->DebugCallback(source, type, id, severity, length, message);
}
@ -1931,8 +1931,8 @@ void GLContext::MarkDestroyed() {
// -
#ifdef MOZ_GL_DEBUG
/* static */ void GLContext::AssertNotPassingStackBufferToTheGL(
const void* ptr) {
/* static */
void GLContext::AssertNotPassingStackBufferToTheGL(const void* ptr) {
int somethingOnTheStack;
const void* someStackPtr = &somethingOnTheStack;
const int page_bits = 12;
@ -2198,9 +2198,8 @@ void GLContext::FlushIfHeavyGLCallsSinceLastFlush() {
}
}
/*static*/ bool GLContext::ShouldDumpExts() {
return gfxEnv::GlDumpExtensions();
}
/*static*/
bool GLContext::ShouldDumpExts() { return gfxEnv::GlDumpExtensions(); }
bool DoesStringMatch(const char* aString, const char* aWantedString) {
if (!aString || !aWantedString) return false;
@ -2220,7 +2219,8 @@ bool DoesStringMatch(const char* aString, const char* aWantedString) {
return true;
}
/*static*/ bool GLContext::ShouldSpew() { return gfxEnv::GlSpew(); }
/*static*/
bool GLContext::ShouldSpew() { return gfxEnv::GlSpew(); }
void SplitByChar(const nsACString& str, const char delim,
std::vector<nsCString>* const out) {
@ -2888,8 +2888,8 @@ void GLContext::AfterGLCall_Debug(const char* const funcName) const {
}
}
/*static*/ void GLContext::OnImplicitMakeCurrentFailure(
const char* const funcName) {
/*static*/
void GLContext::OnImplicitMakeCurrentFailure(const char* const funcName) {
gfxCriticalError() << "Ignoring call to " << funcName << " with failed"
<< " mImplicitMakeCurrent.";
}

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

@ -297,7 +297,8 @@ already_AddRefed<GLContext> GLContextEGLFactory::Create(
}
#if defined(MOZ_WAYLAND)
/* static */ EGLSurface GLContextEGL::CreateEGLSurfaceForCompositorWidget(
/* static */
EGLSurface GLContextEGL::CreateEGLSurfaceForCompositorWidget(
widget::CompositorWidget* aCompositorWidget, bool aForceAccelerated) {
nsCString discardFailureId;
if (!GLLibraryEGL::EnsureInitialized(false, &discardFailureId)) {
@ -898,8 +899,9 @@ EGLSurface GLContextEGL::CreateCompatibleSurface(void* aWindow) {
return GLContextProviderEGL::CreateEGLSurface(aWindow, mConfig);
}
/* static */ EGLSurface GLContextProviderEGL::CreateEGLSurface(
void* aWindow, EGLConfig aConfig) {
/* static */
EGLSurface GLContextProviderEGL::CreateEGLSurface(void* aWindow,
EGLConfig aConfig) {
// NOTE: aWindow is an ANativeWindow
nsCString discardFailureId;
if (!GLLibraryEGL::EnsureInitialized(false, &discardFailureId)) {
@ -922,7 +924,8 @@ EGLSurface GLContextEGL::CreateCompatibleSurface(void* aWindow) {
return surface;
}
/* static */ void GLContextProviderEGL::DestroyEGLSurface(EGLSurface surface) {
/* static */
void GLContextProviderEGL::DestroyEGLSurface(EGLSurface surface) {
nsCString discardFailureId;
if (!GLLibraryEGL::EnsureInitialized(false, &discardFailureId)) {
MOZ_CRASH("GFX: Failed to load EGL library 5!");
@ -1039,8 +1042,8 @@ static EGLConfig ChooseConfig(GLLibraryEGL* egl, CreateContextFlags flags,
return config;
}
/*static*/ already_AddRefed<GLContextEGL>
GLContextEGL::CreateEGLPBufferOffscreenContext(
/*static*/
already_AddRefed<GLContextEGL> GLContextEGL::CreateEGLPBufferOffscreenContext(
CreateContextFlags flags, const mozilla::gfx::IntSize& size,
const SurfaceCaps& minCaps, nsACString* const out_failureId) {
bool forceEnableHardware =
@ -1093,7 +1096,8 @@ GLContextEGL::CreateEGLPBufferOffscreenContext(
return gl.forget();
}
/*static*/ already_AddRefed<GLContext> GLContextProviderEGL::CreateHeadless(
/*static*/
already_AddRefed<GLContext> GLContextProviderEGL::CreateHeadless(
CreateContextFlags flags, nsACString* const out_failureId) {
mozilla::gfx::IntSize dummySize = mozilla::gfx::IntSize(16, 16);
SurfaceCaps dummyCaps = SurfaceCaps::Any();
@ -1103,7 +1107,8 @@ GLContextEGL::CreateEGLPBufferOffscreenContext(
// Under EGL, on Android, pbuffers are supported fine, though
// often without the ability to texture from them directly.
/*static*/ already_AddRefed<GLContext> GLContextProviderEGL::CreateOffscreen(
/*static*/
already_AddRefed<GLContext> GLContextProviderEGL::CreateOffscreen(
const mozilla::gfx::IntSize& size, const SurfaceCaps& minCaps,
CreateContextFlags flags, nsACString* const out_failureId) {
bool forceEnableHardware =
@ -1170,11 +1175,11 @@ GLContextEGL::CreateEGLPBufferOffscreenContext(
// fail on many Tegra drivers (bug 759225) and 2) some mobile devices have a
// very strict limit on global number of GL contexts (bug 754257) and 3) each
// EGL context eats 750k on B2G (bug 813783)
/*static*/ GLContext* GLContextProviderEGL::GetGlobalContext() {
return nullptr;
}
/*static*/
GLContext* GLContextProviderEGL::GetGlobalContext() { return nullptr; }
/*static*/ void GLContextProviderEGL::Shutdown() {
/*static*/
void GLContextProviderEGL::Shutdown() {
const RefPtr<GLLibraryEGL> egl = GLLibraryEGL::Get();
if (egl) {
egl->Shutdown();

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

@ -1024,7 +1024,8 @@ static already_AddRefed<GLContextGLX> CreateOffscreenPixmapContext(
config, true, surface);
}
/*static*/ already_AddRefed<GLContext> GLContextProviderGLX::CreateHeadless(
/*static*/
already_AddRefed<GLContext> GLContextProviderGLX::CreateHeadless(
CreateContextFlags flags, nsACString* const out_failureId) {
IntSize dummySize = IntSize(16, 16);
SurfaceCaps dummyCaps = SurfaceCaps::Any();
@ -1032,7 +1033,8 @@ static already_AddRefed<GLContextGLX> CreateOffscreenPixmapContext(
out_failureId);
}
/*static*/ already_AddRefed<GLContext> GLContextProviderGLX::CreateOffscreen(
/*static*/
already_AddRefed<GLContext> GLContextProviderGLX::CreateOffscreen(
const IntSize& size, const SurfaceCaps& minCaps, CreateContextFlags flags,
nsACString* const out_failureId) {
SurfaceCaps minBackbufferCaps = minCaps;
@ -1055,12 +1057,14 @@ static already_AddRefed<GLContextGLX> CreateOffscreenPixmapContext(
return gl.forget();
}
/*static*/ GLContext* GLContextProviderGLX::GetGlobalContext() {
/*static*/
GLContext* GLContextProviderGLX::GetGlobalContext() {
// Context sharing not supported.
return nullptr;
}
/*static*/ void GLContextProviderGLX::Shutdown() {}
/*static*/
void GLContextProviderGLX::Shutdown() {}
} /* namespace gl */
} /* namespace mozilla */

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

@ -467,7 +467,8 @@ already_AddRefed<GLContext> GLContextProviderWGL::CreateForWindow(
.forget();
}
/*static*/ already_AddRefed<GLContext> GLContextProviderWGL::CreateHeadless(
/*static*/
already_AddRefed<GLContext> GLContextProviderWGL::CreateHeadless(
const CreateContextFlags flags, nsACString* const out_failureId) {
auto& wgl = sWGLLib;
if (!wgl.EnsureInitialized()) return nullptr;
@ -523,7 +524,8 @@ already_AddRefed<GLContext> GLContextProviderWGL::CreateForWindow(
return RefPtr<GLContext>(gl.get()).forget();
}
/*static*/ already_AddRefed<GLContext> GLContextProviderWGL::CreateOffscreen(
/*static*/
already_AddRefed<GLContext> GLContextProviderWGL::CreateOffscreen(
const IntSize& size, const SurfaceCaps& minCaps, CreateContextFlags flags,
nsACString* const out_failureId) {
*out_failureId = NS_LITERAL_CSTRING("FEATURE_FAILURE_WGL_INIT");
@ -536,11 +538,11 @@ already_AddRefed<GLContext> GLContextProviderWGL::CreateForWindow(
return gl.forget();
}
/*static*/ GLContext* GLContextProviderWGL::GetGlobalContext() {
return nullptr;
}
/*static*/
GLContext* GLContextProviderWGL::GetGlobalContext() { return nullptr; }
/*static*/ void GLContextProviderWGL::Shutdown() {}
/*static*/
void GLContextProviderWGL::Shutdown() {}
} /* namespace gl */
} /* namespace mozilla */

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

@ -50,7 +50,8 @@ already_AddRefed<GLContext> GLContextProviderWayland::CreateForWindow(
}
}
/*static*/ already_AddRefed<GLContext> GLContextProviderWayland::CreateHeadless(
/*static*/
already_AddRefed<GLContext> GLContextProviderWayland::CreateHeadless(
CreateContextFlags flags, nsACString* const out_failureId) {
if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
return sGLContextProviderGLX.CreateHeadless(flags, out_failureId);
@ -59,11 +60,10 @@ already_AddRefed<GLContext> GLContextProviderWayland::CreateForWindow(
}
}
/*static*/ already_AddRefed<GLContext>
GLContextProviderWayland::CreateOffscreen(const IntSize& size,
const SurfaceCaps& minCaps,
CreateContextFlags flags,
nsACString* const out_failureId) {
/*static*/
already_AddRefed<GLContext> GLContextProviderWayland::CreateOffscreen(
const IntSize& size, const SurfaceCaps& minCaps, CreateContextFlags flags,
nsACString* const out_failureId) {
if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
return sGLContextProviderGLX.CreateOffscreen(size, minCaps, flags,
out_failureId);
@ -73,7 +73,8 @@ GLContextProviderWayland::CreateOffscreen(const IntSize& size,
}
}
/*static*/ GLContext* GLContextProviderWayland::GetGlobalContext() {
/*static*/
GLContext* GLContextProviderWayland::GetGlobalContext() {
if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
return sGLContextProviderGLX.GetGlobalContext();
} else {
@ -81,7 +82,8 @@ GLContextProviderWayland::CreateOffscreen(const IntSize& size,
}
}
/*static*/ void GLContextProviderWayland::Shutdown() {
/*static*/
void GLContextProviderWayland::Shutdown() {
if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
sGLContextProviderGLX.Shutdown();
} else {

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

@ -376,8 +376,9 @@ Maybe<SymbolLoader> GLLibraryEGL::GetSymbolLoader() const {
// -
/* static */ bool GLLibraryEGL::EnsureInitialized(
bool forceAccel, nsACString* const out_failureId) {
/* static */
bool GLLibraryEGL::EnsureInitialized(bool forceAccel,
nsACString* const out_failureId) {
if (!sEGLLibrary) {
sEGLLibrary = new GLLibraryEGL();
}

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

@ -59,7 +59,8 @@ UniquePtr<GLScreenBuffer> GLScreenBuffer::Create(GLContext* gl,
return ret;
}
/* static */ UniquePtr<SurfaceFactory> GLScreenBuffer::CreateFactory(
/* static */
UniquePtr<SurfaceFactory> GLScreenBuffer::CreateFactory(
GLContext* gl, const SurfaceCaps& caps,
KnowsCompositor* compositorConnection, const layers::TextureFlags& flags) {
LayersIPCChannel* ipcChannel = compositorConnection->GetTextureForwarder();

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

@ -51,8 +51,8 @@ std::string FormatBytes(size_t amount) {
return stream.str();
}
/* static */ void GfxTexturesReporter::UpdateAmount(MemoryUse action,
size_t amount) {
/* static */
void GfxTexturesReporter::UpdateAmount(MemoryUse action, size_t amount) {
if (action == MemoryFreed) {
MOZ_RELEASE_ASSERT(
amount <= sAmount,

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

@ -22,8 +22,9 @@
namespace mozilla {
namespace gl {
/*static*/ void SharedSurface::ProdCopy(SharedSurface* src, SharedSurface* dest,
SurfaceFactory* factory) {
/*static*/
void SharedSurface::ProdCopy(SharedSurface* src, SharedSurface* dest,
SurfaceFactory* factory) {
GLContext* gl = src->mGL;
// If `src` begins locked, it must end locked, though we may
@ -334,8 +335,9 @@ void SurfaceFactory::StopRecycling(layers::SharedSurfaceTextureClient* tc) {
mozilla::Unused << didErase;
}
/*static*/ void SurfaceFactory::RecycleCallback(layers::TextureClient* rawTC,
void* rawFactory) {
/*static*/
void SurfaceFactory::RecycleCallback(layers::TextureClient* rawTC,
void* rawFactory) {
RefPtr<layers::SharedSurfaceTextureClient> tc;
tc = static_cast<layers::SharedSurfaceTextureClient*>(rawTC);
SurfaceFactory* factory = static_cast<SurfaceFactory*>(rawFactory);

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

@ -37,7 +37,8 @@ static EGLSurface CreatePBufferSurface(GLLibraryEGL* egl, EGLDisplay display,
return surface;
}
/*static*/ UniquePtr<SharedSurface_ANGLEShareHandle>
/*static*/
UniquePtr<SharedSurface_ANGLEShareHandle>
SharedSurface_ANGLEShareHandle::Create(GLContext* gl, EGLConfig config,
const gfx::IntSize& size,
bool hasAlpha) {
@ -299,7 +300,8 @@ bool SharedSurface_ANGLEShareHandle::ReadbackBySharedHandle(
////////////////////////////////////////////////////////////////////////////////
// Factory
/*static*/ UniquePtr<SurfaceFactory_ANGLEShareHandle>
/*static*/
UniquePtr<SurfaceFactory_ANGLEShareHandle>
SurfaceFactory_ANGLEShareHandle::Create(
GLContext* gl, const SurfaceCaps& caps,
const RefPtr<layers::LayersIPCChannel>& allocator,

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

@ -307,9 +307,10 @@ class DXInterop2Device : public RefCounted<DXInterop2Device> {
////////////////////////////////////////////////////////////////////////////////
// Shared Surface
/*static*/ UniquePtr<SharedSurface_D3D11Interop>
SharedSurface_D3D11Interop::Create(DXInterop2Device* interop, GLContext* gl,
const gfx::IntSize& size, bool hasAlpha) {
/*static*/
UniquePtr<SharedSurface_D3D11Interop> SharedSurface_D3D11Interop::Create(
DXInterop2Device* interop, GLContext* gl, const gfx::IntSize& size,
bool hasAlpha) {
const auto& d3d = interop->mD3D;
// Create a texture in case we need to readback.
@ -473,10 +474,10 @@ bool SharedSurface_D3D11Interop::ToSurfaceDescriptor(
//////////////////////////////////////////////////////////////////////////////////////////
// Factory
/*static*/ UniquePtr<SurfaceFactory_D3D11Interop>
SurfaceFactory_D3D11Interop::Create(GLContext* gl, const SurfaceCaps& caps,
layers::LayersIPCChannel* allocator,
const layers::TextureFlags& flags) {
/*static*/
UniquePtr<SurfaceFactory_D3D11Interop> SurfaceFactory_D3D11Interop::Create(
GLContext* gl, const SurfaceCaps& caps, layers::LayersIPCChannel* allocator,
const layers::TextureFlags& flags) {
WGLLibrary* wgl = &sWGLLib;
if (!wgl || !wgl->HasDXInterop2()) return nullptr;

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

@ -16,7 +16,8 @@
namespace mozilla {
namespace gl {
/*static*/ UniquePtr<SharedSurface_EGLImage> SharedSurface_EGLImage::Create(
/*static*/
UniquePtr<SharedSurface_EGLImage> SharedSurface_EGLImage::Create(
GLContext* prodGL, const GLFormats& formats, const gfx::IntSize& size,
bool hasAlpha, EGLContext context) {
auto* egl = gl::GLLibraryEGL::Get();
@ -139,7 +140,8 @@ bool SharedSurface_EGLImage::ReadbackBySharedHandle(
////////////////////////////////////////////////////////////////////////
/*static*/ UniquePtr<SurfaceFactory_EGLImage> SurfaceFactory_EGLImage::Create(
/*static*/
UniquePtr<SurfaceFactory_EGLImage> SurfaceFactory_EGLImage::Create(
GLContext* prodGL, const SurfaceCaps& caps,
const RefPtr<layers::LayersIPCChannel>& allocator,
const layers::TextureFlags& flags) {
@ -160,11 +162,10 @@ bool SharedSurface_EGLImage::ReadbackBySharedHandle(
#ifdef MOZ_WIDGET_ANDROID
/*static*/ UniquePtr<SharedSurface_SurfaceTexture>
SharedSurface_SurfaceTexture::Create(GLContext* prodGL,
const GLFormats& formats,
const gfx::IntSize& size, bool hasAlpha,
java::GeckoSurface::Param surface) {
/*static*/
UniquePtr<SharedSurface_SurfaceTexture> SharedSurface_SurfaceTexture::Create(
GLContext* prodGL, const GLFormats& formats, const gfx::IntSize& size,
bool hasAlpha, java::GeckoSurface::Param surface) {
MOZ_ASSERT(surface);
UniquePtr<SharedSurface_SurfaceTexture> ret;
@ -241,8 +242,8 @@ bool SharedSurface_SurfaceTexture::ToSurfaceDescriptor(
////////////////////////////////////////////////////////////////////////
/*static*/ UniquePtr<SurfaceFactory_SurfaceTexture>
SurfaceFactory_SurfaceTexture::Create(
/*static*/
UniquePtr<SurfaceFactory_SurfaceTexture> SurfaceFactory_SurfaceTexture::Create(
GLContext* prodGL, const SurfaceCaps& caps,
const RefPtr<layers::LayersIPCChannel>& allocator,
const layers::TextureFlags& flags) {

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

@ -17,7 +17,8 @@ namespace gl {
using gfx::IntSize;
using gfx::SurfaceFormat;
/*static*/ UniquePtr<SharedSurface_Basic> SharedSurface_Basic::Create(
/*static*/
UniquePtr<SharedSurface_Basic> SharedSurface_Basic::Create(
GLContext* gl, const GLFormats& formats, const IntSize& size,
bool hasAlpha) {
UniquePtr<SharedSurface_Basic> ret;
@ -38,8 +39,11 @@ using gfx::SurfaceFormat;
return ret;
}
/*static*/ UniquePtr<SharedSurface_Basic> SharedSurface_Basic::Wrap(
GLContext* gl, const IntSize& size, bool hasAlpha, GLuint tex) {
/*static*/
UniquePtr<SharedSurface_Basic> SharedSurface_Basic::Wrap(GLContext* gl,
const IntSize& size,
bool hasAlpha,
GLuint tex) {
bool ownsTex = false;
UniquePtr<SharedSurface_Basic> ret(
new SharedSurface_Basic(gl, size, hasAlpha, tex, ownsTex));
@ -83,7 +87,8 @@ SurfaceFactory_Basic::SurfaceFactory_Basic(GLContext* gl,
////////////////////////////////////////////////////////////////////////
// SharedSurface_GLTexture
/*static*/ UniquePtr<SharedSurface_GLTexture> SharedSurface_GLTexture::Create(
/*static*/
UniquePtr<SharedSurface_GLTexture> SharedSurface_GLTexture::Create(
GLContext* prodGL, const GLFormats& formats, const IntSize& size,
bool hasAlpha) {
MOZ_ASSERT(prodGL);

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

@ -14,7 +14,8 @@
namespace mozilla {
namespace gl {
/*static*/ UniquePtr<SharedSurface_IOSurface> SharedSurface_IOSurface::Create(
/*static*/
UniquePtr<SharedSurface_IOSurface> SharedSurface_IOSurface::Create(
const RefPtr<MacIOSurface>& ioSurf, GLContext* gl, bool hasAlpha) {
MOZ_ASSERT(ioSurf);
MOZ_ASSERT(gl);
@ -187,7 +188,8 @@ bool SharedSurface_IOSurface::ReadbackBySharedHandle(
////////////////////////////////////////////////////////////////////////
// SurfaceFactory_IOSurface
/*static*/ UniquePtr<SurfaceFactory_IOSurface> SurfaceFactory_IOSurface::Create(
/*static*/
UniquePtr<SurfaceFactory_IOSurface> SurfaceFactory_IOSurface::Create(
GLContext* gl, const SurfaceCaps& caps,
const RefPtr<layers::LayersIPCChannel>& allocator,
const layers::TextureFlags& flags) {

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

@ -39,10 +39,10 @@ using namespace mozilla::ipc;
/// The minimum scale we allow tabs to be rasterized at.
static const float kMinPaintScale = 0.05f;
/* static */ PaintFragment PaintFragment::Record(nsIDocShell* aDocShell,
const IntRect& aRect,
float aScale,
nscolor aBackgroundColor) {
/* static */
PaintFragment PaintFragment::Record(nsIDocShell* aDocShell,
const IntRect& aRect, float aScale,
nscolor aBackgroundColor) {
IntSize surfaceSize = aRect.Size();
surfaceSize.width *= aScale;
surfaceSize.height *= aScale;
@ -126,11 +126,10 @@ PaintFragment::PaintFragment(IntSize aSize, ByteBuf&& aRecording,
mRecording(std::move(aRecording)),
mDependencies(std::move(aDependencies)) {}
/* static */ void CrossProcessPaint::StartLocal(nsIDocShell* aRoot,
const IntRect& aRect,
float aScale,
nscolor aBackgroundColor,
dom::Promise* aPromise) {
/* static */
void CrossProcessPaint::StartLocal(nsIDocShell* aRoot, const IntRect& aRect,
float aScale, nscolor aBackgroundColor,
dom::Promise* aPromise) {
MOZ_RELEASE_ASSERT(XRE_IsParentProcess());
aScale = std::max(aScale, kMinPaintScale);
@ -151,11 +150,10 @@ PaintFragment::PaintFragment(IntSize aSize, ByteBuf&& aRecording,
PaintFragment::Record(aRoot, aRect, aScale, aBackgroundColor));
}
/* static */ void CrossProcessPaint::StartRemote(dom::TabId aRoot,
const IntRect& aRect,
float aScale,
nscolor aBackgroundColor,
dom::Promise* aPromise) {
/* static */
void CrossProcessPaint::StartRemote(dom::TabId aRoot, const IntRect& aRect,
float aScale, nscolor aBackgroundColor,
dom::Promise* aPromise) {
MOZ_RELEASE_ASSERT(XRE_IsParentProcess());
aScale = std::max(aScale, kMinPaintScale);

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

@ -326,7 +326,8 @@ class DeferredDeleteGPUChild : public Runnable {
UniquePtr<GPUChild> mChild;
};
/* static */ void GPUChild::Destroy(UniquePtr<GPUChild>&& aChild) {
/* static */
void GPUChild::Destroy(UniquePtr<GPUChild>&& aChild) {
NS_DispatchToMainThread(new DeferredDeleteGPUChild(std::move(aChild)));
}

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

@ -75,7 +75,8 @@ GPUParent::GPUParent() : mLaunchTime(TimeStamp::Now()) { sGPUParent = this; }
GPUParent::~GPUParent() { sGPUParent = nullptr; }
/* static */ GPUParent* GPUParent::GetSingleton() { return sGPUParent; }
/* static */
GPUParent* GPUParent::GetSingleton() { return sGPUParent; }
bool GPUParent::Init(base::ProcessId aParentPid, const char* aParentBuildID,
MessageLoop* aIOLoop, IPC::Channel* aChannel) {
@ -426,7 +427,8 @@ mozilla::ipc::IPCResult GPUParent::RecvNotifyGpuObservers(
return IPC_OK();
}
/* static */ void GPUParent::GetGPUProcessName(nsACString& aStr) {
/* static */
void GPUParent::GetGPUProcessName(nsACString& aStr) {
auto processType = XRE_GetProcessType();
unsigned pid = 0;
if (processType == GeckoProcessType_GPU) {

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

@ -23,8 +23,8 @@ InProcessCompositorSession::InProcessCompositorSession(
GPUProcessManager::Get()->RegisterInProcessSession(this);
}
/* static */ RefPtr<InProcessCompositorSession>
InProcessCompositorSession::Create(
/* static */
RefPtr<InProcessCompositorSession> InProcessCompositorSession::Create(
nsBaseWidget* aWidget, LayerManager* aLayerManager,
const LayersId& aRootLayerTreeId, CSSToLayoutDeviceScale aScale,
const CompositorOptions& aOptions, bool aUseExternalSurfaceSize,

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

@ -16,7 +16,8 @@ VsyncBridgeChild::VsyncBridgeChild(RefPtr<VsyncIOThreadHolder> aThread,
VsyncBridgeChild::~VsyncBridgeChild() {}
/* static */ RefPtr<VsyncBridgeChild> VsyncBridgeChild::Create(
/* static */
RefPtr<VsyncBridgeChild> VsyncBridgeChild::Create(
RefPtr<VsyncIOThreadHolder> aThread, const uint64_t& aProcessToken,
Endpoint<PVsyncBridgeChild>&& aEndpoint) {
RefPtr<VsyncBridgeChild> child = new VsyncBridgeChild(aThread, aProcessToken);

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

@ -136,7 +136,8 @@ bool AnimationInfo::HasTransformAnimation() const {
return false;
}
/* static */ Maybe<uint64_t> AnimationInfo::GetGenerationFromFrame(
/* static */
Maybe<uint64_t> AnimationInfo::GetGenerationFromFrame(
nsIFrame* aFrame, DisplayItemType aDisplayItemKey) {
MOZ_ASSERT(aFrame->IsPrimaryFrame() ||
nsLayoutUtils::IsFirstContinuationOrIBSplitSibling(aFrame));
@ -163,7 +164,8 @@ bool AnimationInfo::HasTransformAnimation() const {
return Nothing();
}
/* static */ void AnimationInfo::EnumerateGenerationOnFrame(
/* static */
void AnimationInfo::EnumerateGenerationOnFrame(
const nsIFrame* aFrame, const nsIContent* aContent,
const CompositorAnimatableDisplayItemTypes& aDisplayItemTypes,
const AnimationGenerationCallback& aCallback) {

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

@ -21,7 +21,8 @@ void FrameMetrics::RecalculateLayoutViewportOffset() {
mLayoutViewport);
}
/* static */ void FrameMetrics::KeepLayoutViewportEnclosingVisualViewport(
/* static */
void FrameMetrics::KeepLayoutViewportEnclosingVisualViewport(
const CSSRect& aVisualViewport, CSSRect& aLayoutViewport) {
// If the visual viewport is contained within the layout viewport, we don't
// need to make any adjustments, so we can exit early.

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

@ -35,9 +35,9 @@ IMFYCbCrImage::~IMFYCbCrImage() {
}
}
/* static */ bool IMFYCbCrImage::CopyDataToTexture(
const Data& aData, ID3D11Device* aDevice,
DXGIYCbCrTextureData* aTextureData) {
/* static */
bool IMFYCbCrImage::CopyDataToTexture(const Data& aData, ID3D11Device* aDevice,
DXGIYCbCrTextureData* aTextureData) {
MOZ_ASSERT(aTextureData);
HRESULT hr;

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

@ -739,12 +739,13 @@ UniquePtr<LayerPropertiesBase> CloneLayerTreePropertiesInternal(
return MakeUnique<LayerPropertiesBase>(aRoot);
}
/* static */ UniquePtr<LayerProperties> LayerProperties::CloneFrom(
Layer* aRoot) {
/* static */
UniquePtr<LayerProperties> LayerProperties::CloneFrom(Layer* aRoot) {
return CloneLayerTreePropertiesInternal(aRoot);
}
/* static */ void LayerProperties::ClearInvalidations(Layer* aLayer) {
/* static */
void LayerProperties::ClearInvalidations(Layer* aLayer) {
ForEachNode<ForwardIterator>(aLayer, [](Layer* layer) {
layer->ClearInvalidRegion();
if (layer->GetMaskLayer()) {

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

@ -142,7 +142,8 @@ bool LayerManager::AreComponentAlphaLayersEnabled() {
return gfxPrefs::ComponentAlphaEnabled();
}
/*static*/ void LayerManager::LayerUserDataDestroy(void* data) {
/*static*/
void LayerManager::LayerUserDataDestroy(void* data) {
delete static_cast<LayerUserData*>(data);
}
@ -671,7 +672,8 @@ void Layer::ComputeEffectiveTransformForMaskLayers(
}
}
/* static */ void Layer::ComputeEffectiveTransformForMaskLayer(
/* static */
void Layer::ComputeEffectiveTransformForMaskLayer(
Layer* aMaskLayer, const gfx::Matrix4x4& aTransformToSurface) {
aMaskLayer->mEffectiveTransform = aTransformToSurface;
@ -1288,7 +1290,8 @@ void ContainerLayer::ComputeEffectiveTransformsForChildren(
}
}
/* static */ bool ContainerLayer::HasOpaqueAncestorLayer(Layer* aLayer) {
/* static */
bool ContainerLayer::HasOpaqueAncestorLayer(Layer* aLayer) {
for (Layer* l = aLayer->GetParent(); l; l = l->GetParent()) {
if (l->GetContentFlags() & Layer::CONTENT_OPAQUE) return true;
}
@ -2222,7 +2225,8 @@ void LayerManager::DumpPacket(layerscope::LayersPacket* aPacket) {
layer->set_parentptr(0);
}
/*static*/ bool LayerManager::IsLogEnabled() {
/*static*/
bool LayerManager::IsLogEnabled() {
return MOZ_LOG_TEST(GetLog(), LogLevel::Debug);
}

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

@ -45,7 +45,8 @@ void PaintThread::Release() {}
void PaintThread::AddRef() {}
/* static */ int32_t PaintThread::CalculatePaintWorkerCount() {
/* static */
int32_t PaintThread::CalculatePaintWorkerCount() {
int32_t cpuCores = PR_GetNumberOfProcessors();
int32_t workerCount = gfxPrefs::LayersOMTPPaintWorkers();
@ -58,7 +59,8 @@ void PaintThread::AddRef() {}
return workerCount;
}
/* static */ void PaintThread::Start() {
/* static */
void PaintThread::Start() {
PaintThread::sSingleton = new PaintThread();
if (!PaintThread::sSingleton->Init()) {
@ -108,7 +110,8 @@ void DestroyPaintThread(UniquePtr<PaintThread>&& pt) {
pt->ShutdownOnPaintThread();
}
/* static */ void PaintThread::Shutdown() {
/* static */
void PaintThread::Shutdown() {
MOZ_ASSERT(NS_IsMainThread());
UniquePtr<PaintThread> pt(sSingleton.forget());
@ -124,11 +127,11 @@ void DestroyPaintThread(UniquePtr<PaintThread>&& pt) {
void PaintThread::ShutdownOnPaintThread() { MOZ_ASSERT(IsOnPaintThread()); }
/* static */ PaintThread* PaintThread::Get() {
return PaintThread::sSingleton.get();
}
/* static */
PaintThread* PaintThread::Get() { return PaintThread::sSingleton.get(); }
/* static */ bool PaintThread::IsOnPaintThread() {
/* static */
bool PaintThread::IsOnPaintThread() {
return sThreadId == PlatformThread::CurrentId();
}

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

@ -35,7 +35,8 @@ ProfilerScreenshots::~ProfilerScreenshots() {
}
}
/* static */ bool ProfilerScreenshots::IsEnabled() {
/* static */
bool ProfilerScreenshots::IsEnabled() {
#ifdef MOZ_GECKO_PROFILER
return profiler_feature_active(ProfilerFeature::Screenshots);
#else

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

@ -1131,7 +1131,8 @@ static bool WillHandleInput(const PanGestureOrScrollWheelInput& aPanInput) {
return APZInputBridge::ActionForWheelEvent(&wheelEvent).isSome();
}
/*static*/ void APZCTreeManager::FlushApzRepaints(LayersId aLayersId) {
/*static*/
void APZCTreeManager::FlushApzRepaints(LayersId aLayersId) {
// Previously, paints were throttled and therefore this method was used to
// ensure any pending paints were flushed. Now, paints are flushed
// immediately, so it is safe to simply send a notification now.
@ -3148,8 +3149,9 @@ already_AddRefed<wr::WebRenderAPI> APZCTreeManager::GetWebRenderAPI() const {
return api.forget();
}
/*static*/ already_AddRefed<GeckoContentController>
APZCTreeManager::GetContentController(LayersId aLayersId) {
/*static*/
already_AddRefed<GeckoContentController> APZCTreeManager::GetContentController(
LayersId aLayersId) {
RefPtr<GeckoContentController> controller;
CompositorBridgeParent::CallWithIndirectShadowTree(
aLayersId,
@ -3169,8 +3171,8 @@ bool APZCTreeManager::GetAPZTestData(LayersId aLayersId,
return true;
}
/*static*/ LayerToParentLayerMatrix4x4
APZCTreeManager::ComputeTransformForScrollThumb(
/*static*/
LayerToParentLayerMatrix4x4 APZCTreeManager::ComputeTransformForScrollThumb(
const LayerToParentLayerMatrix4x4& aCurrentTransform,
const Matrix4x4& aScrollableContentTransform, AsyncPanZoomController* aApzc,
const FrameMetrics& aMetrics, const ScrollbarData& aScrollbarData,

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

@ -27,7 +27,8 @@ static bool WillHandleMouseEvent(const WidgetMouseEventBase& aEvent) {
aEvent.mMessage == eMouseHitTest);
}
/* static */ Maybe<APZWheelAction> APZInputBridge::ActionForWheelEvent(
/* static */
Maybe<APZWheelAction> APZInputBridge::ActionForWheelEvent(
WidgetWheelEvent* aEvent) {
if (!(aEvent->mDeltaMode == dom::WheelEvent_Binding::DOM_DELTA_LINE ||
aEvent->mDeltaMode == dom::WheelEvent_Binding::DOM_DELTA_PIXEL ||

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

@ -56,15 +56,17 @@ void APZSampler::SetWebRenderWindowId(const wr::WindowId& aWindowId) {
(*sWindowIdMap)[wr::AsUint64(aWindowId)] = this;
}
/*static*/ void APZSampler::SetSamplerThread(const wr::WrWindowId& aWindowId) {
/*static*/
void APZSampler::SetSamplerThread(const wr::WrWindowId& aWindowId) {
if (RefPtr<APZSampler> sampler = GetSampler(aWindowId)) {
MutexAutoLock lock(sampler->mThreadIdLock);
sampler->mSamplerThreadId = Some(PlatformThread::CurrentId());
}
}
/*static*/ void APZSampler::SampleForWebRender(const wr::WrWindowId& aWindowId,
wr::Transaction* aTransaction) {
/*static*/
void APZSampler::SampleForWebRender(const wr::WrWindowId& aWindowId,
wr::Transaction* aTransaction) {
if (RefPtr<APZSampler> sampler = GetSampler(aWindowId)) {
wr::TransactionWrapper txn(aTransaction);
sampler->SampleForWebRender(txn);
@ -246,7 +248,8 @@ bool APZSampler::IsSamplerThread() const {
return CompositorThreadHolder::IsInCompositorThread();
}
/*static*/ already_AddRefed<APZSampler> APZSampler::GetSampler(
/*static*/
already_AddRefed<APZSampler> APZSampler::GetSampler(
const wr::WrWindowId& aWindowId) {
RefPtr<APZSampler> sampler;
StaticMutexAutoLock lock(sWindowIdLock);

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

@ -61,22 +61,24 @@ void APZUpdater::SetWebRenderWindowId(const wr::WindowId& aWindowId) {
(*sWindowIdMap)[wr::AsUint64(aWindowId)] = this;
}
/*static*/ void APZUpdater::SetUpdaterThread(const wr::WrWindowId& aWindowId) {
/*static*/
void APZUpdater::SetUpdaterThread(const wr::WrWindowId& aWindowId) {
if (RefPtr<APZUpdater> updater = GetUpdater(aWindowId)) {
MutexAutoLock lock(updater->mThreadIdLock);
updater->mUpdaterThreadId = Some(PlatformThread::CurrentId());
}
}
/*static*/ void APZUpdater::PrepareForSceneSwap(
const wr::WrWindowId& aWindowId) {
/*static*/
void APZUpdater::PrepareForSceneSwap(const wr::WrWindowId& aWindowId) {
if (RefPtr<APZUpdater> updater = GetUpdater(aWindowId)) {
updater->mApz->LockTree();
}
}
/*static*/ void APZUpdater::CompleteSceneSwap(const wr::WrWindowId& aWindowId,
const wr::WrPipelineInfo& aInfo) {
/*static*/
void APZUpdater::CompleteSceneSwap(const wr::WrWindowId& aWindowId,
const wr::WrPipelineInfo& aInfo) {
RefPtr<APZUpdater> updater = GetUpdater(aWindowId);
if (!updater) {
// This should only happen in cases where PrepareForSceneSwap also got a
@ -119,8 +121,8 @@ void APZUpdater::SetWebRenderWindowId(const wr::WindowId& aWindowId) {
updater->mApz->UnlockTree();
}
/*static*/ void APZUpdater::ProcessPendingTasks(
const wr::WrWindowId& aWindowId) {
/*static*/
void APZUpdater::ProcessPendingTasks(const wr::WrWindowId& aWindowId) {
if (RefPtr<APZUpdater> updater = GetUpdater(aWindowId)) {
updater->ProcessQueue();
}
@ -409,7 +411,8 @@ bool APZUpdater::UsingWebRenderUpdaterThread() const {
return mIsUsingWebRender;
}
/*static*/ already_AddRefed<APZUpdater> APZUpdater::GetUpdater(
/*static*/
already_AddRefed<APZUpdater> APZUpdater::GetUpdater(
const wr::WrWindowId& aWindowId) {
RefPtr<APZUpdater> updater;
StaticMutexAutoLock lock(sWindowIdLock);

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

@ -74,7 +74,8 @@ UniquePtr<VelocityTracker> AndroidSpecificState::CreateVelocityTracker(
return MakeUnique<SimpleVelocityTracker>(aAxis);
}
/* static */ void AndroidSpecificState::InitializeGlobalState() {
/* static */
void AndroidSpecificState::InitializeGlobalState() {
// Not conditioned on gfxPrefs::APZUseChromeFlingPhysics() because
// the pref is live.
AndroidFlingPhysics::InitializeGlobalState();

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

@ -137,7 +137,8 @@ struct SplineConstants {
StaticAutoPtr<SplineConstants> gSplineConstants;
/* static */ void AndroidFlingPhysics::InitializeGlobalState() {
/* static */
void AndroidFlingPhysics::InitializeGlobalState() {
gSplineConstants = new SplineConstants();
ClearOnShutdown(&gSplineConstants);
}

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

@ -762,7 +762,8 @@ class SmoothScrollAnimation : public AsyncPanZoomAnimation {
AxisPhysicsMSDModel mXAxisModel, mYAxisModel;
};
/*static*/ void AsyncPanZoomController::InitializeGlobalState() {
/*static*/
void AsyncPanZoomController::InitializeGlobalState() {
static bool sInitialized = false;
if (sInitialized) return;
sInitialized = true;

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

@ -16,11 +16,13 @@ namespace layers {
DragTracker::DragTracker() : mInDrag(false) {}
/*static*/ bool DragTracker::StartsDrag(const MouseInput& aInput) {
/*static*/
bool DragTracker::StartsDrag(const MouseInput& aInput) {
return aInput.IsLeftButton() && aInput.mType == MouseInput::MOUSE_DOWN;
}
/*static*/ bool DragTracker::EndsDrag(const MouseInput& aInput) {
/*static*/
bool DragTracker::EndsDrag(const MouseInput& aInput) {
// On Windows, we don't receive a MOUSE_UP at the end of a drag if an
// actual drag session took place. As a backup, we detect the end of the
// drag using the MOUSE_DRAG_END event, which normally is routed directly

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

@ -43,7 +43,8 @@ KeyboardShortcut::KeyboardShortcut(KeyboardInput::KeyboardEventType aEventType,
mEventType(aEventType),
mDispatchToContent(true) {}
/* static */ void KeyboardShortcut::AppendHardcodedShortcuts(
/* static */
void KeyboardShortcut::AppendHardcodedShortcuts(
nsTArray<KeyboardShortcut>& aShortcuts) {
// Tab
KeyboardShortcut tab1;

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

@ -902,14 +902,15 @@ void APZCCallbackHelper::NotifyFlushComplete(nsIPresShell* aShell) {
observerService->NotifyObservers(nullptr, "apz-repaints-flushed", nullptr);
}
/* static */ bool APZCCallbackHelper::IsScrollInProgress(
nsIScrollableFrame* aFrame) {
/* static */
bool APZCCallbackHelper::IsScrollInProgress(nsIScrollableFrame* aFrame) {
return aFrame->IsProcessingAsyncScroll() ||
nsLayoutUtils::CanScrollOriginClobberApz(aFrame->LastScrollOrigin()) ||
aFrame->LastSmoothScrollOrigin();
}
/* static */ void APZCCallbackHelper::NotifyAsyncScrollbarDragInitiated(
/* static */
void APZCCallbackHelper::NotifyAsyncScrollbarDragInitiated(
uint64_t aDragBlockId, const ScrollableLayerGuid::ViewID& aScrollId,
ScrollDirection aDirection) {
MOZ_ASSERT(NS_IsMainThread());
@ -919,7 +920,8 @@ void APZCCallbackHelper::NotifyFlushComplete(nsIPresShell* aShell) {
}
}
/* static */ void APZCCallbackHelper::NotifyAsyncScrollbarDragRejected(
/* static */
void APZCCallbackHelper::NotifyAsyncScrollbarDragRejected(
const ScrollableLayerGuid::ViewID& aScrollId) {
MOZ_ASSERT(NS_IsMainThread());
if (nsIScrollableFrame* scrollFrame =
@ -928,7 +930,8 @@ void APZCCallbackHelper::NotifyFlushComplete(nsIPresShell* aShell) {
}
}
/* static */ void APZCCallbackHelper::NotifyAsyncAutoscrollRejected(
/* static */
void APZCCallbackHelper::NotifyAsyncAutoscrollRejected(
const ScrollableLayerGuid::ViewID& aScrollId) {
MOZ_ASSERT(NS_IsMainThread());
nsCOMPtr<nsIObserverService> observerService =
@ -941,7 +944,8 @@ void APZCCallbackHelper::NotifyFlushComplete(nsIPresShell* aShell) {
data.get());
}
/* static */ void APZCCallbackHelper::CancelAutoscroll(
/* static */
void APZCCallbackHelper::CancelAutoscroll(
const ScrollableLayerGuid::ViewID& aScrollId) {
MOZ_ASSERT(NS_IsMainThread());
nsCOMPtr<nsIObserverService> observerService =
@ -954,7 +958,8 @@ void APZCCallbackHelper::NotifyFlushComplete(nsIPresShell* aShell) {
data.get());
}
/* static */ void APZCCallbackHelper::NotifyPinchGesture(
/* static */
void APZCCallbackHelper::NotifyPinchGesture(
PinchGestureInput::PinchGestureType aType, LayoutDeviceCoord aSpanChange,
Modifiers aModifiers, nsIWidget* aWidget) {
EventMessage msg;

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

@ -12,22 +12,26 @@ namespace layers {
static bool sThreadAssertionsEnabled = true;
static MessageLoop* sControllerThread;
/*static*/ void APZThreadUtils::SetThreadAssertionsEnabled(bool aEnabled) {
/*static*/
void APZThreadUtils::SetThreadAssertionsEnabled(bool aEnabled) {
sThreadAssertionsEnabled = aEnabled;
}
/*static*/ bool APZThreadUtils::GetThreadAssertionsEnabled() {
/*static*/
bool APZThreadUtils::GetThreadAssertionsEnabled() {
return sThreadAssertionsEnabled;
}
/*static*/ void APZThreadUtils::SetControllerThread(MessageLoop* aLoop) {
/*static*/
void APZThreadUtils::SetControllerThread(MessageLoop* aLoop) {
// We must either be setting the initial controller thread, or removing it,
// or re-using an existing controller thread.
MOZ_ASSERT(!sControllerThread || !aLoop || sControllerThread == aLoop);
sControllerThread = aLoop;
}
/*static*/ void APZThreadUtils::AssertOnControllerThread() {
/*static*/
void APZThreadUtils::AssertOnControllerThread() {
if (!GetThreadAssertionsEnabled()) {
return;
}
@ -35,8 +39,8 @@ static MessageLoop* sControllerThread;
MOZ_ASSERT(sControllerThread == MessageLoop::current());
}
/*static*/ void APZThreadUtils::RunOnControllerThread(
RefPtr<Runnable>&& aTask) {
/*static*/
void APZThreadUtils::RunOnControllerThread(RefPtr<Runnable>&& aTask) {
RefPtr<Runnable> task = std::move(aTask);
if (!sControllerThread) {
@ -52,7 +56,8 @@ static MessageLoop* sControllerThread;
}
}
/*static*/ bool APZThreadUtils::IsControllerThread() {
/*static*/
bool APZThreadUtils::IsControllerThread() {
return sControllerThread == MessageLoop::current();
}

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

@ -21,10 +21,11 @@
namespace mozilla {
namespace layers {
/*static*/ StaticRefPtr<CheckerboardEventStorage>
CheckerboardEventStorage::sInstance;
/*static*/
StaticRefPtr<CheckerboardEventStorage> CheckerboardEventStorage::sInstance;
/*static*/ already_AddRefed<CheckerboardEventStorage>
/*static*/
already_AddRefed<CheckerboardEventStorage>
CheckerboardEventStorage::GetInstance() {
// The instance in the parent process does all the work, so if this is getting
// called in the child process something is likely wrong.
@ -152,8 +153,8 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CheckerboardReportService, mParent)
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(CheckerboardReportService, AddRef)
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CheckerboardReportService, Release)
/*static*/ bool CheckerboardReportService::IsEnabled(JSContext* aCtx,
JSObject* aGlobal) {
/*static*/
bool CheckerboardReportService::IsEnabled(JSContext* aCtx, JSObject* aGlobal) {
// Only allow this in the parent process
if (!XRE_IsParentProcess()) {
return false;
@ -163,7 +164,8 @@ NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(CheckerboardReportService, Release)
nsContentUtils::IsSpecificAboutPage(aGlobal, "about:checkerboard");
}
/*static*/ already_AddRefed<CheckerboardReportService>
/*static*/
already_AddRefed<CheckerboardReportService>
CheckerboardReportService::Constructor(const dom::GlobalObject& aGlobal,
ErrorResult& aRv) {
RefPtr<CheckerboardReportService> ces =

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

@ -15,21 +15,20 @@ nsEventStatus InputAPZContext::sApzResponse = nsEventStatus_eIgnore;
bool InputAPZContext::sPendingLayerization = false;
bool InputAPZContext::sRoutedToChildProcess = false;
/*static*/ ScrollableLayerGuid InputAPZContext::GetTargetLayerGuid() {
return sGuid;
}
/*static*/
ScrollableLayerGuid InputAPZContext::GetTargetLayerGuid() { return sGuid; }
/*static*/ uint64_t InputAPZContext::GetInputBlockId() { return sBlockId; }
/*static*/
uint64_t InputAPZContext::GetInputBlockId() { return sBlockId; }
/*static*/ nsEventStatus InputAPZContext::GetApzResponse() {
return sApzResponse;
}
/*static*/
nsEventStatus InputAPZContext::GetApzResponse() { return sApzResponse; }
/*static*/ bool InputAPZContext::HavePendingLayerization() {
return sPendingLayerization;
}
/*static*/
bool InputAPZContext::HavePendingLayerization() { return sPendingLayerization; }
/*static*/ bool InputAPZContext::WasRoutedToChildProcess() {
/*static*/
bool InputAPZContext::WasRoutedToChildProcess() {
return sRoutedToChildProcess;
}
@ -57,7 +56,8 @@ InputAPZContext::~InputAPZContext() {
sRoutedToChildProcess = mOldRoutedToChildProcess;
}
/*static*/ void InputAPZContext::SetRoutedToChildProcess() {
/*static*/
void InputAPZContext::SetRoutedToChildProcess() {
sRoutedToChildProcess = true;
}

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

@ -15,7 +15,8 @@ namespace layers {
uint32_t ScrollLinkedEffectDetector::sDepth = 0;
bool ScrollLinkedEffectDetector::sFoundScrollLinkedEffect = false;
/* static */ void ScrollLinkedEffectDetector::PositioningPropertyMutated() {
/* static */
void ScrollLinkedEffectDetector::PositioningPropertyMutated() {
MOZ_ASSERT(NS_IsMainThread());
if (sDepth > 0) {

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

@ -32,7 +32,8 @@ using namespace mozilla::gl;
namespace mozilla {
namespace layers {
/* static */ already_AddRefed<CanvasClient> CanvasClient::CreateCanvasClient(
/* static */
already_AddRefed<CanvasClient> CanvasClient::CreateCanvasClient(
CanvasClientType aType, CompositableForwarder* aForwarder,
TextureFlags aFlags) {
switch (aType) {

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

@ -68,7 +68,8 @@ static IntRect ComputeBufferRect(const IntRect& aRequestedRect) {
return rect;
}
/* static */ already_AddRefed<ContentClient> ContentClient::CreateContentClient(
/* static */
already_AddRefed<ContentClient> ContentClient::CreateContentClient(
CompositableForwarder* aForwarder) {
LayersBackend backend = aForwarder->GetCompositorBackendType();
if (backend != LayersBackend::LAYERS_OPENGL &&

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

@ -39,7 +39,8 @@ namespace layers {
using namespace mozilla::gfx;
/* static */ already_AddRefed<ImageClient> ImageClient::CreateImageClient(
/* static */
already_AddRefed<ImageClient> ImageClient::CreateImageClient(
CompositableType aCompositableHostType, CompositableForwarder* aForwarder,
TextureFlags aFlags) {
RefPtr<ImageClient> result = nullptr;
@ -83,9 +84,9 @@ void ImageClientSingle::FlushAllImages() {
mBuffers.Clear();
}
/* static */ already_AddRefed<TextureClient>
ImageClient::CreateTextureClientForImage(Image* aImage,
KnowsCompositor* aForwarder) {
/* static */
already_AddRefed<TextureClient> ImageClient::CreateTextureClientForImage(
Image* aImage, KnowsCompositor* aForwarder) {
RefPtr<TextureClient> texture;
if (aImage->GetFormat() == ImageFormat::PLANAR_YCBCR) {
PlanarYCbCrImage* ycbcr = static_cast<PlanarYCbCrImage*>(aImage);

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

@ -32,7 +32,8 @@ void SingleTiledContentClient::UpdatedBuffer(TiledBufferType aType) {
mTiledBuffer->GetSurfaceDescriptorTiles());
}
/* static */ bool SingleTiledContentClient::ClientSupportsLayerSize(
/* static */
bool SingleTiledContentClient::ClientSupportsLayerSize(
const gfx::IntSize& aSize, ClientLayerManager* aManager) {
int32_t maxTextureSize = aManager->GetMaxTextureSize();
return aSize.width <= maxTextureSize && aSize.height <= maxTextureSize;

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

@ -298,7 +298,8 @@ void TextureChild::Destroy(const TextureDeallocParams& aParams) {
}
}
/* static */ Atomic<uint64_t> TextureClient::sSerialCounter(0);
/* static */
Atomic<uint64_t> TextureClient::sSerialCounter(0);
static void DeallocateTextureClientSyncProxy(TextureDeallocParams params,
ReentrantMonitor* aBarrier,
@ -818,8 +819,9 @@ void TextureClient::CancelWaitForRecycle() {
}
}
/* static */ void TextureClient::TextureClientRecycleCallback(
TextureClient* aClient, void* aClosure) {
/* static */
void TextureClient::TextureClientRecycleCallback(TextureClient* aClient,
void* aClosure) {
MOZ_ASSERT(aClient->GetRecycleAllocator());
aClient->GetRecycleAllocator()->RecycleTextureClient(aClient);
}

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

@ -104,7 +104,8 @@ void CompositableHost::RemoveMaskEffect() {
}
}
/* static */ already_AddRefed<CompositableHost> CompositableHost::Create(
/* static */
already_AddRefed<CompositableHost> CompositableHost::Create(
const TextureInfo& aTextureInfo, bool aUseWebRender) {
RefPtr<CompositableHost> result;
switch (aTextureInfo.mCompositableType) {

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

@ -1434,11 +1434,11 @@ bool LayerComposite::HasStaleCompositor() const {
#ifndef MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS
/*static*/ bool LayerManagerComposite::SupportsDirectTexturing() {
return false;
}
/*static*/
bool LayerManagerComposite::SupportsDirectTexturing() { return false; }
/*static*/ void LayerManagerComposite::PlatformSyncBeforeReplyUpdate() {}
/*static*/
void LayerManagerComposite::PlatformSyncBeforeReplyUpdate() {}
#endif // !defined(MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS)

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

@ -27,7 +27,8 @@ DeviceAttachmentsD3D11::DeviceAttachmentsD3D11(ID3D11Device* device)
DeviceAttachmentsD3D11::~DeviceAttachmentsD3D11() {}
/* static */ RefPtr<DeviceAttachmentsD3D11> DeviceAttachmentsD3D11::Create(
/* static */
RefPtr<DeviceAttachmentsD3D11> DeviceAttachmentsD3D11::Create(
ID3D11Device* aDevice) {
// We don't return null even if the attachments object even if it fails to
// initialize, so the compositor can grab the failure ID.

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

@ -625,9 +625,12 @@ MLGTextureD3D11::MLGTextureD3D11(ID3D11Texture2D* aTexture)
mSize.height = desc.Height;
}
/* static */ RefPtr<MLGTextureD3D11> MLGTextureD3D11::Create(
ID3D11Device* aDevice, const gfx::IntSize& aSize,
gfx::SurfaceFormat aFormat, MLGUsage aUsage, MLGTextureFlags aFlags) {
/* static */
RefPtr<MLGTextureD3D11> MLGTextureD3D11::Create(ID3D11Device* aDevice,
const gfx::IntSize& aSize,
gfx::SurfaceFormat aFormat,
MLGUsage aUsage,
MLGTextureFlags aFlags) {
D3D11_TEXTURE2D_DESC desc;
::ZeroMemory(&desc, sizeof(desc));
desc.Width = aSize.width;

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

@ -254,7 +254,8 @@ void CompositorBridgeChild::InitForWidget(uint64_t aProcessToken,
mIdNamespace = aNamespace;
}
/*static*/ CompositorBridgeChild* CompositorBridgeChild::Get() {
/*static*/
CompositorBridgeChild* CompositorBridgeChild::Get() {
// This is only expected to be used in child processes. While the parent
// process does have CompositorBridgeChild instances, it has _multiple_ (one
// per window), and therefore there is no global singleton available.
@ -267,7 +268,8 @@ bool CompositorBridgeChild::ChildProcessHasCompositorBridge() {
return sCompositorBridge != nullptr;
}
/* static */ bool CompositorBridgeChild::CompositorIsInGPUProcess() {
/* static */
bool CompositorBridgeChild::CompositorIsInGPUProcess() {
MOZ_ASSERT(NS_IsMainThread());
if (XRE_IsParentProcess()) {

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

@ -874,7 +874,8 @@ void CompositorBridgeParent::ScheduleComposition() {
// Go down the composite layer tree, setting properties to match their
// content-side counterparts.
/* static */ void CompositorBridgeParent::SetShadowProperties(Layer* aLayer) {
/* static */
void CompositorBridgeParent::SetShadowProperties(Layer* aLayer) {
ForEachNode<ForwardIterator>(aLayer, [](Layer* layer) {
if (Layer* maskLayer = layer->GetMaskLayer()) {
SetShadowProperties(maskLayer);
@ -1167,7 +1168,8 @@ CompositorBridgeParent::GetCompositorBridgeParentFromLayersId(
return sIndirectLayerTrees[aLayersId].mParent;
}
/*static*/ RefPtr<CompositorBridgeParent>
/*static*/
RefPtr<CompositorBridgeParent>
CompositorBridgeParent::GetCompositorBridgeParentFromWindowId(
const wr::WindowId& aWindowId) {
MonitorAutoLock lock(*sIndirectLayerTreesLock);
@ -1844,7 +1846,8 @@ static void EraseLayerState(LayersId aId) {
}
}
/*static*/ void CompositorBridgeParent::DeallocateLayerTreeId(LayersId aId) {
/*static*/
void CompositorBridgeParent::DeallocateLayerTreeId(LayersId aId) {
MOZ_ASSERT(NS_IsMainThread());
// Here main thread notifies compositor to remove an element from
// sIndirectLayerTrees. This removed element might be queried soon.
@ -1880,7 +1883,8 @@ ScopedLayerTreeRegistration::~ScopedLayerTreeRegistration() {
sIndirectLayerTrees.erase(mLayersId);
}
/*static*/ void CompositorBridgeParent::SetControllerForLayerTree(
/*static*/
void CompositorBridgeParent::SetControllerForLayerTree(
LayersId aLayersId, GeckoContentController* aController) {
// This ref is adopted by UpdateControllerForLayersId().
aController->AddRef();
@ -1889,8 +1893,9 @@ ScopedLayerTreeRegistration::~ScopedLayerTreeRegistration() {
aLayersId, aController));
}
/*static*/ already_AddRefed<IAPZCTreeManager>
CompositorBridgeParent::GetAPZCTreeManager(LayersId aLayersId) {
/*static*/
already_AddRefed<IAPZCTreeManager> CompositorBridgeParent::GetAPZCTreeManager(
LayersId aLayersId) {
EnsureLayerTreeMapReady();
MonitorAutoLock lock(*sIndirectLayerTreesLock);
LayerTreeMap::iterator cit = sIndirectLayerTrees.find(aLayersId);
@ -1914,7 +1919,8 @@ static void InsertVsyncProfilerMarker(TimeStamp aVsyncTimestamp) {
}
#endif
/*static */ void CompositorBridgeParent::PostInsertVsyncProfilerMarker(
/*static */
void CompositorBridgeParent::PostInsertVsyncProfilerMarker(
TimeStamp aVsyncTimestamp) {
#if defined(MOZ_GECKO_PROFILER)
// Called in the vsync thread
@ -2156,7 +2162,8 @@ CompositorBridgeParent::GetIndirectShadowTree(LayersId aId) {
return &cit->second;
}
/* static */ bool CompositorBridgeParent::CallWithIndirectShadowTree(
/* static */
bool CompositorBridgeParent::CallWithIndirectShadowTree(
LayersId aId,
const std::function<void(CompositorBridgeParent::LayerTreeState&)>& aFunc) {
// Note that this does not make things universally threadsafe just because the
@ -2196,8 +2203,8 @@ static CompositorBridgeParent::LayerTreeState* GetStateForRoot(
return state;
}
/* static */ APZCTreeManagerParent*
CompositorBridgeParent::GetApzcTreeManagerParentForRoot(
/* static */
APZCTreeManagerParent* CompositorBridgeParent::GetApzcTreeManagerParentForRoot(
LayersId aContentLayersId) {
MonitorAutoLock lock(*sIndirectLayerTreesLock);
CompositorBridgeParent::LayerTreeState* state =
@ -2205,7 +2212,8 @@ CompositorBridgeParent::GetApzcTreeManagerParentForRoot(
return state ? state->mApzcTreeManagerParent : nullptr;
}
/* static */ GeckoContentController*
/* static */
GeckoContentController*
CompositorBridgeParent::GetGeckoContentControllerForRoot(
LayersId aContentLayersId) {
MonitorAutoLock lock(*sIndirectLayerTreesLock);

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

@ -24,15 +24,16 @@ using gfx::GPUProcessManager;
StaticRefPtr<CompositorManagerChild> CompositorManagerChild::sInstance;
/* static */ bool CompositorManagerChild::IsInitialized(
uint64_t aProcessToken) {
/* static */
bool CompositorManagerChild::IsInitialized(uint64_t aProcessToken) {
MOZ_ASSERT(NS_IsMainThread());
return sInstance && sInstance->CanSend() &&
sInstance->mProcessToken == aProcessToken;
}
/* static */ void CompositorManagerChild::InitSameProcess(
uint32_t aNamespace, uint64_t aProcessToken) {
/* static */
void CompositorManagerChild::InitSameProcess(uint32_t aNamespace,
uint64_t aProcessToken) {
MOZ_ASSERT(NS_IsMainThread());
if (NS_WARN_IF(IsInitialized(aProcessToken))) {
MOZ_ASSERT_UNREACHABLE("Already initialized same process");
@ -52,9 +53,10 @@ StaticRefPtr<CompositorManagerChild> CompositorManagerChild::sInstance;
sInstance = child.forget();
}
/* static */ bool CompositorManagerChild::Init(
Endpoint<PCompositorManagerChild>&& aEndpoint, uint32_t aNamespace,
uint64_t aProcessToken /* = 0 */) {
/* static */
bool CompositorManagerChild::Init(Endpoint<PCompositorManagerChild>&& aEndpoint,
uint32_t aNamespace,
uint64_t aProcessToken /* = 0 */) {
MOZ_ASSERT(NS_IsMainThread());
if (sInstance) {
MOZ_ASSERT(sInstance->mNamespace != aNamespace);
@ -65,7 +67,8 @@ StaticRefPtr<CompositorManagerChild> CompositorManagerChild::sInstance;
return sInstance->CanSend();
}
/* static */ void CompositorManagerChild::Shutdown() {
/* static */
void CompositorManagerChild::Shutdown() {
MOZ_ASSERT(NS_IsMainThread());
CompositorBridgeChild::ShutDown();
@ -77,8 +80,8 @@ StaticRefPtr<CompositorManagerChild> CompositorManagerChild::sInstance;
sInstance = nullptr;
}
/* static */ void CompositorManagerChild::OnGPUProcessLost(
uint64_t aProcessToken) {
/* static */
void CompositorManagerChild::OnGPUProcessLost(uint64_t aProcessToken) {
MOZ_ASSERT(NS_IsMainThread());
// Since GPUChild and CompositorManagerChild will race on ActorDestroy, we
@ -89,7 +92,8 @@ StaticRefPtr<CompositorManagerChild> CompositorManagerChild::sInstance;
}
}
/* static */ bool CompositorManagerChild::CreateContentCompositorBridge(
/* static */
bool CompositorManagerChild::CreateContentCompositorBridge(
uint32_t aNamespace) {
MOZ_ASSERT(NS_IsMainThread());
if (NS_WARN_IF(!sInstance || !sInstance->CanSend())) {
@ -108,7 +112,8 @@ StaticRefPtr<CompositorManagerChild> CompositorManagerChild::sInstance;
return true;
}
/* static */ already_AddRefed<CompositorBridgeChild>
/* static */
already_AddRefed<CompositorBridgeChild>
CompositorManagerChild::CreateWidgetCompositorBridge(
uint64_t aProcessToken, LayerManager* aLayerManager, uint32_t aNamespace,
CSSToLayoutDeviceScale aScale, const CompositorOptions& aOptions,
@ -138,7 +143,8 @@ CompositorManagerChild::CreateWidgetCompositorBridge(
return bridge.forget();
}
/* static */ already_AddRefed<CompositorBridgeChild>
/* static */
already_AddRefed<CompositorBridgeChild>
CompositorManagerChild::CreateSameProcessWidgetCompositorBridge(
LayerManager* aLayerManager, uint32_t aNamespace) {
MOZ_ASSERT(XRE_IsParentProcess() || recordreplay::IsRecordingOrReplaying());

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

@ -25,7 +25,8 @@ StaticAutoPtr<nsTArray<CompositorManagerParent*>>
CompositorManagerParent::sActiveActors;
#endif
/* static */ already_AddRefed<CompositorManagerParent>
/* static */
already_AddRefed<CompositorManagerParent>
CompositorManagerParent::CreateSameProcess() {
MOZ_ASSERT(XRE_IsParentProcess() || recordreplay::IsRecordingOrReplaying());
MOZ_ASSERT(NS_IsMainThread());
@ -47,7 +48,8 @@ CompositorManagerParent::CreateSameProcess() {
return parent.forget();
}
/* static */ void CompositorManagerParent::Create(
/* static */
void CompositorManagerParent::Create(
Endpoint<PCompositorManagerParent>&& aEndpoint) {
MOZ_ASSERT(NS_IsMainThread());
@ -64,7 +66,8 @@ CompositorManagerParent::CreateSameProcess() {
CompositorThreadHolder::Loop()->PostTask(runnable.forget());
}
/* static */ already_AddRefed<CompositorBridgeParent>
/* static */
already_AddRefed<CompositorBridgeParent>
CompositorManagerParent::CreateSameProcessWidgetCompositorBridge(
CSSToLayoutDeviceScale aScale, const CompositorOptions& aOptions,
bool aUseExternalSurfaceSize, const gfx::IntSize& aSurfaceSize) {
@ -165,7 +168,8 @@ void CompositorManagerParent::DeferredDestroy() {
}
#ifdef COMPOSITOR_MANAGER_PARENT_EXPLICIT_SHUTDOWN
/* static */ void CompositorManagerParent::ShutdownInternal() {
/* static */
void CompositorManagerParent::ShutdownInternal() {
nsAutoPtr<nsTArray<CompositorManagerParent*>> actors;
// We move here because we may attempt to acquire the same lock during the
@ -183,7 +187,8 @@ void CompositorManagerParent::DeferredDestroy() {
}
#endif // COMPOSITOR_MANAGER_PARENT_EXPLICIT_SHUTDOWN
/* static */ void CompositorManagerParent::Shutdown() {
/* static */
void CompositorManagerParent::Shutdown() {
MOZ_ASSERT(NS_IsMainThread());
#ifdef COMPOSITOR_MANAGER_PARENT_EXPLICIT_SHUTDOWN

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

@ -29,7 +29,8 @@ base::Thread* CompositorThread() {
: nullptr;
}
/* static */ MessageLoop* CompositorThreadHolder::Loop() {
/* static */
MessageLoop* CompositorThreadHolder::Loop() {
return CompositorThread() ? CompositorThread()->message_loop() : nullptr;
}
@ -49,7 +50,8 @@ CompositorThreadHolder::~CompositorThreadHolder() {
}
}
/* static */ void CompositorThreadHolder::DestroyCompositorThread(
/* static */
void CompositorThreadHolder::DestroyCompositorThread(
base::Thread* aCompositorThread) {
MOZ_ASSERT(NS_IsMainThread());
@ -135,7 +137,8 @@ void CompositorThreadHolder::Shutdown() {
CompositorBridgeParent::FinishShutdown();
}
/* static */ bool CompositorThreadHolder::IsInCompositorThread() {
/* static */
bool CompositorThreadHolder::IsInCompositorThread() {
return CompositorThread() &&
CompositorThread()->thread_id() == PlatformThread::CurrentId();
}

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

@ -19,7 +19,8 @@ NS_IMPL_ISUPPORTS(GfxMemoryImageReporter, nsIMemoryReporter)
mozilla::Atomic<ptrdiff_t> GfxMemoryImageReporter::sAmount(0);
/* static */ uint32_t CompositableForwarder::GetMaxFileDescriptorsPerMessage() {
/* static */
uint32_t CompositableForwarder::GetMaxFileDescriptorsPerMessage() {
#if defined(OS_POSIX)
static const uint32_t kMaxFileDescriptors =
FileDescriptorSet::MAX_DESCRIPTORS_PER_MESSAGE;

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

@ -286,7 +286,8 @@ void ImageBridgeChild::ForgetImageContainer(const CompositableHandle& aHandle) {
Thread* ImageBridgeChild::GetThread() const { return sImageBridgeChildThread; }
/* static */ RefPtr<ImageBridgeChild> ImageBridgeChild::GetSingleton() {
/* static */
RefPtr<ImageBridgeChild> ImageBridgeChild::GetSingleton() {
StaticMutexAutoLock lock(sImageBridgeSingletonLock);
return sImageBridgeChildSingleton;
}
@ -500,7 +501,8 @@ void ImageBridgeChild::BindSameProcess(RefPtr<ImageBridgeParent> aParent) {
mCanSend = true;
}
/* static */ void ImageBridgeChild::ShutDown() {
/* static */
void ImageBridgeChild::ShutDown() {
MOZ_ASSERT(NS_IsMainThread());
ShutdownSingleton();
@ -509,7 +511,8 @@ void ImageBridgeChild::BindSameProcess(RefPtr<ImageBridgeParent> aParent) {
sImageBridgeChildThread = nullptr;
}
/* static */ void ImageBridgeChild::ShutdownSingleton() {
/* static */
void ImageBridgeChild::ShutdownSingleton() {
MOZ_ASSERT(NS_IsMainThread());
if (RefPtr<ImageBridgeChild> child = GetSingleton()) {
@ -570,7 +573,8 @@ void ImageBridgeChild::InitSameProcess(uint32_t aNamespace) {
}
}
/* static */ void ImageBridgeChild::InitWithGPUProcess(
/* static */
void ImageBridgeChild::InitWithGPUProcess(
Endpoint<PImageBridgeChild>&& aEndpoint, uint32_t aNamespace) {
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(!sImageBridgeChildSingleton);
@ -606,7 +610,8 @@ MessageLoop* ImageBridgeChild::GetMessageLoop() const {
: nullptr;
}
/* static */ void ImageBridgeChild::IdentifyCompositorTextureHost(
/* static */
void ImageBridgeChild::IdentifyCompositorTextureHost(
const TextureFactoryIdentifier& aIdentifier) {
if (RefPtr<ImageBridgeChild> child = GetSingleton()) {
child->UpdateTextureFactoryIdentifier(aIdentifier);

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

@ -48,7 +48,8 @@ StaticAutoPtr<mozilla::Monitor> sImageBridgesLock;
static StaticRefPtr<ImageBridgeParent> sImageBridgeParentSingleton;
/* static */ void ImageBridgeParent::Setup() {
/* static */
void ImageBridgeParent::Setup() {
MOZ_ASSERT(NS_IsMainThread());
if (!sImageBridgesLock) {
sImageBridgesLock = new Monitor("ImageBridges");
@ -67,7 +68,8 @@ ImageBridgeParent::ImageBridgeParent(MessageLoop* aLoop,
ImageBridgeParent::~ImageBridgeParent() {}
/* static */ ImageBridgeParent* ImageBridgeParent::CreateSameProcess() {
/* static */
ImageBridgeParent* ImageBridgeParent::CreateSameProcess() {
base::ProcessId pid = base::GetCurrentProcId();
RefPtr<ImageBridgeParent> parent =
new ImageBridgeParent(CompositorThreadHolder::Loop(), pid);
@ -83,7 +85,8 @@ ImageBridgeParent::~ImageBridgeParent() {}
return parent;
}
/* static */ bool ImageBridgeParent::CreateForGPUProcess(
/* static */
bool ImageBridgeParent::CreateForGPUProcess(
Endpoint<PImageBridgeParent>&& aEndpoint) {
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_GPU);
@ -99,7 +102,8 @@ ImageBridgeParent::~ImageBridgeParent() {}
return true;
}
/* static */ void ImageBridgeParent::ShutdownInternal() {
/* static */
void ImageBridgeParent::ShutdownInternal() {
// We make a copy because we don't want to hold the lock while closing and we
// don't want the object to get freed underneath us.
nsTArray<RefPtr<ImageBridgeParent>> actors;
@ -118,7 +122,8 @@ ImageBridgeParent::~ImageBridgeParent() {}
sImageBridgeParentSingleton = nullptr;
}
/* static */ void ImageBridgeParent::Shutdown() {
/* static */
void ImageBridgeParent::Shutdown() {
CompositorThreadHolder::Loop()->PostTask(NS_NewRunnableFunction(
"ImageBridgeParent::Shutdown",
[]() -> void { ImageBridgeParent::ShutdownInternal(); }));
@ -203,7 +208,8 @@ mozilla::ipc::IPCResult ImageBridgeParent::RecvUpdate(
return IPC_OK();
}
/* static */ bool ImageBridgeParent::CreateForContent(
/* static */
bool ImageBridgeParent::CreateForContent(
Endpoint<PImageBridgeParent>&& aEndpoint) {
MessageLoop* loop = CompositorThreadHolder::Loop();
@ -318,7 +324,8 @@ class ProcessIdComparator {
}
};
/* static */ bool ImageBridgeParent::NotifyImageComposites(
/* static */
bool ImageBridgeParent::NotifyImageComposites(
nsTArray<ImageCompositeNotificationInfo>& aNotifications) {
// Group the notifications by destination process ID and then send the
// notifications in one message per group.

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

@ -12,7 +12,8 @@
namespace mozilla {
namespace layers {
/* static */ Maybe<ComputedTimingFunction>
/* static */
Maybe<ComputedTimingFunction>
AnimationUtils::TimingFunctionToComputedTimingFunction(
const TimingFunction& aTimingFunction) {
switch (aTimingFunction.type()) {

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

@ -18,13 +18,14 @@ using namespace mozilla::gl;
namespace mozilla {
namespace layers {
/*static*/ void ShadowLayerForwarder::PlatformSyncBeforeUpdate() {}
/*static*/
void ShadowLayerForwarder::PlatformSyncBeforeUpdate() {}
/*static*/ void LayerManagerComposite::PlatformSyncBeforeReplyUpdate() {}
/*static*/
void LayerManagerComposite::PlatformSyncBeforeReplyUpdate() {}
/*static*/ bool LayerManagerComposite::SupportsDirectTexturing() {
return false;
}
/*static*/
bool LayerManagerComposite::SupportsDirectTexturing() { return false; }
} // namespace layers
} // namespace mozilla

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

@ -102,7 +102,8 @@ already_AddRefed<gfxXlibSurface> SurfaceDescriptorX11::OpenForeign() const {
return surf->CairoStatus() ? nullptr : surf.forget();
}
/*static*/ void ShadowLayerForwarder::PlatformSyncBeforeUpdate() {
/*static*/
void ShadowLayerForwarder::PlatformSyncBeforeUpdate() {
if (UsingXCompositing()) {
// If we're using X surfaces, then we need to finish all pending
// operations on the back buffers before handing them to the
@ -112,7 +113,8 @@ already_AddRefed<gfxXlibSurface> SurfaceDescriptorX11::OpenForeign() const {
}
}
/*static*/ void LayerManagerComposite::PlatformSyncBeforeReplyUpdate() {
/*static*/
void LayerManagerComposite::PlatformSyncBeforeReplyUpdate() {
if (UsingXCompositing()) {
// If we're using X surfaces, we need to finish all pending
// operations on the *front buffers* before handing them back to
@ -123,9 +125,8 @@ already_AddRefed<gfxXlibSurface> SurfaceDescriptorX11::OpenForeign() const {
}
}
/*static*/ bool LayerManagerComposite::SupportsDirectTexturing() {
return false;
}
/*static*/
bool LayerManagerComposite::SupportsDirectTexturing() { return false; }
} // namespace layers
} // namespace mozilla

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

@ -793,7 +793,8 @@ LayerHandle ShadowLayerForwarder::ConstructShadowFor(ShadowableLayer* aLayer) {
#if !defined(MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS)
/*static*/ void ShadowLayerForwarder::PlatformSyncBeforeUpdate() {}
/*static*/
void ShadowLayerForwarder::PlatformSyncBeforeUpdate() {}
#endif // !defined(MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS)
@ -976,7 +977,8 @@ bool ShadowLayerForwarder::AllocSurfaceDescriptorWithCaps(
return true;
}
/* static */ bool ShadowLayerForwarder::IsShmem(SurfaceDescriptor* aSurface) {
/* static */
bool ShadowLayerForwarder::IsShmem(SurfaceDescriptor* aSurface) {
return aSurface &&
(aSurface->type() == SurfaceDescriptor::TSurfaceDescriptorBuffer) &&
(aSurface->get_SurfaceDescriptorBuffer().data().type() ==

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

@ -20,7 +20,8 @@ namespace layers {
using namespace mozilla::gfx;
/* static */ UserDataKey SharedSurfacesChild::sSharedKey;
/* static */
UserDataKey SharedSurfacesChild::sSharedKey;
SharedSurfacesChild::ImageKeyData::ImageKeyData(
RenderRootStateManager* aManager, const wr::ImageKey& aImageKey)
@ -146,8 +147,9 @@ wr::ImageKey SharedSurfacesChild::SharedUserData::UpdateKey(
return key;
}
/* static */ SourceSurfaceSharedData*
SharedSurfacesChild::AsSourceSurfaceSharedData(SourceSurface* aSurface) {
/* static */
SourceSurfaceSharedData* SharedSurfacesChild::AsSourceSurfaceSharedData(
SourceSurface* aSurface) {
MOZ_ASSERT(aSurface);
switch (aSurface->GetType()) {
case SurfaceType::DATA_SHARED:
@ -163,14 +165,16 @@ SharedSurfacesChild::AsSourceSurfaceSharedData(SourceSurface* aSurface) {
}
}
/* static */ void SharedSurfacesChild::DestroySharedUserData(void* aClosure) {
/* static */
void SharedSurfacesChild::DestroySharedUserData(void* aClosure) {
MOZ_ASSERT(aClosure);
auto data = static_cast<SharedUserData*>(aClosure);
delete data;
}
/* static */ nsresult SharedSurfacesChild::ShareInternal(
SourceSurfaceSharedData* aSurface, SharedUserData** aUserData) {
/* static */
nsresult SharedSurfacesChild::ShareInternal(SourceSurfaceSharedData* aSurface,
SharedUserData** aUserData) {
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aSurface);
MOZ_ASSERT(aUserData);
@ -253,8 +257,8 @@ SharedSurfacesChild::AsSourceSurfaceSharedData(SourceSurface* aSurface) {
return NS_OK;
}
/* static */ void SharedSurfacesChild::Share(
SourceSurfaceSharedData* aSurface) {
/* static */
void SharedSurfacesChild::Share(SourceSurfaceSharedData* aSurface) {
MOZ_ASSERT(aSurface);
// The IPDL actor to do sharing can only be accessed on the main thread so we
@ -286,9 +290,11 @@ SharedSurfacesChild::AsSourceSurfaceSharedData(SourceSurface* aSurface) {
SharedSurfacesChild::ShareInternal(aSurface, &unused);
}
/* static */ nsresult SharedSurfacesChild::Share(
SourceSurfaceSharedData* aSurface, RenderRootStateManager* aManager,
wr::IpcResourceUpdateQueue& aResources, wr::ImageKey& aKey) {
/* static */
nsresult SharedSurfacesChild::Share(SourceSurfaceSharedData* aSurface,
RenderRootStateManager* aManager,
wr::IpcResourceUpdateQueue& aResources,
wr::ImageKey& aKey) {
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aSurface);
MOZ_ASSERT(aManager);
@ -308,9 +314,11 @@ SharedSurfacesChild::AsSourceSurfaceSharedData(SourceSurface* aSurface) {
return rv;
}
/* static */ nsresult SharedSurfacesChild::Share(
SourceSurface* aSurface, RenderRootStateManager* aManager,
wr::IpcResourceUpdateQueue& aResources, wr::ImageKey& aKey) {
/* static */
nsresult SharedSurfacesChild::Share(SourceSurface* aSurface,
RenderRootStateManager* aManager,
wr::IpcResourceUpdateQueue& aResources,
wr::ImageKey& aKey) {
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aSurface);
MOZ_ASSERT(aManager);
@ -323,10 +331,12 @@ SharedSurfacesChild::AsSourceSurfaceSharedData(SourceSurface* aSurface) {
return Share(sharedSurface, aManager, aResources, aKey);
}
/* static */ nsresult SharedSurfacesChild::Share(
ImageContainer* aContainer, RenderRootStateManager* aManager,
wr::IpcResourceUpdateQueue& aResources, wr::ImageKey& aKey,
ContainerProducerID aProducerId) {
/* static */
nsresult SharedSurfacesChild::Share(ImageContainer* aContainer,
RenderRootStateManager* aManager,
wr::IpcResourceUpdateQueue& aResources,
wr::ImageKey& aKey,
ContainerProducerID aProducerId) {
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aContainer);
MOZ_ASSERT(aManager);
@ -368,8 +378,9 @@ SharedSurfacesChild::AsSourceSurfaceSharedData(SourceSurface* aSurface) {
return Share(sharedSurface, aManager, aResources, aKey);
}
/* static */ nsresult SharedSurfacesChild::Share(SourceSurface* aSurface,
wr::ExternalImageId& aId) {
/* static */
nsresult SharedSurfacesChild::Share(SourceSurface* aSurface,
wr::ExternalImageId& aId) {
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aSurface);
@ -391,9 +402,10 @@ SharedSurfacesChild::AsSourceSurfaceSharedData(SourceSurface* aSurface) {
return rv;
}
/* static */ void SharedSurfacesChild::Unshare(const wr::ExternalImageId& aId,
bool aReleaseId,
nsTArray<ImageKeyData>& aKeys) {
/* static */
void SharedSurfacesChild::Unshare(const wr::ExternalImageId& aId,
bool aReleaseId,
nsTArray<ImageKeyData>& aKeys) {
MOZ_ASSERT(NS_IsMainThread());
for (const auto& entry : aKeys) {
@ -444,9 +456,10 @@ SharedSurfacesChild::AsSourceSurfaceSharedData(SourceSurface* aSurface) {
return Some(data->Id());
}
/* static */ nsresult SharedSurfacesChild::UpdateAnimation(
ImageContainer* aContainer, SourceSurface* aSurface,
const IntRect& aDirtyRect) {
/* static */
nsresult SharedSurfacesChild::UpdateAnimation(ImageContainer* aContainer,
SourceSurface* aSurface,
const IntRect& aDirtyRect) {
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aContainer);
MOZ_ASSERT(!aContainer->IsAsync());

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

@ -32,7 +32,8 @@ SharedSurfacesParent::~SharedSurfacesParent() {
}
}
/* static */ void SharedSurfacesParent::Initialize() {
/* static */
void SharedSurfacesParent::Initialize() {
MOZ_ASSERT(NS_IsMainThread());
StaticMutexAutoLock lock(sMutex);
if (!sInstance) {
@ -40,7 +41,8 @@ SharedSurfacesParent::~SharedSurfacesParent() {
}
}
/* static */ void SharedSurfacesParent::Shutdown() {
/* static */
void SharedSurfacesParent::Shutdown() {
// The main thread should blocked on waiting for the render thread to
// complete so this should be safe to release off the main thread.
MOZ_ASSERT(wr::RenderThread::IsInRenderThread());
@ -48,7 +50,8 @@ SharedSurfacesParent::~SharedSurfacesParent() {
sInstance = nullptr;
}
/* static */ already_AddRefed<DataSourceSurface> SharedSurfacesParent::Get(
/* static */
already_AddRefed<DataSourceSurface> SharedSurfacesParent::Get(
const wr::ExternalImageId& aId) {
StaticMutexAutoLock lock(sMutex);
if (!sInstance) {
@ -60,7 +63,8 @@ SharedSurfacesParent::~SharedSurfacesParent() {
return surface.forget();
}
/* static */ already_AddRefed<DataSourceSurface> SharedSurfacesParent::Acquire(
/* static */
already_AddRefed<DataSourceSurface> SharedSurfacesParent::Acquire(
const wr::ExternalImageId& aId) {
StaticMutexAutoLock lock(sMutex);
if (!sInstance) {
@ -77,8 +81,9 @@ SharedSurfacesParent::~SharedSurfacesParent() {
return surface.forget();
}
/* static */ bool SharedSurfacesParent::Release(const wr::ExternalImageId& aId,
bool aForCreator) {
/* static */
bool SharedSurfacesParent::Release(const wr::ExternalImageId& aId,
bool aForCreator) {
StaticMutexAutoLock lock(sMutex);
if (!sInstance) {
return false;
@ -99,8 +104,9 @@ SharedSurfacesParent::~SharedSurfacesParent() {
return true;
}
/* static */ void SharedSurfacesParent::AddSameProcess(
const wr::ExternalImageId& aId, SourceSurfaceSharedData* aSurface) {
/* static */
void SharedSurfacesParent::AddSameProcess(const wr::ExternalImageId& aId,
SourceSurfaceSharedData* aSurface) {
MOZ_ASSERT(XRE_IsParentProcess());
MOZ_ASSERT(NS_IsMainThread());
StaticMutexAutoLock lock(sMutex);
@ -128,14 +134,15 @@ SharedSurfacesParent::~SharedSurfacesParent() {
sInstance->mSurfaces.Put(id, surface);
}
/* static */ void SharedSurfacesParent::RemoveSameProcess(
const wr::ExternalImageId& aId) {
/* static */
void SharedSurfacesParent::RemoveSameProcess(const wr::ExternalImageId& aId) {
MOZ_ASSERT(XRE_IsParentProcess());
MOZ_ASSERT(NS_IsMainThread());
Release(aId, /* aForCreator */ true);
}
/* static */ void SharedSurfacesParent::DestroyProcess(base::ProcessId aPid) {
/* static */
void SharedSurfacesParent::DestroyProcess(base::ProcessId aPid) {
StaticMutexAutoLock lock(sMutex);
if (!sInstance) {
return;
@ -153,9 +160,10 @@ SharedSurfacesParent::~SharedSurfacesParent() {
}
}
/* static */ void SharedSurfacesParent::Add(
const wr::ExternalImageId& aId, const SurfaceDescriptorShared& aDesc,
base::ProcessId aPid) {
/* static */
void SharedSurfacesParent::Add(const wr::ExternalImageId& aId,
const SurfaceDescriptorShared& aDesc,
base::ProcessId aPid) {
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
MOZ_ASSERT(aPid != base::GetCurrentProcId());
StaticMutexAutoLock lock(sMutex);
@ -182,12 +190,14 @@ SharedSurfacesParent::~SharedSurfacesParent() {
sInstance->mSurfaces.Put(id, surface.forget());
}
/* static */ void SharedSurfacesParent::Remove(const wr::ExternalImageId& aId) {
/* static */
void SharedSurfacesParent::Remove(const wr::ExternalImageId& aId) {
DebugOnly<bool> rv = Release(aId, /* aForCreator */ true);
MOZ_ASSERT(rv);
}
/* static */ void SharedSurfacesParent::AccumulateMemoryReport(
/* static */
void SharedSurfacesParent::AccumulateMemoryReport(
base::ProcessId aPid, SharedSurfacesMemoryReport& aReport) {
StaticMutexAutoLock lock(sMutex);
if (!sInstance) {
@ -205,7 +215,8 @@ SharedSurfacesParent::~SharedSurfacesParent() {
}
}
/* static */ bool SharedSurfacesParent::AccumulateMemoryReport(
/* static */
bool SharedSurfacesParent::AccumulateMemoryReport(
SharedSurfacesMemoryReport& aReport) {
if (XRE_IsParentProcess()) {
GPUProcessManager* gpm = GPUProcessManager::Get();

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

@ -34,7 +34,8 @@ namespace mozilla {
namespace layers {
// public:
/* static */ RefPtr<UiCompositorControllerChild>
/* static */
RefPtr<UiCompositorControllerChild>
UiCompositorControllerChild::CreateForSameProcess(
const LayersId& aRootLayerTreeId) {
RefPtr<UiCompositorControllerChild> child =
@ -48,7 +49,8 @@ UiCompositorControllerChild::CreateForSameProcess(
return child;
}
/* static */ RefPtr<UiCompositorControllerChild>
/* static */
RefPtr<UiCompositorControllerChild>
UiCompositorControllerChild::CreateForGPUProcess(
const uint64_t& aProcessToken,
Endpoint<PUiCompositorControllerChild>&& aEndpoint) {

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

@ -24,7 +24,8 @@ namespace layers {
typedef CompositorBridgeParent::LayerTreeState LayerTreeState;
/* static */ RefPtr<UiCompositorControllerParent>
/* static */
RefPtr<UiCompositorControllerParent>
UiCompositorControllerParent::GetFromRootLayerTreeId(
const LayersId& aRootLayerTreeId) {
RefPtr<UiCompositorControllerParent> controller;
@ -35,8 +36,8 @@ UiCompositorControllerParent::GetFromRootLayerTreeId(
return controller;
}
/* static */ RefPtr<UiCompositorControllerParent>
UiCompositorControllerParent::Start(
/* static */
RefPtr<UiCompositorControllerParent> UiCompositorControllerParent::Start(
const LayersId& aRootLayerTreeId,
Endpoint<PUiCompositorControllerParent>&& aEndpoint) {
RefPtr<UiCompositorControllerParent> parent =

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

@ -13,7 +13,8 @@ namespace layers {
StaticRefPtr<VideoBridgeChild> sVideoBridgeChildSingleton;
/* static */ void VideoBridgeChild::Startup() {
/* static */
void VideoBridgeChild::Startup() {
sVideoBridgeChildSingleton = new VideoBridgeChild();
RefPtr<VideoBridgeParent> parent = new VideoBridgeParent();
@ -25,7 +26,8 @@ StaticRefPtr<VideoBridgeChild> sVideoBridgeChildSingleton;
parent->SetOtherProcessId(base::GetCurrentProcId());
}
/* static */ void VideoBridgeChild::Shutdown() {
/* static */
void VideoBridgeChild::Shutdown() {
if (sVideoBridgeChildSingleton) {
sVideoBridgeChildSingleton->Close();
sVideoBridgeChildSingleton = nullptr;

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

@ -24,7 +24,8 @@ VideoBridgeParent::VideoBridgeParent() : mClosed(false) {
VideoBridgeParent::~VideoBridgeParent() { sVideoBridgeSingleton = nullptr; }
/* static */ VideoBridgeParent* VideoBridgeParent::GetSingleton() {
/* static */
VideoBridgeParent* VideoBridgeParent::GetSingleton() {
return sVideoBridgeSingleton;
}

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

@ -91,7 +91,8 @@ static IntRect GetTransformedBounds(Layer* aLayer) {
return bounds;
}
/* static */ Maybe<IntRect> ContainerLayerMLGPU::FindVisibleBounds(
/* static */
Maybe<IntRect> ContainerLayerMLGPU::FindVisibleBounds(
Layer* aLayer, const Maybe<RenderTargetIntRect>& aClip) {
AL_LOG(" visiting child %p\n", aLayer);
AL_LOG_IF(aClip, " parent clip: %s\n", Stringify(aClip.value()).c_str());

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

@ -23,7 +23,8 @@ LayerMLGPU::LayerMLGPU(LayerManagerMLGPU* aManager)
mComputedOpacity(0.0),
mPrepared(false) {}
/* static */ void LayerMLGPU::BeginFrame() { sFrameKey++; }
/* static */
void LayerMLGPU::BeginFrame() { sFrameKey++; }
LayerManagerMLGPU* LayerMLGPU::GetManager() {
return static_cast<LayerManagerMLGPU*>(mCompositorManager);

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

@ -51,8 +51,8 @@ class GLManagerCompositor : public GLManager {
RefPtr<CompositorOGL> mImpl;
};
/* static */ GLManager* GLManager::CreateGLManager(
LayerManagerComposite* aManager) {
/* static */
GLManager* GLManager::CreateGLManager(LayerManagerComposite* aManager) {
if (aManager && aManager->GetCompositor()->GetBackendType() ==
LayersBackend::LAYERS_OPENGL) {
return new GLManagerCompositor(

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

@ -154,8 +154,8 @@ void ShaderConfigOGL::SetDynamicGeometry(bool aEnabled) {
SetFeature(ENABLE_DYNAMIC_GEOMETRY, aEnabled);
}
/* static */ ProgramProfileOGL ProgramProfileOGL::GetProfileFor(
ShaderConfigOGL aConfig) {
/* static */
ProgramProfileOGL ProgramProfileOGL::GetProfileFor(ShaderConfigOGL aConfig) {
ProgramProfileOGL result;
ostringstream fs, vs;

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

@ -317,7 +317,8 @@ WebRenderBridgeParent::WebRenderBridgeParent(const wr::PipelineId& aPipelineId)
mIsFirstPaint(false),
mSkippedComposite(false) {}
/* static */ WebRenderBridgeParent* WebRenderBridgeParent::CreateDestroyed(
/* static */
WebRenderBridgeParent* WebRenderBridgeParent::CreateDestroyed(
const wr::PipelineId& aPipelineId) {
return new WebRenderBridgeParent(aPipelineId);
}

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

@ -25,7 +25,8 @@ void WebRenderBackgroundData::AddWebRenderCommands(
aBuilder.PushRect(mBounds, mBounds, true, mColor);
}
/* static */ bool WebRenderUserData::SupportsAsyncUpdate(nsIFrame* aFrame) {
/* static */
bool WebRenderUserData::SupportsAsyncUpdate(nsIFrame* aFrame) {
if (!aFrame) {
return false;
}
@ -38,7 +39,8 @@ void WebRenderBackgroundData::AddWebRenderCommands(
return false;
}
/* static */ bool WebRenderUserData::ProcessInvalidateForImage(
/* static */
bool WebRenderUserData::ProcessInvalidateForImage(
nsIFrame* aFrame, DisplayItemType aType, ContainerProducerID aProducerId) {
MOZ_ASSERT(aFrame);

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

@ -125,49 +125,48 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
}
}
/*static*/
int TiXmlBase::IsAlpha(unsigned char anyByte, TiXmlEncoding /*encoding*/) {
// This will only work for low-ascii, everything else is assumed to be a valid
// letter. I'm not sure this is the best approach, but it is quite tricky
// trying to figure out alhabetical vs. not across encoding. So take a very
// conservative approach.
/*static*/ int TiXmlBase::IsAlpha( unsigned char anyByte, TiXmlEncoding /*encoding*/ )
{
// This will only work for low-ascii, everything else is assumed to be a valid
// letter. I'm not sure this is the best approach, but it is quite tricky trying
// to figure out alhabetical vs. not across encoding. So take a very
// conservative approach.
// if ( encoding == TIXML_ENCODING_UTF8 )
// {
if ( anyByte < 127 )
return isalpha( anyByte );
else
return 1; // What else to do? The unicode set is huge...get the english ones right.
// }
// else
// {
// return isalpha( anyByte );
// }
// if ( encoding == TIXML_ENCODING_UTF8 )
// {
if (anyByte < 127)
return isalpha(anyByte);
else
return 1; // What else to do? The unicode set is huge...get the english
// ones right.
// }
// else
// {
// return isalpha( anyByte );
// }
}
/*static*/
int TiXmlBase::IsAlphaNum(unsigned char anyByte, TiXmlEncoding /*encoding*/) {
// This will only work for low-ascii, everything else is assumed to be a valid
// letter. I'm not sure this is the best approach, but it is quite tricky
// trying to figure out alhabetical vs. not across encoding. So take a very
// conservative approach.
/*static*/ int TiXmlBase::IsAlphaNum( unsigned char anyByte, TiXmlEncoding /*encoding*/ )
{
// This will only work for low-ascii, everything else is assumed to be a valid
// letter. I'm not sure this is the best approach, but it is quite tricky trying
// to figure out alhabetical vs. not across encoding. So take a very
// conservative approach.
// if ( encoding == TIXML_ENCODING_UTF8 )
// {
if ( anyByte < 127 )
return isalnum( anyByte );
else
return 1; // What else to do? The unicode set is huge...get the english ones right.
// }
// else
// {
// return isalnum( anyByte );
// }
// if ( encoding == TIXML_ENCODING_UTF8 )
// {
if (anyByte < 127)
return isalnum(anyByte);
else
return 1; // What else to do? The unicode set is huge...get the english
// ones right.
// }
// else
// {
// return isalnum( anyByte );
// }
}
class TiXmlParsingData
{
friend class TiXmlDocument;
@ -362,36 +361,33 @@ const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding )
}
#ifdef TIXML_USE_STL
/*static*/ bool TiXmlBase::StreamWhiteSpace( std::istream * in, TIXML_STRING * tag )
{
for( ;; )
{
if ( !in->good() ) return false;
/*static*/
bool TiXmlBase::StreamWhiteSpace(std::istream* in, TIXML_STRING* tag) {
for (;;) {
if (!in->good()) return false;
int c = in->peek();
// At this scope, we can't get to a document. So fail silently.
if ( !IsWhiteSpace( c ) || c <= 0 )
return true;
int c = in->peek();
// At this scope, we can't get to a document. So fail silently.
if (!IsWhiteSpace(c) || c <= 0) return true;
*tag += (char) in->get();
}
*tag += (char)in->get();
}
}
/*static*/ bool TiXmlBase::StreamTo( std::istream * in, int character, TIXML_STRING * tag )
{
//assert( character > 0 && character < 128 ); // else it won't work in utf-8
while ( in->good() )
{
int c = in->peek();
if ( c == character )
return true;
if ( c <= 0 ) // Silent failure: can't get document at this scope
return false;
/*static*/
bool TiXmlBase::StreamTo(std::istream* in, int character, TIXML_STRING* tag) {
// assert( character > 0 && character < 128 ); // else it won't work in
// utf-8
while (in->good()) {
int c = in->peek();
if (c == character) return true;
if (c <= 0) // Silent failure: can't get document at this scope
return false;
in->get();
*tag += (char) c;
}
return false;
in->get();
*tag += (char)c;
}
return false;
}
#endif

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

@ -1126,23 +1126,25 @@ void SkImageFilterLight::flattenLight(SkWriteBuffer& buffer) const {
this->onFlattenLight(buffer);
}
/*static*/ SkImageFilterLight* SkImageFilterLight::UnflattenLight(SkReadBuffer& buffer) {
SkImageFilterLight::LightType type = buffer.read32LE(SkImageFilterLight::kLast_LightType);
/*static*/
SkImageFilterLight* SkImageFilterLight::UnflattenLight(SkReadBuffer& buffer) {
SkImageFilterLight::LightType type =
buffer.read32LE(SkImageFilterLight::kLast_LightType);
switch (type) {
// Each of these constructors must first call SkLight's, so we'll read the baseclass
// then subclass, same order as flattenLight.
case SkImageFilterLight::kDistant_LightType:
return new SkDistantLight(buffer);
case SkImageFilterLight::kPoint_LightType:
return new SkPointLight(buffer);
case SkImageFilterLight::kSpot_LightType:
return new SkSpotLight(buffer);
default:
// Should never get here due to prior check of SkSafeRange
SkDEBUGFAIL("Unknown LightType.");
return nullptr;
}
switch (type) {
// Each of these constructors must first call SkLight's, so we'll read the
// baseclass then subclass, same order as flattenLight.
case SkImageFilterLight::kDistant_LightType:
return new SkDistantLight(buffer);
case SkImageFilterLight::kPoint_LightType:
return new SkPointLight(buffer);
case SkImageFilterLight::kSpot_LightType:
return new SkSpotLight(buffer);
default:
// Should never get here due to prior check of SkSafeRange
SkDEBUGFAIL("Unknown LightType.");
return nullptr;
}
}
///////////////////////////////////////////////////////////////////////////////

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

@ -1962,60 +1962,53 @@ bool SkTypeface_FreeType::Scanner::GetAxes(FT_Face face, AxisDefinitions* axes)
return true;
}
/*static*/ void SkTypeface_FreeType::Scanner::computeAxisValues(
/*static*/
void SkTypeface_FreeType::Scanner::computeAxisValues(
AxisDefinitions axisDefinitions,
const SkFontArguments::VariationPosition position,
SkFixed* axisValues,
const SkString& name)
{
for (int i = 0; i < axisDefinitions.count(); ++i) {
const Scanner::AxisDefinition& axisDefinition = axisDefinitions[i];
const SkScalar axisMin = SkFixedToScalar(axisDefinition.fMinimum);
const SkScalar axisMax = SkFixedToScalar(axisDefinition.fMaximum);
axisValues[i] = axisDefinition.fDefault;
// The position may be over specified. If there are multiple values for a given axis,
// use the last one since that's what css-fonts-4 requires.
for (int j = position.coordinateCount; j --> 0;) {
const auto& coordinate = position.coordinates[j];
if (axisDefinition.fTag == coordinate.axis) {
const SkScalar axisValue = SkTPin(coordinate.value, axisMin, axisMax);
if (coordinate.value != axisValue) {
SkDEBUGF("Requested font axis value out of range: "
"%s '%c%c%c%c' %f; pinned to %f.\n",
name.c_str(),
(axisDefinition.fTag >> 24) & 0xFF,
(axisDefinition.fTag >> 16) & 0xFF,
(axisDefinition.fTag >> 8) & 0xFF,
(axisDefinition.fTag ) & 0xFF,
SkScalarToDouble(coordinate.value),
SkScalarToDouble(axisValue));
}
axisValues[i] = SkScalarToFixed(axisValue);
break;
}
const SkFontArguments::VariationPosition position, SkFixed* axisValues,
const SkString& name) {
for (int i = 0; i < axisDefinitions.count(); ++i) {
const Scanner::AxisDefinition& axisDefinition = axisDefinitions[i];
const SkScalar axisMin = SkFixedToScalar(axisDefinition.fMinimum);
const SkScalar axisMax = SkFixedToScalar(axisDefinition.fMaximum);
axisValues[i] = axisDefinition.fDefault;
// The position may be over specified. If there are multiple values for a
// given axis, use the last one since that's what css-fonts-4 requires.
for (int j = position.coordinateCount; j-- > 0;) {
const auto& coordinate = position.coordinates[j];
if (axisDefinition.fTag == coordinate.axis) {
const SkScalar axisValue = SkTPin(coordinate.value, axisMin, axisMax);
if (coordinate.value != axisValue) {
SkDEBUGF(
"Requested font axis value out of range: "
"%s '%c%c%c%c' %f; pinned to %f.\n",
name.c_str(), (axisDefinition.fTag >> 24) & 0xFF,
(axisDefinition.fTag >> 16) & 0xFF,
(axisDefinition.fTag >> 8) & 0xFF, (axisDefinition.fTag) & 0xFF,
SkScalarToDouble(coordinate.value), SkScalarToDouble(axisValue));
}
// TODO: warn on defaulted axis?
axisValues[i] = SkScalarToFixed(axisValue);
break;
}
}
// TODO: warn on defaulted axis?
}
SkDEBUGCODE(
// Check for axis specified, but not matched in font.
for (int i = 0; i < position.coordinateCount; ++i) {
SkFourByteTag skTag = position.coordinates[i].axis;
bool found = false;
for (int j = 0; j < axisDefinitions.count(); ++j) {
if (skTag == axisDefinitions[j].fTag) {
found = true;
break;
}
}
if (!found) {
SkDEBUGF("Requested font axis not found: %s '%c%c%c%c'\n",
name.c_str(),
(skTag >> 24) & 0xFF,
(skTag >> 16) & 0xFF,
(skTag >> 8) & 0xFF,
(skTag) & 0xFF);
}
SkDEBUGCODE(
// Check for axis specified, but not matched in font.
for (int i = 0; i < position.coordinateCount; ++i) {
SkFourByteTag skTag = position.coordinates[i].axis;
bool found = false;
for (int j = 0; j < axisDefinitions.count(); ++j) {
if (skTag == axisDefinitions[j].fTag) {
found = true;
break;
}
}
)
if (!found) {
SkDEBUGF("Requested font axis not found: %s '%c%c%c%c'\n",
name.c_str(), (skTag >> 24) & 0xFF, (skTag >> 16) & 0xFF,
(skTag >> 8) & 0xFF, (skTag)&0xFF);
}
})
}

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

@ -1482,7 +1482,8 @@ static nsIntRegion ResultChangeRegionForPrimitive(
PrimitiveAttributesMatcher(aDescription, aInputChangeRegions));
}
/* static */ nsIntRegion FilterSupport::ComputeResultChangeRegion(
/* static */
nsIntRegion FilterSupport::ComputeResultChangeRegion(
const FilterDescription& aFilter, const nsIntRegion& aSourceGraphicChange,
const nsIntRegion& aFillPaintChange,
const nsIntRegion& aStrokePaintChange) {
@ -1692,7 +1693,8 @@ nsIntRegion FilterSupport::PostFilterExtentsForPrimitive(
PrimitiveAttributesMatcher(aDescription, aInputExtents));
}
/* static */ nsIntRegion FilterSupport::ComputePostFilterExtents(
/* static */
nsIntRegion FilterSupport::ComputePostFilterExtents(
const FilterDescription& aFilter,
const nsIntRegion& aSourceGraphicExtents) {
const nsTArray<FilterPrimitiveDescription>& primitives = aFilter.mPrimitives;
@ -1858,7 +1860,8 @@ static nsIntRegion SourceNeededRegionForPrimitive(
aDescription, aResultNeededRegion, aInputIndex));
}
/* static */ void FilterSupport::ComputeSourceNeededRegions(
/* static */
void FilterSupport::ComputeSourceNeededRegions(
const FilterDescription& aFilter, const nsIntRegion& aResultNeededRegion,
nsIntRegion& aSourceGraphicNeededRegion,
nsIntRegion& aFillPaintNeededRegion,

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

@ -25,8 +25,8 @@ namespace gfx {
using namespace mozilla::widget;
using mozilla::layers::AutoTextureLock;
/* static */ bool D3D11Checks::DoesRenderTargetViewNeedRecreating(
ID3D11Device* aDevice) {
/* static */
bool D3D11Checks::DoesRenderTargetViewNeedRecreating(ID3D11Device* aDevice) {
bool result = false;
// CreateTexture2D is known to crash on lower feature levels, see bugs
// 1170211 and 1089413.
@ -131,7 +131,8 @@ using mozilla::layers::AutoTextureLock;
return result;
}
/* static */ bool D3D11Checks::DoesDeviceWork() {
/* static */
bool D3D11Checks::DoesDeviceWork() {
static bool checked = false;
static bool result = false;
@ -361,20 +362,21 @@ static bool DoesTextureSharingWorkInternal(ID3D11Device* device,
return true;
}
/* static */ bool D3D11Checks::DoesTextureSharingWork(ID3D11Device* device) {
/* static */
bool D3D11Checks::DoesTextureSharingWork(ID3D11Device* device) {
return DoesTextureSharingWorkInternal(
device, DXGI_FORMAT_B8G8R8A8_UNORM,
D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE);
}
/* static */ bool D3D11Checks::DoesAlphaTextureSharingWork(
ID3D11Device* device) {
/* static */
bool D3D11Checks::DoesAlphaTextureSharingWork(ID3D11Device* device) {
return DoesTextureSharingWorkInternal(device, DXGI_FORMAT_R8_UNORM,
D3D11_BIND_SHADER_RESOURCE);
}
/* static */ bool D3D11Checks::GetDxgiDesc(ID3D11Device* device,
DXGI_ADAPTER_DESC* out) {
/* static */
bool D3D11Checks::GetDxgiDesc(ID3D11Device* device, DXGI_ADAPTER_DESC* out) {
RefPtr<IDXGIDevice> dxgiDevice;
HRESULT hr =
device->QueryInterface(__uuidof(IDXGIDevice), getter_AddRefs(dxgiDevice));
@ -390,7 +392,8 @@ static bool DoesTextureSharingWorkInternal(ID3D11Device* device,
return SUCCEEDED(dxgiAdapter->GetDesc(out));
}
/* static */ void D3D11Checks::WarnOnAdapterMismatch(ID3D11Device* device) {
/* static */
void D3D11Checks::WarnOnAdapterMismatch(ID3D11Device* device) {
DXGI_ADAPTER_DESC desc;
PodZero(&desc);
GetDxgiDesc(device, &desc);
@ -406,7 +409,8 @@ static bool DoesTextureSharingWorkInternal(ID3D11Device* device,
}
}
/* static */ bool D3D11Checks::DoesRemotePresentWork(IDXGIAdapter* adapter) {
/* static */
bool D3D11Checks::DoesRemotePresentWork(IDXGIAdapter* adapter) {
// Remote presentation was added in DXGI 1.2, for Windows 8 and the Platform
// Update to Windows 7.
RefPtr<IDXGIAdapter2> check;

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

@ -55,9 +55,11 @@ PFN_DCOMPOSITION_CREATE_DEVICE sDcompCreateDeviceFn = nullptr;
// be used within InitializeDirectDrawConfig.
decltype(DirectDrawCreateEx)* sDirectDrawCreateExFn = nullptr;
/* static */ void DeviceManagerDx::Init() { sInstance = new DeviceManagerDx(); }
/* static */
void DeviceManagerDx::Init() { sInstance = new DeviceManagerDx(); }
/* static */ void DeviceManagerDx::Shutdown() { sInstance = nullptr; }
/* static */
void DeviceManagerDx::Shutdown() { sInstance = nullptr; }
DeviceManagerDx::DeviceManagerDx()
: mDeviceLock("gfxWindowsPlatform.mDeviceLock"),
@ -1244,7 +1246,8 @@ void DeviceManagerDx::GetCompositorDevices(
*aOutAttachments = attachments;
}
/* static */ void DeviceManagerDx::PreloadAttachmentsOnCompositorThread() {
/* static */
void DeviceManagerDx::PreloadAttachmentsOnCompositorThread() {
MessageLoop* loop = layers::CompositorThreadHolder::Loop();
if (!loop) {
return;

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

@ -163,9 +163,9 @@ void PrintTarget::AdjustPrintJobNameForIPP(const nsAString& aJobName,
CopyUTF8toUTF16(jobName, aAdjustedJobName);
}
/* static */ already_AddRefed<DrawTarget>
PrintTarget::CreateWrapAndRecordDrawTarget(DrawEventRecorder* aRecorder,
DrawTarget* aDrawTarget) {
/* static */
already_AddRefed<DrawTarget> PrintTarget::CreateWrapAndRecordDrawTarget(
DrawEventRecorder* aRecorder, DrawTarget* aDrawTarget) {
MOZ_ASSERT(aRecorder);
MOZ_ASSERT(aDrawTarget);

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

@ -41,7 +41,8 @@ PrintTargetPDF::~PrintTargetPDF() {
Finish();
}
/* static */ already_AddRefed<PrintTargetPDF> PrintTargetPDF::CreateOrNull(
/* static */
already_AddRefed<PrintTargetPDF> PrintTargetPDF::CreateOrNull(
nsIOutputStream* aStream, const IntSize& aSizeInPoints) {
cairo_surface_t* surface = cairo_pdf_surface_create_for_stream(
write_func, (void*)aStream, aSizeInPoints.width, aSizeInPoints.height);

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

@ -44,7 +44,8 @@ PrintTargetPS::~PrintTargetPS() {
Finish();
}
/* static */ already_AddRefed<PrintTargetPS> PrintTargetPS::CreateOrNull(
/* static */
already_AddRefed<PrintTargetPS> PrintTargetPS::CreateOrNull(
nsIOutputStream* aStream, IntSize aSizeInPoints,
PageOrientation aOrientation) {
// The PS output does not specify the page size so to print landscape we need

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

@ -16,8 +16,9 @@ PrintTargetRecording::PrintTargetRecording(cairo_surface_t* aCairoSurface,
const IntSize& aSize)
: PrintTarget(aCairoSurface, aSize) {}
/* static */ already_AddRefed<PrintTargetRecording>
PrintTargetRecording::CreateOrNull(const IntSize& aSize) {
/* static */
already_AddRefed<PrintTargetRecording> PrintTargetRecording::CreateOrNull(
const IntSize& aSize) {
if (!Factory::CheckSurfaceSize(aSize)) {
return nullptr;
}

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

@ -29,7 +29,8 @@ PrintTargetSkPDF::~PrintTargetSkPDF() {
mRefPDFDoc = nullptr;
}
/* static */ already_AddRefed<PrintTargetSkPDF> PrintTargetSkPDF::CreateOrNull(
/* static */
already_AddRefed<PrintTargetSkPDF> PrintTargetSkPDF::CreateOrNull(
UniquePtr<SkWStream> aStream, const IntSize& aSizeInPoints) {
return do_AddRef(new PrintTargetSkPDF(aSizeInPoints, std::move(aStream)));
}

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

@ -12,8 +12,9 @@
namespace mozilla {
namespace gfx {
/* static */ already_AddRefed<PrintTargetThebes>
PrintTargetThebes::CreateOrNull(gfxASurface* aSurface) {
/* static */
already_AddRefed<PrintTargetThebes> PrintTargetThebes::CreateOrNull(
gfxASurface* aSurface) {
MOZ_ASSERT(aSurface);
if (!aSurface || aSurface->CairoStatus()) {

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

@ -20,8 +20,8 @@ PrintTargetWindows::PrintTargetWindows(cairo_surface_t* aCairoSurface,
// 4 * mSize.width * mSize.height + sizeof(PrintTargetWindows) ?
}
/* static */ already_AddRefed<PrintTargetWindows>
PrintTargetWindows::CreateOrNull(HDC aDC) {
/* static */
already_AddRefed<PrintTargetWindows> PrintTargetWindows::CreateOrNull(HDC aDC) {
// Figure out the paper size, the actual surface size will be the printable
// area which is likely smaller, but the size here is later used to create the
// draw target where the full page size is needed.

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

@ -480,7 +480,8 @@ size_t gfxASurface::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
}
/* static */ uint8_t gfxASurface::BytesPerPixel(gfxImageFormat aImageFormat) {
/* static */
uint8_t gfxASurface::BytesPerPixel(gfxImageFormat aImageFormat) {
switch (aImageFormat) {
case SurfaceFormat::A8R8G8B8_UINT32:
return 4;

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

@ -10,8 +10,9 @@
#define MOZILLA_SSE_INCLUDE_HEADER_FOR_SSE2
#include "mozilla/SSE.h"
/* static */ bool gfxAlphaRecovery::RecoverAlpha(
gfxImageSurface* blackSurf, const gfxImageSurface* whiteSurf) {
/* static */
bool gfxAlphaRecovery::RecoverAlpha(gfxImageSurface* blackSurf,
const gfxImageSurface* whiteSurf) {
mozilla::gfx::IntSize size = blackSurf->GetSize();
if (size != whiteSurf->GetSize() ||

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

@ -874,11 +874,14 @@ static void DrawMirroredMinBoxShadow(
* the space between the corners.
*/
/* static */ void gfxAlphaBoxBlur::BlurRectangle(
gfxContext* aDestinationCtx, const gfxRect& aRect,
const RectCornerRadii* aCornerRadii, const gfxPoint& aBlurStdDev,
const Color& aShadowColor, const gfxRect& aDirtyRect,
const gfxRect& aSkipRect) {
/* static */
void gfxAlphaBoxBlur::BlurRectangle(gfxContext* aDestinationCtx,
const gfxRect& aRect,
const RectCornerRadii* aCornerRadii,
const gfxPoint& aBlurStdDev,
const Color& aShadowColor,
const gfxRect& aDirtyRect,
const gfxRect& aSkipRect) {
if (!RectIsInt32Safe(ToRect(aRect))) {
return;
}

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

@ -66,7 +66,8 @@ gfxContext::gfxContext(DrawTarget* aTarget, const Point& aDeviceOffset)
mDT->SetTransform(GetDTTransform());
}
/* static */ already_AddRefed<gfxContext> gfxContext::CreateOrNull(
/* static */
already_AddRefed<gfxContext> gfxContext::CreateOrNull(
DrawTarget* aTarget, const mozilla::gfx::Point& aDeviceOffset) {
if (!aTarget || !aTarget->IsValid()) {
gfxCriticalNote << "Invalid target in gfxContext::CreateOrNull "
@ -78,8 +79,9 @@ gfxContext::gfxContext(DrawTarget* aTarget, const Point& aDeviceOffset)
return result.forget();
}
/* static */ already_AddRefed<gfxContext>
gfxContext::CreatePreservingTransformOrNull(DrawTarget* aTarget) {
/* static */
already_AddRefed<gfxContext> gfxContext::CreatePreservingTransformOrNull(
DrawTarget* aTarget) {
if (!aTarget || !aTarget->IsValid()) {
gfxCriticalNote
<< "Invalid target in gfxContext::CreatePreservingTransformOrNull "

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

@ -2039,7 +2039,8 @@ void gfxFcPlatformFontList::ClearLangGroupPrefFonts() {
mAlwaysUseFontconfigGenerics = PrefFontListsUseOnlyGenerics();
}
/* static */ FT_Library gfxFcPlatformFontList::GetFTLibrary() {
/* static */
FT_Library gfxFcPlatformFontList::GetFTLibrary() {
if (!sCairoFTLibrary) {
// Use cairo's FT_Library so that cairo takes care of shutdown of the
// FT_Library after it has destroyed its font_faces, and FT_Done_Face
@ -2205,8 +2206,8 @@ bool gfxFcPlatformFontList::PrefFontListsUseOnlyGenerics() {
return prefFontsUseOnlyGenerics;
}
/* static */ void gfxFcPlatformFontList::CheckFontUpdates(nsITimer* aTimer,
void* aThis) {
/* static */
void gfxFcPlatformFontList::CheckFontUpdates(nsITimer* aTimer, void* aThis) {
// A content process is not supposed to check this directly;
// it will be notified by the parent when the font list changes.
MOZ_ASSERT(XRE_IsParentProcess());

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

@ -411,7 +411,8 @@ static void LookupAlternateValues(gfxFontFeatureValueSet* featureLookup,
}
}
/* static */ void gfxFontShaper::MergeFontFeatures(
/* static */
void gfxFontShaper::MergeFontFeatures(
const gfxFontStyle* aStyle, const nsTArray<gfxFontFeature>& aFontFeatures,
bool aDisableLigatures, const nsACString& aFamilyName, bool aAddSmallCaps,
void (*aHandleFeature)(const uint32_t&, uint32_t&, void*),
@ -3308,7 +3309,8 @@ static void DestroyRefCairo(void* aData) {
cairo_destroy(refCairo);
}
/* static */ cairo_t* gfxFont::RefCairo(DrawTarget* aDT) {
/* static */
cairo_t* gfxFont::RefCairo(DrawTarget* aDT) {
// DrawTargets that don't use a Cairo backend can be given a 1x1 "reference"
// |cairo_t*|, stored in the DrawTarget's user data, for doing font-related
// operations.
@ -3990,10 +3992,10 @@ bool gfxFont::TryGetMathTable() {
return !!mMathTable;
}
/* static */ void SharedFontList::Initialize() {
sEmpty = new SharedFontList();
}
/* static */
void SharedFontList::Initialize() { sEmpty = new SharedFontList(); }
/* static */ void SharedFontList::Shutdown() { sEmpty = nullptr; }
/* static */
void SharedFontList::Shutdown() { sEmpty = nullptr; }
StaticRefPtr<SharedFontList> SharedFontList::sEmpty;

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

@ -471,7 +471,8 @@ void gfxFontEntry::FontTableHashEntry::Clear() {
// a hb_destroy_func for hb_blob_create
/* static */ void gfxFontEntry::FontTableHashEntry::DeleteFontTableBlobData(
/* static */
void gfxFontEntry::FontTableHashEntry::DeleteFontTableBlobData(
void* aBlobData) {
delete static_cast<FontTableBlobData*>(aBlobData);
}
@ -542,8 +543,9 @@ hb_blob_t* gfxFontEntry::GetFontTable(uint32_t aTag) {
// callback for HarfBuzz to get a font table (in hb_blob_t form)
// from the font entry (passed as aUserData)
/*static*/ hb_blob_t* gfxFontEntry::HBGetTable(hb_face_t* face, uint32_t aTag,
void* aUserData) {
/*static*/
hb_blob_t* gfxFontEntry::HBGetTable(hb_face_t* face, uint32_t aTag,
void* aUserData) {
gfxFontEntry* fontEntry = static_cast<gfxFontEntry*>(aUserData);
// bug 589682 - ignore the GDEF table in buggy fonts (applies to
@ -561,7 +563,8 @@ hb_blob_t* gfxFontEntry::GetFontTable(uint32_t aTag) {
return fontEntry->GetFontTable(aTag);
}
/*static*/ void gfxFontEntry::HBFaceDeletedCallback(void* aUserData) {
/*static*/
void gfxFontEntry::HBFaceDeletedCallback(void* aUserData) {
gfxFontEntry* fe = static_cast<gfxFontEntry*>(aUserData);
fe->ForgetHBFace();
}
@ -594,8 +597,9 @@ hb_face_t* gfxFontEntry::GetHBFace() {
return nullptr;
}
/*static*/ void gfxFontEntry::GrReleaseTable(const void* aAppFaceHandle,
const void* aTableBuffer) {
/*static*/
void gfxFontEntry::GrReleaseTable(const void* aAppFaceHandle,
const void* aTableBuffer) {
gfxFontEntry* fontEntry =
static_cast<gfxFontEntry*>(const_cast<void*>(aAppFaceHandle));
void* value;
@ -1789,7 +1793,8 @@ gfxFontFamily::~gfxFontFamily() {
MOZ_ASSERT(NS_IsMainThread());
}
/*static*/ void gfxFontFamily::ReadOtherFamilyNamesForFace(
/*static*/
void gfxFontFamily::ReadOtherFamilyNamesForFace(
const nsACString& aFamilyName, const char* aNameData, uint32_t aDataLength,
nsTArray<nsCString>& aOtherFamilyNames, bool useFullName) {
const gfxFontUtils::NameHeader* nameHeader =

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

@ -43,8 +43,9 @@ gfxGraphiteShaper::~gfxGraphiteShaper() {
mFont->GetFontEntry()->ReleaseGrFace(mGrFace);
}
/*static*/ float gfxGraphiteShaper::GrGetAdvance(const void *appFontHandle,
uint16_t glyphid) {
/*static*/
float gfxGraphiteShaper::GrGetAdvance(const void *appFontHandle,
uint16_t glyphid) {
const CallbackData *cb = static_cast<const CallbackData *>(appFontHandle);
return FixedToFloat(cb->mFont->GetGlyphWidth(glyphid));
}
@ -346,8 +347,8 @@ nsresult gfxGraphiteShaper::SetGlyphsFromSegment(
nsTHashtable<nsUint32HashKey> *gfxGraphiteShaper::sLanguageTags;
/*static*/ uint32_t gfxGraphiteShaper::GetGraphiteTagForLang(
const nsCString &aLang) {
/*static*/
uint32_t gfxGraphiteShaper::GetGraphiteTagForLang(const nsCString &aLang) {
int len = aLang.Length();
if (len < 2) {
return 0;
@ -395,7 +396,8 @@ nsTHashtable<nsUint32HashKey> *gfxGraphiteShaper::sLanguageTags;
return 0;
}
/*static*/ void gfxGraphiteShaper::Shutdown() {
/*static*/
void gfxGraphiteShaper::Shutdown() {
#ifdef NS_FREE_PERMANENT_DATA
if (sLanguageTags) {
sLanguageTags->Clear();

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

@ -151,8 +151,9 @@ gfxImageSurface::~gfxImageSurface() {
if (mOwnsData) free(mData);
}
/*static*/ long gfxImageSurface::ComputeStride(const IntSize& aSize,
gfxImageFormat aFormat) {
/*static*/
long gfxImageSurface::ComputeStride(const IntSize& aSize,
gfxImageFormat aFormat) {
long stride;
if (aFormat == SurfaceFormat::A8R8G8B8_UINT32)

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше