Bug 1898238 - Don't call TexTypeForWebgl when initializing offscreen canvas. r=aosmond,jgilbert
This is only used if the OffscreenCanvas has a webgl context, in which case it forwards the tex type to WebGLContext::PresentFrontBuffer(). A later patch in this series will make TexTypeForWebgl() return a different value depending on whether the webgl context is in-process or remote, which is something that cannot be known when the OffscreenCanvas is initialized. This patch therefore removes the field from OffscreenCanvas and makes WebGLContext::PresentFrontBuffer() call TexTypeForWebgl() itself. Differential Revision: https://phabricator.services.mozilla.com/D211289
This commit is contained in:
@@ -587,8 +587,9 @@ Maybe<layers::SurfaceDescriptor> ClientWebGLContext::GetFrontBuffer(
|
||||
}
|
||||
|
||||
Maybe<layers::SurfaceDescriptor> ClientWebGLContext::PresentFrontBuffer(
|
||||
WebGLFramebufferJS* const fb, const layers::TextureType type, bool webvr) {
|
||||
Present(fb, type, webvr);
|
||||
WebGLFramebufferJS* const fb, bool webvr) {
|
||||
const auto texType = GetTexTypeForSwapChain();
|
||||
Present(fb, texType, webvr);
|
||||
return GetFrontBuffer(fb, webvr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user