Title: [279308] trunk/Source/WebCore
- Revision
- 279308
- Author
- [email protected]
- Date
- 2021-06-26 17:48:56 -0700 (Sat, 26 Jun 2021)
Log Message
Build fix for iOS Simulator. MTLSharedTexture is not available
on that configuration.
* Modules/webxr/WebXROpaqueFramebuffer.cpp:
(WebCore::WebXROpaqueFramebuffer::startFrame):
(WebCore::WebXROpaqueFramebuffer::endFrame):
* platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
* platform/graphics/opengl/GraphicsContextGLOpenGL.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (279307 => 279308)
--- trunk/Source/WebCore/ChangeLog 2021-06-26 05:10:33 UTC (rev 279307)
+++ trunk/Source/WebCore/ChangeLog 2021-06-27 00:48:56 UTC (rev 279308)
@@ -1,3 +1,14 @@
+2021-06-26 Dean Jackson <[email protected]>
+
+ Build fix for iOS Simulator. MTLSharedTexture is not available
+ on that configuration.
+
+ * Modules/webxr/WebXROpaqueFramebuffer.cpp:
+ (WebCore::WebXROpaqueFramebuffer::startFrame):
+ (WebCore::WebXROpaqueFramebuffer::endFrame):
+ * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
+ * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
+
2021-06-25 Alan Bujtas <[email protected]>
[LFC][TFC] Remove redundant struct ResolvedItem
Modified: trunk/Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp (279307 => 279308)
--- trunk/Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp 2021-06-26 05:10:33 UTC (rev 279307)
+++ trunk/Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp 2021-06-27 00:48:56 UTC (rev 279308)
@@ -137,8 +137,12 @@
// Tell the GraphicsContextGL to use the IOSurface as the backing store for m_opaqueTexture.
if (data.isShared) {
+#if !PLATFORM(IOS_FAMILY_SIMULATOR)
m_ioSurfaceTextureHandle = gCGL->attachIOSurfaceToSharedTexture(textureTarget, data.surface.get());
m_ioSurfaceTextureHandleIsShared = true;
+#else
+ ASSERT_NOT_REACHED();
+#endif
} else {
auto size = data.surface->size();
if (!size.width() || !size.height())
@@ -195,9 +199,13 @@
if (m_ioSurfaceTextureHandle) {
auto gCGL = static_cast<GraphicsContextGLOpenGL*>(&gl);
- if (m_ioSurfaceTextureHandleIsShared)
+ if (m_ioSurfaceTextureHandleIsShared) {
+#if !PLATFORM(IOS_FAMILY_SIMULATOR)
gCGL->detachIOSurfaceFromSharedTexture(m_ioSurfaceTextureHandle);
- else
+#else
+ ASSERT_NOT_REACHED();
+#endif
+ } else
gCGL->destroyPbufferAndDetachIOSurface(m_ioSurfaceTextureHandle);
m_ioSurfaceTextureHandle = nullptr;
m_ioSurfaceTextureHandleIsShared = false;
Modified: trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm (279307 => 279308)
--- trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm 2021-06-26 05:10:33 UTC (rev 279307)
+++ trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm 2021-06-27 00:48:56 UTC (rev 279308)
@@ -694,6 +694,7 @@
EGL_DestroySurface(display, handle);
}
+#if !PLATFORM(IOS_FAMILY_SIMULATOR)
void* GraphicsContextGLOpenGL::attachIOSurfaceToSharedTexture(GCGLenum target, IOSurface* surface)
{
constexpr EGLint emptyAttributes[] = { EGL_NONE };
@@ -739,6 +740,7 @@
auto display = platformDisplay();
EGL_DestroyImageKHR(display, handle);
}
+#endif
bool GraphicsContextGLOpenGL::isGLES2Compliant() const
{
Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h (279307 => 279308)
--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h 2021-06-26 05:10:33 UTC (rev 279307)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h 2021-06-27 00:48:56 UTC (rev 279308)
@@ -536,9 +536,11 @@
// detach call below.
void* createPbufferAndAttachIOSurface(GCGLenum target, PbufferAttachmentUsage, GCGLenum internalFormat, GCGLsizei width, GCGLsizei height, GCGLenum type, IOSurfaceRef, GCGLuint plane);
void destroyPbufferAndDetachIOSurface(void* handle);
+#if !PLATFORM(IOS_FAMILY_SIMULATOR)
void* attachIOSurfaceToSharedTexture(GCGLenum target, IOSurface*);
void detachIOSurfaceFromSharedTexture(void* handle);
#endif
+#endif
private:
#if PLATFORM(COCOA)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes