/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
if (provider) {
ss = provider->BorrowSnapshot();
} if (!ss) {
provider = nullptr;
ss = context->GetFrontBufferSnapshot(requireAlphaPremult);
} if (!ss) return nullptr;
switch (layersBackend) { case LayersBackend::LAYERS_LAST:
MOZ_CRASH("Unexpected LayersBackend::LAYERS_LAST");
case LayersBackend::LAYERS_NONE: return TextureType::Unknown;
case LayersBackend::LAYERS_WR: break;
}
if (kIsWindows) { if (knowsCompositor->SupportsD3D11()) { return TextureType::D3D11;
}
} if (kIsMacOS) { return TextureType::MacIOSurface;
}
#ifdef MOZ_WIDGET_GTK if (kIsLinux) { if (!knowsCompositor->UsingSoftwareWebRender() &&
widget::DMABufDevice::IsDMABufWebGLEnabled()) { return TextureType::DMABUF;
}
} #endif
if (kIsAndroid) { // EGLimages cannot be shared cross-process, so only use if webgl is // out-of-process. if (aIsWebglOop && StaticPrefs::webgl_enable_egl_image()) { return TextureType::EGLImage;
} if (gfx::gfxVars::UseAHardwareBufferSharedSurfaceWebglOop()) { return TextureType::AndroidHardwareBuffer;
} if (StaticPrefs::webgl_enable_surface_texture()) { return TextureType::AndroidNativeWindow;
}
}
return TextureType::Unknown;
}
} // namespace layers
} // namespace mozilla
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.