зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1608500 - Set SurfaceTexture factory into the VR GLScreenBuffer. r=jgilbert
The VR ScreenBuffer is created with the default SurfaceFactory_Basic. We need to morph the screen to use the correct SurfaceTexture factory. Differential Revision: https://phabricator.services.mozilla.com/D60007 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
45330c2c4e
Коммит
acf609f3d9
|
@ -1698,6 +1698,15 @@ RefPtr<layers::SharedSurfaceTextureClient> WebGLContext::GetVRFrame() {
|
|||
if (!vrScreen) {
|
||||
auto caps = gl->Screen()->mCaps;
|
||||
vrScreen = gl::GLScreenBuffer::Create(gl, gfx::IntSize(1, 1), caps);
|
||||
RefPtr<layers::ImageBridgeChild> imageBridge =
|
||||
layers::ImageBridgeChild::GetSingleton();
|
||||
if (imageBridge) {
|
||||
layers::TextureFlags flags = layers::TextureFlags::ORIGIN_BOTTOM_LEFT;
|
||||
UniquePtr<gl::SurfaceFactory> factory =
|
||||
gl::GLScreenBuffer::CreateFactory(gl, caps, imageBridge.get(),
|
||||
flags);
|
||||
vrScreen->Morph(std::move(factory));
|
||||
}
|
||||
}
|
||||
MOZ_ASSERT(vrScreen);
|
||||
|
||||
|
@ -1807,7 +1816,8 @@ bool ClientWebGLContext::IsXRCompatible() const {
|
|||
return options.xrCompatible;
|
||||
}
|
||||
|
||||
already_AddRefed<dom::Promise> ClientWebGLContext::MakeXRCompatible(ErrorResult& aRv) {
|
||||
already_AddRefed<dom::Promise> ClientWebGLContext::MakeXRCompatible(
|
||||
ErrorResult& aRv) {
|
||||
const FuncScope funcScope(*this, "MakeXRCompatible");
|
||||
nsCOMPtr<nsIGlobalObject> global;
|
||||
// TODO: Bug 1596921
|
||||
|
|
Загрузка…
Ссылка в новой задаче