Skip to content

Commit

Permalink
Apply patch. rdar://123661156
Browse files Browse the repository at this point in the history
    Speedometer 3: buildTransaction spends a lot of time destroying mach port objects. https://bugs.webkit.org/show_bug.cgi?id=270549 <rdar://123661156>

    Reviewed by Kimmo Kinnunen.

    Flusing a RemoteImageBufferSetProxy waits on both the `didPrepareForDisplay` message
    to be delivered to the WorkQueue, and the semaphore to be signaled when drawing command
    flushing is completed.

    This was previously required, since building of the transaction on the main thread was
    blocked on the didPrepareForDisplay message, so it was delivered as early as possible.

    The current state is that all waiting happens on a background thread, so there's no
    longer any benefit to having two separate notifications.

    This changes moves sending of the didPrepareForDisplay message to happen once drawing
    flushing is completed, and removes the seamphore signaling.

    This should be a small performance win in some cases, since we no longer need to allocate
    and destroy the semaphore objects.

    * Source/WebKit/GPUProcess/graphics/RemoteImageBufferSet.cpp:
    (WebKit::RemoteImageBufferSet::RemoteImageBufferSet):
    (WebKit::RemoteImageBufferSet::endPrepareForDisplay):
    (WebKit::RemoteImageBufferSet::ensureBufferForDisplay):
    (WebKit::RemoteImageBufferSet::setFlushSignal): Deleted.
    (WebKit::RemoteImageBufferSet::flush): Deleted.
    * Source/WebKit/GPUProcess/graphics/RemoteImageBufferSet.h:
    * Source/WebKit/GPUProcess/graphics/RemoteImageBufferSet.messages.in:
    * Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:
    (WebKit::RemoteRenderingBackend::prepareImageBufferSetsForDisplay):
    (WebKit::RemoteRenderingBackend::prepareImageBufferSetsForDisplaySync):
    * Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h:
    * Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.messages.in:
    * Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferSetProxy.cpp:
    (WebKit::RemoteImageBufferSetProxyFlushFence::create):
    (WebKit::RemoteImageBufferSetProxyFlushFence::waitFor):
    (WebKit::RemoteImageBufferSetProxyFlushFence::RemoteImageBufferSetProxyFlushFence):
    (WebKit::RemoteImageBufferSetProxy::flushFrontBufferAsync):
    (WebKit::RemoteImageBufferSetProxy::willPrepareForDisplay):
    (WebKit::RemoteImageBufferSetProxyFlushFence::~RemoteImageBufferSetProxyFlushFence): Deleted.
    (WebKit::RemoteImageBufferSetProxyFlushFence::tryTakeEvent): Deleted.
    (WebKit::RemoteImageBufferSetProxyFlushFence::setWaitingForSignal): Deleted.
    (): Deleted.
    (WebKit::RemoteImageBufferSetProxy::createFlushFence): Deleted.
    * Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferSetProxy.h:
    * Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
    (WebKit::RemoteRenderingBackendProxy::prepareImageBufferSetsForDisplay):

    Canonical link: https://commits.webkit.org/276421@main

Identifier: 272448.798@safari-7618-branch
  • Loading branch information
Dan Robson committed Mar 26, 2024
1 parent d7ad67d commit 21d9fc3
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 113 deletions.
56 changes: 27 additions & 29 deletions Source/WebKit/GPUProcess/graphics/RemoteImageBufferSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ Ref<RemoteImageBufferSet> RemoteImageBufferSet::create(RemoteImageBufferSetIdent
}

RemoteImageBufferSet::RemoteImageBufferSet(RemoteImageBufferSetIdentifier identifier, RenderingResourceIdentifier displayListIdentifier, RemoteRenderingBackend& backend)
: m_backend(&backend)
, m_identifier(identifier)
: m_identifier(identifier)
, m_displayListIdentifier(displayListIdentifier)
, m_backend(&backend)
{
}

Expand Down Expand Up @@ -103,22 +103,35 @@ void RemoteImageBufferSet::updateConfiguration(const FloatSize& logicalSize, Ren

}

void RemoteImageBufferSet::setFlushSignal(IPC::Signal&& signal)
void RemoteImageBufferSet::endPrepareForDisplay(RenderingUpdateID renderingUpdateID)
{
m_flushSignal = WTFMove(signal);
}

void RemoteImageBufferSet::flush()
{
m_backend->releaseDisplayListRecorder(m_displayListIdentifier);
ASSERT(m_flushSignal);
if (m_displayListCreated) {
m_backend->releaseDisplayListRecorder(m_displayListIdentifier);
m_displayListCreated = false;
}
if (m_frontBuffer)
m_frontBuffer->flushDrawingContext();
m_flushSignal->signal();

#if PLATFORM(COCOA)
auto bufferIdentifier = [](RefPtr<WebCore::ImageBuffer> buffer) -> std::optional<WebCore::RenderingResourceIdentifier> {
if (!buffer)
return std::nullopt;
return buffer->renderingResourceIdentifier();
};

ImageBufferSetPrepareBufferForDisplayOutputData outputData;
if (m_frontBuffer) {
auto* sharing = m_frontBuffer->toBackendSharing();
outputData.backendHandle = downcast<ImageBufferBackendHandleSharing>(*sharing).createBackendHandle();
}

outputData.bufferCacheIdentifiers = BufferIdentifierSet { bufferIdentifier(m_frontBuffer), bufferIdentifier(m_backBuffer), bufferIdentifier(m_secondaryBackBuffer) };
m_backend->streamConnection().send(Messages::RemoteImageBufferSetProxy::DidPrepareForDisplay(WTFMove(outputData), renderingUpdateID), m_identifier);
#endif
}

// This is the GPU Process version of RemoteLayerBackingStore::prepareBuffers().
void RemoteImageBufferSet::ensureBufferForDisplay(ImageBufferSetPrepareBufferForDisplayInputData& inputData, SwapBuffersDisplayRequirement& displayRequirement, RenderingUpdateID renderingUpdateID)
void RemoteImageBufferSet::ensureBufferForDisplay(ImageBufferSetPrepareBufferForDisplayInputData& inputData, SwapBuffersDisplayRequirement& displayRequirement)
{
assertIsCurrent(workQueue());
LOG_WITH_STREAM(RemoteLayerBuffers, stream << "GPU Process: ::ensureFrontBufferForDisplay " << " - front "
Expand Down Expand Up @@ -174,25 +187,10 @@ void RemoteImageBufferSet::ensureBufferForDisplay(ImageBufferSetPrepareBufferFor
LOG_WITH_STREAM(RemoteLayerBuffers, stream << "GPU Process: ensureFrontBufferForDisplay - swapped to ["
<< m_frontBuffer << ", " << m_backBuffer << ", " << m_secondaryBackBuffer << "]");

if (displayRequirement != SwapBuffersDisplayRequirement::NeedsNoDisplay)
if (displayRequirement != SwapBuffersDisplayRequirement::NeedsNoDisplay) {
m_backend->createDisplayListRecorder(m_frontBuffer, m_displayListIdentifier);

#if PLATFORM(COCOA)
auto bufferIdentifier = [](RefPtr<WebCore::ImageBuffer> buffer) -> std::optional<WebCore::RenderingResourceIdentifier> {
if (!buffer)
return std::nullopt;
return buffer->renderingResourceIdentifier();
};

ImageBufferSetPrepareBufferForDisplayOutputData outputData;
if (m_frontBuffer) {
auto* sharing = m_frontBuffer->toBackendSharing();
outputData.backendHandle = downcast<ImageBufferBackendHandleSharing>(*sharing).createBackendHandle();
m_displayListCreated = true;
}

outputData.bufferCacheIdentifiers = BufferIdentifierSet { bufferIdentifier(m_frontBuffer), bufferIdentifier(m_backBuffer), bufferIdentifier(m_secondaryBackBuffer) };
m_backend->streamConnection().send(Messages::RemoteImageBufferSetProxy::DidPrepareForDisplay(WTFMove(outputData), renderingUpdateID), m_identifier);
#endif
}

void RemoteImageBufferSet::prepareBufferForDisplay(const WebCore::Region& dirtyRegion, bool requiresClearedPixels)
Expand Down
12 changes: 5 additions & 7 deletions Source/WebKit/GPUProcess/graphics/RemoteImageBufferSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class RemoteImageBufferSet : public IPC::StreamMessageReceiver {

// Ensures frontBuffer is valid, either by swapping an existing back
// buffer, or allocating a new one.
void ensureBufferForDisplay(ImageBufferSetPrepareBufferForDisplayInputData&, SwapBuffersDisplayRequirement&, RenderingUpdateID);
void ensureBufferForDisplay(ImageBufferSetPrepareBufferForDisplayInputData&, SwapBuffersDisplayRequirement&);

// Initializes the contents of the new front buffer using the previous
// frames (if applicable), clips to the dirty region, and clears the pixels
Expand All @@ -70,8 +70,7 @@ class RemoteImageBufferSet : public IPC::StreamMessageReceiver {

// Messages
void updateConfiguration(const WebCore::FloatSize&, WebCore::RenderingMode, float resolutionScale, const WebCore::DestinationColorSpace&, WebCore::PixelFormat);
void setFlushSignal(IPC::Signal&&);
void flush();
void endPrepareForDisplay(RenderingUpdateID);

#if ENABLE(RE_DYNAMIC_CONTENT_SCALING)
void dynamicContentScalingDisplayList(CompletionHandler<void(std::optional<WebCore::DynamicContentScalingDisplayList>&&)>&&);
Expand All @@ -82,9 +81,9 @@ class RemoteImageBufferSet : public IPC::StreamMessageReceiver {
return m_pixelFormat == WebCore::PixelFormat::RGB10 || m_pixelFormat == WebCore::PixelFormat::BGRX8;
}

const RemoteImageBufferSetIdentifier m_identifier;
const WebCore::RenderingResourceIdentifier m_displayListIdentifier;
RefPtr<RemoteRenderingBackend> m_backend;
RemoteImageBufferSetIdentifier m_identifier;
WebCore::RenderingResourceIdentifier m_displayListIdentifier;

RefPtr<WebCore::ImageBuffer> m_frontBuffer;
RefPtr<WebCore::ImageBuffer> m_backBuffer;
Expand All @@ -99,10 +98,9 @@ class RemoteImageBufferSet : public IPC::StreamMessageReceiver {
WebCore::DestinationColorSpace m_colorSpace { WebCore::DestinationColorSpace::SRGB() };
WebCore::PixelFormat m_pixelFormat;
bool m_frontBufferIsCleared { false };
bool m_displayListCreated { false };

std::optional<WebCore::IntRect> m_previouslyPaintedRect;

std::optional<IPC::Signal> m_flushSignal;
};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@

messages -> RemoteImageBufferSet NotRefCounted Stream {
UpdateConfiguration(WebCore::FloatSize logicalSize, WebCore::RenderingMode renderingMode, float resolutionScale, WebCore::DestinationColorSpace colorSpace, enum:uint8_t WebCore::PixelFormat pixelFormat)
SetFlushSignal(IPC::Signal signal) NotStreamEncodable
Flush()
EndPrepareForDisplay(WebKit::RenderingUpdateID renderingUpdateID)

#if ENABLE(RE_DYNAMIC_CONTENT_SCALING)
DynamicContentScalingDisplayList() -> (std::optional<WebCore::DynamicContentScalingDisplayList> displayList) Synchronous NotStreamEncodableReply
Expand Down
8 changes: 4 additions & 4 deletions Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,23 +412,23 @@ void RemoteRenderingBackend::flush(IPC::Semaphore&& semaphore)
#endif

#if PLATFORM(COCOA)
void RemoteRenderingBackend::prepareImageBufferSetsForDisplay(Vector<ImageBufferSetPrepareBufferForDisplayInputData> swapBuffersInput, RenderingUpdateID renderingUpdateID)
void RemoteRenderingBackend::prepareImageBufferSetsForDisplay(Vector<ImageBufferSetPrepareBufferForDisplayInputData> swapBuffersInput)
{
assertIsCurrent(workQueue());

for (unsigned i = 0; i < swapBuffersInput.size(); ++i) {
RefPtr<RemoteImageBufferSet> remoteImageBufferSet = m_remoteImageBufferSets.get(swapBuffersInput[i].remoteBufferSet);
MESSAGE_CHECK(remoteImageBufferSet, "BufferSet is being updated before being created"_s);
SwapBuffersDisplayRequirement displayRequirement = SwapBuffersDisplayRequirement::NeedsNormalDisplay;
remoteImageBufferSet->ensureBufferForDisplay(swapBuffersInput[i], displayRequirement, renderingUpdateID);
remoteImageBufferSet->ensureBufferForDisplay(swapBuffersInput[i], displayRequirement);
MESSAGE_CHECK(displayRequirement != SwapBuffersDisplayRequirement::NeedsFullDisplay, "Can't asynchronously require full display for a buffer set"_s);

if (displayRequirement != SwapBuffersDisplayRequirement::NeedsNoDisplay)
remoteImageBufferSet->prepareBufferForDisplay(swapBuffersInput[i].dirtyRegion, swapBuffersInput[i].requiresClearedPixels);
}
}

void RemoteRenderingBackend::prepareImageBufferSetsForDisplaySync(Vector<ImageBufferSetPrepareBufferForDisplayInputData> swapBuffersInput, RenderingUpdateID renderingUpdateID, CompletionHandler<void(Vector<SwapBuffersDisplayRequirement>&&)>&& completionHandler)
void RemoteRenderingBackend::prepareImageBufferSetsForDisplaySync(Vector<ImageBufferSetPrepareBufferForDisplayInputData> swapBuffersInput, CompletionHandler<void(Vector<SwapBuffersDisplayRequirement>&&)>&& completionHandler)
{
assertIsCurrent(workQueue());

Expand All @@ -438,7 +438,7 @@ void RemoteRenderingBackend::prepareImageBufferSetsForDisplaySync(Vector<ImageBu
for (unsigned i = 0; i < swapBuffersInput.size(); ++i) {
RefPtr<RemoteImageBufferSet> remoteImageBufferSet = m_remoteImageBufferSets.get(swapBuffersInput[i].remoteBufferSet);
MESSAGE_CHECK(remoteImageBufferSet, "BufferSet is being updated before being created"_s);
remoteImageBufferSet->ensureBufferForDisplay(swapBuffersInput[i], outputData[i], renderingUpdateID);
remoteImageBufferSet->ensureBufferForDisplay(swapBuffersInput[i], outputData[i]);
}

completionHandler(WTFMove(outputData));
Expand Down
4 changes: 2 additions & 2 deletions Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ class RemoteRenderingBackend : private IPC::MessageSender, public IPC::StreamMes
#endif

#if PLATFORM(COCOA)
void prepareImageBufferSetsForDisplay(Vector<ImageBufferSetPrepareBufferForDisplayInputData> swapBuffersInput, RenderingUpdateID);
void prepareImageBufferSetsForDisplaySync(Vector<ImageBufferSetPrepareBufferForDisplayInputData> swapBuffersInput, RenderingUpdateID, CompletionHandler<void(Vector<SwapBuffersDisplayRequirement>&&)>&&);
void prepareImageBufferSetsForDisplay(Vector<ImageBufferSetPrepareBufferForDisplayInputData> swapBuffersInput);
void prepareImageBufferSetsForDisplaySync(Vector<ImageBufferSetPrepareBufferForDisplayInputData> swapBuffersInput, CompletionHandler<void(Vector<SwapBuffersDisplayRequirement>&&)>&&);

#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ messages -> RemoteRenderingBackend NotRefCounted Stream {
// These messages also result in the 'DidPrepareForDisplay' message being
// returned on the RemoteImageBufferSetProxy message receiver (one for each
// inputData)
PrepareImageBufferSetsForDisplay(Vector<WebKit::ImageBufferSetPrepareBufferForDisplayInputData> swapBuffersInput, WebKit::RenderingUpdateID renderingUpdateID)
PrepareImageBufferSetsForDisplaySync(Vector<WebKit::ImageBufferSetPrepareBufferForDisplayInputData> swapBuffersInput, WebKit::RenderingUpdateID renderingUpdateID) -> (Vector<WebKit::SwapBuffersDisplayRequirement> displayRequirements) Synchronous
PrepareImageBufferSetsForDisplay(Vector<WebKit::ImageBufferSetPrepareBufferForDisplayInputData> swapBuffersInput)
PrepareImageBufferSetsForDisplaySync(Vector<WebKit::ImageBufferSetPrepareBufferForDisplayInputData> swapBuffersInput) -> (Vector<WebKit::SwapBuffersDisplayRequirement> displayRequirements) Synchronous
#endif

MarkSurfacesVolatile(WebKit::MarkSurfacesAsVolatileRequestIdentifier requestIdentifier, Vector<std::pair<WebKit::RemoteImageBufferSetIdentifier, OptionSet<WebKit::BufferInSetType>>> renderingResourceIdentifiers)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,37 +42,18 @@ class RemoteImageBufferSetProxyFlushFence : public ThreadSafeRefCounted<RemoteIm
WTF_MAKE_NONCOPYABLE(RemoteImageBufferSetProxyFlushFence);
WTF_MAKE_FAST_ALLOCATED;
public:
static Ref<RemoteImageBufferSetProxyFlushFence> create(IPC::Event event, RenderingUpdateID renderingUpdateID)
static Ref<RemoteImageBufferSetProxyFlushFence> create(RenderingUpdateID renderingUpdateID)
{
return adoptRef(*new RemoteImageBufferSetProxyFlushFence { WTFMove(event), renderingUpdateID });
}

~RemoteImageBufferSetProxyFlushFence()
{
if (m_signalIsPending)
tracePoint(FlushRemoteImageBufferEnd, reinterpret_cast<uintptr_t>(this), 1u);
return adoptRef(*new RemoteImageBufferSetProxyFlushFence { renderingUpdateID });
}

bool waitFor(Seconds relativeTimeout)
{
IPC::Timeout timeout(relativeTimeout);
Locker locker { m_lock };
if (!m_handles)
m_condition.waitFor(m_lock, timeout.secondsUntilDeadline());
ASSERT(m_event);
if (m_signalIsPending && m_event->waitFor(timeout))
m_signalIsPending = false;
if (!m_signalIsPending)
tracePoint(FlushRemoteImageBufferEnd, reinterpret_cast<uintptr_t>(this), 0u);
return !m_signalIsPending && m_handles;
}

std::optional<IPC::Event> tryTakeEvent()
{
if (m_signalIsPending)
return std::nullopt;
Locker locker { m_lock };
return std::exchange(m_event, std::nullopt);
m_condition.waitFor(m_lock, relativeTimeout);
tracePoint(FlushRemoteImageBufferEnd, reinterpret_cast<uintptr_t>(this), 1u);
return !!m_handles;
}

void setHandles(BufferSetBackendHandle&& handles)
Expand All @@ -88,24 +69,16 @@ class RemoteImageBufferSetProxyFlushFence : public ThreadSafeRefCounted<RemoteIm
return std::exchange(m_handles, std::nullopt);
}

void setWaitingForSignal()
{
m_signalIsPending = true;
}

RenderingUpdateID renderingUpdateID() const { return m_renderingUpdateID; }

private:
RemoteImageBufferSetProxyFlushFence(std::optional<IPC::Event> event, RenderingUpdateID renderingUpdateID)
: m_event(WTFMove(event))
, m_renderingUpdateID(renderingUpdateID)
RemoteImageBufferSetProxyFlushFence(RenderingUpdateID renderingUpdateID)
: m_renderingUpdateID(renderingUpdateID)
{
tracePoint(FlushRemoteImageBufferStart, reinterpret_cast<uintptr_t>(this));
}
Lock m_lock;
Condition m_condition;
std::atomic<bool> m_signalIsPending { false };
std::optional<IPC::Event> WTF_GUARDED_BY_LOCK(m_lock) m_event;
std::optional<BufferSetBackendHandle> m_handles WTF_GUARDED_BY_LOCK(m_lock);
RenderingUpdateID m_renderingUpdateID;
};
Expand All @@ -125,7 +98,6 @@ class RemoteImageBufferSetProxyFlusher final : public ThreadSafeImageBufferSetFl
{
if (m_flushState->waitFor(RemoteRenderingBackendProxy::defaultTimeout))
handlesMap.add(m_identifier, makeUnique<BufferSetBackendHandle>(*m_flushState->takeHandles()));

}

private:
Expand Down Expand Up @@ -257,39 +229,15 @@ void RemoteImageBufferSetProxy::setConfiguration(WebCore::FloatSize size, float
m_remoteNeedsConfigurationUpdate = true;
}

void RemoteImageBufferSetProxy::createFlushFence()
{
ASSERT(m_remoteRenderingBackendProxy);

std::optional<IPC::Event> event;
if (m_pendingFlush)
event = m_pendingFlush->tryTakeEvent();
if (!event) {
auto pair = IPC::createEventSignalPair();
if (!pair)
return;

event = WTFMove(pair->event);
send(Messages::RemoteImageBufferSet::SetFlushSignal(WTFMove(pair->signal)));
}

m_pendingFlush = RemoteImageBufferSetProxyFlushFence::create(WTFMove(*event), m_remoteRenderingBackendProxy->renderingUpdateID());
}

std::unique_ptr<ThreadSafeImageBufferSetFlusher> RemoteImageBufferSetProxy::flushFrontBufferAsync(ThreadSafeImageBufferSetFlusher::FlushType flushType)
{
if (!m_remoteRenderingBackendProxy)
return nullptr;

Locker locker { m_lock };
ASSERT(m_pendingFlush && m_pendingFlush->renderingUpdateID() == m_remoteRenderingBackendProxy->renderingUpdateID());
if (!m_pendingFlush)
return nullptr;
m_pendingFlush = RemoteImageBufferSetProxyFlushFence::create(m_remoteRenderingBackendProxy->renderingUpdateID());

if (flushType == ThreadSafeImageBufferSetFlusher::FlushType::BackendHandlesAndDrawing) {
m_pendingFlush->setWaitingForSignal();
send(Messages::RemoteImageBufferSet::Flush());
}
send(Messages::RemoteImageBufferSet::EndPrepareForDisplay(m_remoteRenderingBackendProxy->renderingUpdateID()));

return makeUnique<RemoteImageBufferSetProxyFlusher>(m_identifier, Ref { *m_pendingFlush }, m_generation);
}
Expand All @@ -310,9 +258,7 @@ void RemoteImageBufferSetProxy::willPrepareForDisplay()
}
m_remoteNeedsConfigurationUpdate = false;


Locker locker { m_lock };
createFlushFence();

if (!m_streamConnection) {
m_streamConnection = &m_remoteRenderingBackendProxy->streamConnection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ class RemoteImageBufferSetProxy : public IPC::WorkQueueMessageReceiver {
template<typename T> void send(T&& message);
template<typename T> auto sendSync(T&& message);

void createFlushFence() WTF_REQUIRES_LOCK(m_lock);

WeakPtr<RemoteRenderingBackendProxy> m_remoteRenderingBackendProxy;
RemoteImageBufferSetIdentifier m_identifier;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,15 +391,15 @@ Vector<SwapBuffersDisplayRequirement> RemoteRenderingBackendProxy::prepareImageB

Vector<SwapBuffersDisplayRequirement> result;
if (needsSync) {
auto sendResult = streamConnection().sendSync(Messages::RemoteRenderingBackend::PrepareImageBufferSetsForDisplaySync(inputData, m_renderingUpdateID), renderingBackendIdentifier(), defaultTimeout);
auto sendResult = streamConnection().sendSync(Messages::RemoteRenderingBackend::PrepareImageBufferSetsForDisplaySync(inputData), renderingBackendIdentifier(), defaultTimeout);
if (!sendResult.succeeded()) {
result.grow(inputData.size());
for (auto& displayRequirement : result)
displayRequirement = SwapBuffersDisplayRequirement::NeedsFullDisplay;
} else
std::tie(result) = sendResult.takeReply();
} else {
streamConnection().send(Messages::RemoteRenderingBackend::PrepareImageBufferSetsForDisplay(inputData, m_renderingUpdateID), renderingBackendIdentifier(), defaultTimeout);
streamConnection().send(Messages::RemoteRenderingBackend::PrepareImageBufferSetsForDisplay(inputData), renderingBackendIdentifier(), defaultTimeout);
result.grow(inputData.size());
for (auto& displayRequirement : result)
displayRequirement = SwapBuffersDisplayRequirement::NeedsNormalDisplay;
Expand Down

0 comments on commit 21d9fc3

Please sign in to comment.