Diff
Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp (295283 => 295284)
--- trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp 2022-06-06 13:11:21 UTC (rev 295283)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp 2022-06-06 13:42:16 UTC (rev 295284)
@@ -363,6 +363,15 @@
m_context->multiDrawElementsInstancedANGLE(mode, GCGLSpanTuple { counts.data(), offsets, instanceCounts.data(), counts.size() }, type);
}
+void RemoteGraphicsContextGL::paintRenderingResultsToPixelBuffer(CompletionHandler<void(std::optional<IPC::PixelBufferReference>&&)>&& completionHandler)
+{
+ std::optional<IPC::PixelBufferReference> returnValue;
+ assertIsCurrent(workQueue());
+ if (auto pixelBuffer = m_context->paintRenderingResultsToPixelBuffer())
+ returnValue = pixelBuffer.releaseNonNull();
+ completionHandler(WTFMove(returnValue));
+}
+
} // namespace WebKit
#endif
Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h (295283 => 295284)
--- trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h 2022-06-06 13:11:21 UTC (rev 295283)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h 2022-06-06 13:42:16 UTC (rev 295284)
@@ -136,6 +136,7 @@
void multiDrawArraysInstancedANGLE(uint32_t mode, IPC::ArrayReferenceTuple<int32_t, int32_t, int32_t>&& firstsCountsAndInstanceCounts);
void multiDrawElementsANGLE(uint32_t mode, IPC::ArrayReferenceTuple<int32_t, int32_t>&& countsAndOffsets, uint32_t type);
void multiDrawElementsInstancedANGLE(uint32_t mode, IPC::ArrayReferenceTuple<int32_t, int32_t, int32_t>&& countsOffsetsAndInstanceCounts, uint32_t type);
+ void paintRenderingResultsToPixelBuffer(CompletionHandler<void(std::optional<IPC::PixelBufferReference>&&)>&&);
#include "RemoteGraphicsContextGLFunctionsGenerated.h" // NOLINT
Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in (295283 => 295284)
--- trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in 2022-06-06 13:11:21 UTC (rev 295283)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in 2022-06-06 13:42:16 UTC (rev 295284)
@@ -57,6 +57,7 @@
void MultiDrawArraysInstancedANGLE(uint32_t mode, IPC::ArrayReferenceTuple<int32_t, int32_t, int32_t> firstsCountsAandInstanceCounts)
void MultiDrawElementsANGLE(uint32_t mode, IPC::ArrayReferenceTuple<int32_t, int32_t> countsAndOffsets, uint32_t type)
void MultiDrawElementsInstancedANGLE(uint32_t mode, IPC::ArrayReferenceTuple<int32_t, int32_t, int32_t> countsOffsetsAndInstanceCounts, uint32_t type)
+ void PaintRenderingResultsToPixelBuffer() -> (std::optional<IPC::PixelBufferReference> returnValue) Synchronous
void MoveErrorsToSyntheticErrorList() -> (bool returnValue) Synchronous
void ActiveTexture(uint32_t texture)
@@ -302,7 +303,6 @@
void BlendFuncSeparateiOES(uint32_t buf, uint32_t srcRGB, uint32_t dstRGB, uint32_t srcAlpha, uint32_t dstAlpha)
void ColorMaskiOES(uint32_t buf, bool red, bool green, bool blue, bool alpha)
void GetInternalformativ(uint32_t target, uint32_t internalformat, uint32_t pname, uint64_t paramsSize) -> (IPC::ArrayReference<int32_t> params) Synchronous
- void PaintRenderingResultsToPixelBuffer() -> (std::optional<IPC::PixelBufferReference> returnValue) Synchronous
}
#endif
Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h (295283 => 295284)
--- trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h 2022-06-06 13:11:21 UTC (rev 295283)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h 2022-06-06 13:42:16 UTC (rev 295284)
@@ -1382,12 +1382,4 @@
m_context->getInternalformativ(target, internalformat, pname, params);
completionHandler(IPC::ArrayReference<int32_t>(reinterpret_cast<int32_t*>(params.data()), params.size()));
}
- void paintRenderingResultsToPixelBuffer(CompletionHandler<void(std::optional<IPC::PixelBufferReference>&&)>&& completionHandler)
- {
- std::optional<IPC::PixelBufferReference> returnValue = { };
- assertIsCurrent(workQueue());
- if (auto pixelBuffer = m_context->paintRenderingResultsToPixelBuffer())
- returnValue = pixelBuffer.releaseNonNull();
- completionHandler(WTFMove(returnValue));
- }
Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp (295283 => 295284)
--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp 2022-06-06 13:11:21 UTC (rev 295283)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp 2022-06-06 13:42:16 UTC (rev 295284)
@@ -317,6 +317,19 @@
}
}
+RefPtr<WebCore::PixelBuffer> RemoteGraphicsContextGLProxy::paintRenderingResultsToPixelBuffer()
+{
+ std::optional<IPC::PixelBufferReference> returnValue;
+ if (!isContextLost()) {
+ auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::PaintRenderingResultsToPixelBuffer(), Messages::RemoteGraphicsContextGL::PaintRenderingResultsToPixelBuffer::Reply(returnValue));
+ if (!sendResult)
+ markContextLost();
+ }
+ if (!returnValue)
+ return nullptr;
+ return returnValue->takePixelBuffer();
+}
+
void RemoteGraphicsContextGLProxy::wasCreated(bool didSucceed, IPC::Semaphore&& wakeUpSemaphore, IPC::Semaphore&& clientWaitSemaphore, String&& availableExtensions, String&& requestedExtensions)
{
if (isContextLost())
Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h (295283 => 295284)
--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h 2022-06-06 13:11:21 UTC (rev 295283)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h 2022-06-06 13:42:16 UTC (rev 295284)
@@ -83,6 +83,7 @@
void multiDrawArraysInstancedANGLE(GCGLenum mode, GCGLSpanTuple<const GCGLint, const GCGLsizei, const GCGLsizei> firstsCountsAndInstanceCounts) final;
void multiDrawElementsANGLE(GCGLenum mode, GCGLSpanTuple<const GCGLsizei, const GCGLint> countsAndOffsets, GCGLenum type) final;
void multiDrawElementsInstancedANGLE(GCGLenum mode, GCGLSpanTuple<const GCGLsizei, const GCGLint, const GCGLsizei> countsOffsetsAndInstanceCounts, GCGLenum type) final;
+ RefPtr<WebCore::PixelBuffer> paintRenderingResultsToPixelBuffer() final;
// Functions with a generated implementation. This list is used by generate-gpup-webgl script.
bool moveErrorsToSyntheticErrorList() final;
@@ -329,7 +330,6 @@
void blendFuncSeparateiOES(GCGLuint buf, GCGLenum srcRGB, GCGLenum dstRGB, GCGLenum srcAlpha, GCGLenum dstAlpha) final;
void colorMaskiOES(GCGLuint buf, GCGLboolean red, GCGLboolean green, GCGLboolean blue, GCGLboolean alpha) final;
void getInternalformativ(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLSpan<GCGLint> params) final;
- RefPtr<WebCore::PixelBuffer> paintRenderingResultsToPixelBuffer() final;
// End of list used by generate-gpup-webgl script.
static bool handleMessageToRemovedDestination(IPC::Connection&, IPC::Decoder&);
Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp (295283 => 295284)
--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp 2022-06-06 13:11:21 UTC (rev 295283)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp 2022-06-06 13:42:16 UTC (rev 295284)
@@ -2375,20 +2375,7 @@
}
}
-RefPtr<WebCore::PixelBuffer> RemoteGraphicsContextGLProxy::paintRenderingResultsToPixelBuffer()
-{
- std::optional<IPC::PixelBufferReference> returnValue;
- if (!isContextLost()) {
- auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::PaintRenderingResultsToPixelBuffer(), Messages::RemoteGraphicsContextGL::PaintRenderingResultsToPixelBuffer::Reply(returnValue));
- if (!sendResult)
- markContextLost();
- }
- if (!returnValue)
- return nullptr;
- return returnValue->takePixelBuffer();
}
-}
-
#endif
Modified: trunk/Tools/Scripts/generate-gpup-webgl (295283 => 295284)
--- trunk/Tools/Scripts/generate-gpup-webgl 2022-06-06 13:11:21 UTC (rev 295283)
+++ trunk/Tools/Scripts/generate-gpup-webgl 2022-06-06 13:42:16 UTC (rev 295284)
@@ -96,7 +96,10 @@
#if USE(GRAPHICS_LAYER_WC)
void PrepareForDisplay() -> (std::optional<WebKit::WCContentBufferIdentifier> contentBuffer) Synchronous
#endif
-#if !PLATFORM(COCOA) && !USE(GRAPHICS_LAYER_WC)
+#if USE(LIBGBM)
+ void PrepareForDisplay() -> (WebCore::DMABufObject dmabufObject) Synchronous NotStreamEncodableReply
+#endif
+#if !PLATFORM(COCOA) && !USE(GRAPHICS_LAYER_WC) && !USE(LIBGBM)
void PrepareForDisplay() -> () Synchronous
#endif
void EnsureExtensionEnabled(String extension)
@@ -118,6 +121,7 @@
void MultiDrawArraysInstancedANGLE(uint32_t mode, IPC::ArrayReferenceTuple<int32_t, int32_t, int32_t> firstsCountsAandInstanceCounts)
void MultiDrawElementsANGLE(uint32_t mode, IPC::ArrayReferenceTuple<int32_t, int32_t> countsAndOffsets, uint32_t type)
void MultiDrawElementsInstancedANGLE(uint32_t mode, IPC::ArrayReferenceTuple<int32_t, int32_t, int32_t> countsOffsetsAndInstanceCounts, uint32_t type)
+ void PaintRenderingResultsToPixelBuffer() -> (std::optional<IPC::PixelBufferReference> returnValue) Synchronous
{}
}}
@@ -825,8 +829,9 @@
self.return_value_expr = return_value_expr
def __str__(self):
+ nolint = " // NOLINT" if "_" in self.name else ""
body = "".join(f"\n {b}" for b in self.pre_call_stmts + self.call_stmts + self.post_call_stmts)
- return f""" void {self.name}{self.overload_suffix}({str(self.args)})
+ return f""" void {self.name}{self.overload_suffix}({str(self.args)}){nolint}
{{{body}
}}"""