Diff
Modified: trunk/Source/WebCore/ChangeLog (290975 => 290976)
--- trunk/Source/WebCore/ChangeLog 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebCore/ChangeLog 2022-03-08 07:28:30 UTC (rev 290976)
@@ -1,3 +1,25 @@
+2022-03-07 Simon Fraser <[email protected]>
+
+ Rename VolatilityState to SetNonVolatileResult
+ https://bugs.webkit.org/show_bug.cgi?id=237562
+
+ Reviewed by Tim Horton.
+
+ Pure rename. I want to use VolatilityState to actually reflect state.
+
+ * platform/graphics/ConcreteImageBuffer.h:
+ * platform/graphics/ImageBuffer.h:
+ * platform/graphics/ImageBufferBackend.h:
+ (WebCore::ImageBufferBackend::setNonVolatile):
+ * platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
+ (WebCore::ImageBufferIOSurfaceBackend::setNonVolatile):
+ * platform/graphics/cg/ImageBufferIOSurfaceBackend.h:
+ * platform/graphics/cocoa/IOSurface.h:
+ * platform/graphics/cocoa/IOSurface.mm:
+ (WebCore::IOSurface::state const):
+ (WebCore::IOSurface::setVolatile):
+ (WebCore::operator<<):
+
2022-03-07 Tim Horton <[email protected]>
Fix the build
Modified: trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h (290975 => 290976)
--- trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h 2022-03-08 07:28:30 UTC (rev 290976)
@@ -298,11 +298,11 @@
return true; // Just claim we succeedded.
}
- VolatilityState setNonVolatile() override
+ SetNonVolatileResult setNonVolatile() override
{
if (auto* backend = ensureBackendCreated())
return backend->setNonVolatile();
- return VolatilityState::Valid;
+ return SetNonVolatileResult::Valid;
}
std::unique_ptr<ThreadSafeImageBufferFlusher> createFlusher() override
Modified: trunk/Source/WebCore/platform/graphics/ImageBuffer.h (290975 => 290976)
--- trunk/Source/WebCore/platform/graphics/ImageBuffer.h 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebCore/platform/graphics/ImageBuffer.h 2022-03-08 07:28:30 UTC (rev 290976)
@@ -92,7 +92,7 @@
// Returns true on success.
virtual bool setVolatile() = 0;
- virtual VolatilityState setNonVolatile() = 0;
+ virtual SetNonVolatileResult setNonVolatile() = 0;
virtual std::unique_ptr<ThreadSafeImageBufferFlusher> createFlusher() = 0;
Modified: trunk/Source/WebCore/platform/graphics/ImageBufferBackend.h (290975 => 290976)
--- trunk/Source/WebCore/platform/graphics/ImageBufferBackend.h 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebCore/platform/graphics/ImageBufferBackend.h 2022-03-08 07:28:30 UTC (rev 290976)
@@ -55,7 +55,7 @@
Yes,
};
-enum class VolatilityState : uint8_t {
+enum class SetNonVolatileResult : uint8_t {
Valid,
Empty
};
@@ -126,7 +126,7 @@
// Returns true on success.
virtual bool setVolatile() { return true; }
- virtual VolatilityState setNonVolatile() { return VolatilityState::Valid; }
+ virtual SetNonVolatileResult setNonVolatile() { return SetNonVolatileResult::Valid; }
virtual std::unique_ptr<ThreadSafeImageBufferFlusher> createFlusher() { return nullptr; }
Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp (290975 => 290976)
--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp 2022-03-08 07:28:30 UTC (rev 290976)
@@ -243,7 +243,7 @@
return true;
}
-VolatilityState ImageBufferIOSurfaceBackend::setNonVolatile()
+SetNonVolatileResult ImageBufferIOSurfaceBackend::setNonVolatile()
{
return m_surface->setVolatile(false);
}
Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h (290975 => 290976)
--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h 2022-03-08 07:28:30 UTC (rev 290976)
@@ -71,7 +71,7 @@
void releaseBufferToPool() override;
bool setVolatile() override;
- VolatilityState setNonVolatile() override;
+ SetNonVolatileResult setNonVolatile() override;
void ensureNativeImagesHaveCopiedBackingStore() final;
Modified: trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h (290975 => 290976)
--- trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h 2022-03-08 07:28:30 UTC (rev 290976)
@@ -49,7 +49,7 @@
class ProcessIdentity;
enum class PixelFormat : uint8_t;
-enum class VolatilityState : uint8_t;
+enum class SetNonVolatileResult : uint8_t;
using IOSurfaceSeed = uint32_t;
@@ -137,10 +137,10 @@
// Querying volatility can be expensive, so in cases where the surface is
// going to be used immediately, use the return value of setVolatile to
// determine whether the data was purged, instead of first calling state() or isVolatile().
- VolatilityState state() const;
+ SetNonVolatileResult state() const;
bool isVolatile() const;
- WEBCORE_EXPORT VolatilityState setVolatile(bool);
+ WEBCORE_EXPORT SetNonVolatileResult setVolatile(bool);
IntSize size() const { return m_size; }
size_t totalBytes() const { return m_totalBytes; }
Modified: trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm (290975 => 290976)
--- trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm 2022-03-08 07:28:30 UTC (rev 290976)
@@ -388,12 +388,12 @@
return *m_graphicsContext;
}
-VolatilityState IOSurface::state() const
+SetNonVolatileResult IOSurface::state() const
{
uint32_t previousState = 0;
IOReturn ret = IOSurfaceSetPurgeable(m_surface.get(), kIOSurfacePurgeableKeepCurrent, &previousState);
ASSERT_UNUSED(ret, ret == kIOReturnSuccess);
- return previousState == kIOSurfacePurgeableEmpty ? VolatilityState::Empty : VolatilityState::Valid;
+ return previousState == kIOSurfacePurgeableEmpty ? SetNonVolatileResult::Empty : SetNonVolatileResult::Valid;
}
IOSurfaceSeed IOSurface::seed() const
@@ -409,7 +409,7 @@
return previousState != kIOSurfacePurgeableNonVolatile;
}
-VolatilityState IOSurface::setVolatile(bool isVolatile)
+SetNonVolatileResult IOSurface::setVolatile(bool isVolatile)
{
uint32_t previousState = 0;
IOReturn ret = IOSurfaceSetPurgeable(m_surface.get(), isVolatile ? kIOSurfacePurgeableVolatile : kIOSurfacePurgeableNonVolatile, &previousState);
@@ -416,9 +416,9 @@
ASSERT_UNUSED(ret, ret == kIOReturnSuccess);
if (previousState == kIOSurfacePurgeableEmpty)
- return VolatilityState::Empty;
+ return SetNonVolatileResult::Empty;
- return VolatilityState::Valid;
+ return SetNonVolatileResult::Valid;
}
IOSurface::Format IOSurface::format() const
@@ -594,13 +594,13 @@
return ts;
}
-static TextStream& operator<<(TextStream& ts, VolatilityState state)
+static TextStream& operator<<(TextStream& ts, SetNonVolatileResult state)
{
switch (state) {
- case VolatilityState::Valid:
+ case SetNonVolatileResult::Valid:
ts << "valid";
break;
- case VolatilityState::Empty:
+ case SetNonVolatileResult::Empty:
ts << "empty";
break;
}
Modified: trunk/Source/WebKit/ChangeLog (290975 => 290976)
--- trunk/Source/WebKit/ChangeLog 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebKit/ChangeLog 2022-03-08 07:28:30 UTC (rev 290976)
@@ -1,3 +1,27 @@
+2022-03-07 Simon Fraser <[email protected]>
+
+ Rename VolatilityState to SetNonVolatileResult
+ https://bugs.webkit.org/show_bug.cgi?id=237562
+
+ Reviewed by Tim Horton.
+
+ Pure rename. I want to use VolatilityState to actually reflect state.
+
+ * GPUProcess/graphics/RemoteRenderingBackend.cpp:
+ (WebKit::RemoteRenderingBackend::markSurfaceNonVolatile):
+ (WebKit::RemoteRenderingBackend::swapToValidFrontBuffer):
+ * Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
+ * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
+ (WebKit::RemoteLayerBackingStore::setBufferNonVolatile):
+ (WebKit::RemoteLayerBackingStore::didMakeFrontBufferNonVolatile):
+ * UIProcess/ViewSnapshotStore.h:
+ * UIProcess/mac/ViewSnapshotStoreMac.mm:
+ (WebKit::ViewSnapshot::setVolatile):
+ (WebKit::ViewSnapshot::asLayerContents):
+ * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
+ (WebKit::RemoteRenderingBackendProxy::markSurfaceNonVolatile):
+ * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
+
2022-03-07 Brent Fulgham <[email protected]>
Remove remnants of WebKit.Plugin.64.xpc service
Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp (290975 => 290976)
--- trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp 2022-03-08 07:28:30 UTC (rev 290976)
@@ -410,7 +410,7 @@
auto backendHandle = handleFromBuffer(*imageBuffer);
auto previousState = imageBuffer->setNonVolatile();
- completionHandler(WTFMove(backendHandle), previousState == VolatilityState::Empty);
+ completionHandler(WTFMove(backendHandle), previousState == SetNonVolatileResult::Empty);
}
// This is the GPU Process version of RemoteLayerBackingStore::swapToValidFrontBuffer().
@@ -445,7 +445,7 @@
bool frontBufferWasEmpty = false;
if (frontBuffer) {
auto previousState = frontBuffer->setNonVolatile();
- frontBufferWasEmpty = previousState == VolatilityState::Empty;
+ frontBufferWasEmpty = previousState == SetNonVolatileResult::Empty;
frontBufferHandle = handleFromBuffer(*frontBuffer);
}
Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h (290975 => 290976)
--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.h 2022-03-08 07:28:30 UTC (rev 290976)
@@ -103,7 +103,7 @@
};
void willMakeBufferVolatile(BufferType);
- void didMakeFrontBufferNonVolatile(WebCore::VolatilityState);
+ void didMakeFrontBufferNonVolatile(WebCore::SetNonVolatileResult);
RefPtr<WebCore::ImageBuffer> bufferForType(BufferType) const;
@@ -137,7 +137,7 @@
};
bool setBufferVolatile(Buffer&);
- WebCore::VolatilityState setBufferNonVolatile(Buffer&);
+ WebCore::SetNonVolatileResult setBufferNonVolatile(Buffer&);
void swapBuffers();
Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm (290975 => 290976)
--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm 2022-03-08 07:28:30 UTC (rev 290976)
@@ -542,15 +542,15 @@
return false;
}
-WebCore::VolatilityState RemoteLayerBackingStore::setBufferNonVolatile(Buffer& buffer)
+WebCore::SetNonVolatileResult RemoteLayerBackingStore::setBufferNonVolatile(Buffer& buffer)
{
ASSERT(!WebProcess::singleton().shouldUseRemoteRenderingFor(WebCore::RenderingPurpose::DOM));
if (!buffer.imageBuffer)
- return WebCore::VolatilityState::Valid; // Not really valid but the caller only checked the Empty state.
+ return WebCore::SetNonVolatileResult::Valid; // Not really valid but the caller only checked the Empty state.
if (!buffer.isVolatile)
- return WebCore::VolatilityState::Valid;
+ return WebCore::SetNonVolatileResult::Valid;
buffer.isVolatile = false;
return buffer.imageBuffer->setNonVolatile();
@@ -574,10 +574,10 @@
downcast<ImageBufferBackendHandleSharing>(*sharing).clearBackendHandle();
}
-void RemoteLayerBackingStore::didMakeFrontBufferNonVolatile(WebCore::VolatilityState result)
+void RemoteLayerBackingStore::didMakeFrontBufferNonVolatile(WebCore::SetNonVolatileResult result)
{
m_frontBuffer.isVolatile = false;
- if (result == WebCore::VolatilityState::Empty)
+ if (result == WebCore::SetNonVolatileResult::Empty)
setNeedsDisplay();
}
Modified: trunk/Source/WebKit/UIProcess/ViewSnapshotStore.h (290975 => 290976)
--- trunk/Source/WebKit/UIProcess/ViewSnapshotStore.h 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebKit/UIProcess/ViewSnapshotStore.h 2022-03-08 07:28:30 UTC (rev 290976)
@@ -91,7 +91,7 @@
void setSurface(std::unique_ptr<WebCore::IOSurface>);
- WebCore::VolatilityState setVolatile(bool);
+ WebCore::SetNonVolatileResult setVolatile(bool);
#endif
#if PLATFORM(GTK)
Modified: trunk/Source/WebKit/UIProcess/mac/ViewSnapshotStoreMac.mm (290975 => 290976)
--- trunk/Source/WebKit/UIProcess/mac/ViewSnapshotStoreMac.mm 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebKit/UIProcess/mac/ViewSnapshotStoreMac.mm 2022-03-08 07:28:30 UTC (rev 290976)
@@ -75,13 +75,13 @@
m_surface = nullptr;
}
-WebCore::VolatilityState ViewSnapshot::setVolatile(bool becomeVolatile)
+WebCore::SetNonVolatileResult ViewSnapshot::setVolatile(bool becomeVolatile)
{
if (ViewSnapshotStore::singleton().disableSnapshotVolatilityForTesting())
- return WebCore::VolatilityState::Valid;
+ return WebCore::SetNonVolatileResult::Valid;
if (!m_surface)
- return WebCore::VolatilityState::Empty;
+ return WebCore::SetNonVolatileResult::Empty;
return m_surface->setVolatile(becomeVolatile);
}
@@ -91,7 +91,7 @@
if (!m_surface)
return nullptr;
- if (setVolatile(false) != WebCore::VolatilityState::Valid) {
+ if (setVolatile(false) != WebCore::SetNonVolatileResult::Valid) {
clearImage();
return nullptr;
}
Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp (290975 => 290976)
--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp 2022-03-08 07:28:30 UTC (rev 290976)
@@ -333,7 +333,7 @@
};
}
-VolatilityState RemoteRenderingBackendProxy::markSurfaceNonVolatile(RenderingResourceIdentifier identifier)
+SetNonVolatileResult RemoteRenderingBackendProxy::markSurfaceNonVolatile(RenderingResourceIdentifier identifier)
{
LOG_WITH_STREAM(RemoteRenderingBufferVolatility, stream << "Web Process: RemoteRenderingBackendProxy::markSurfaceNonVolatile " << identifier);
@@ -350,7 +350,7 @@
}
}
- return bufferWasEmpty ? VolatilityState::Empty : VolatilityState::Valid;
+ return bufferWasEmpty ? SetNonVolatileResult::Empty : SetNonVolatileResult::Valid;
}
void RemoteRenderingBackendProxy::markSurfacesVolatile(Vector<WebCore::RenderingResourceIdentifier>&& identifiers, CompletionHandler<void(Vector<WebCore::RenderingResourceIdentifier>&&)>&& completionHandler)
Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h (290975 => 290976)
--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h 2022-03-08 07:18:39 UTC (rev 290975)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h 2022-03-08 07:28:30 UTC (rev 290976)
@@ -95,7 +95,7 @@
void releaseRemoteResource(WebCore::RenderingResourceIdentifier);
void markSurfacesVolatile(Vector<WebCore::RenderingResourceIdentifier>&&, CompletionHandler<void(Vector<WebCore::RenderingResourceIdentifier>&& inUseBufferIdentifiers)>&&);
- WebCore::VolatilityState markSurfaceNonVolatile(WebCore::RenderingResourceIdentifier);
+ WebCore::SetNonVolatileResult markSurfaceNonVolatile(WebCore::RenderingResourceIdentifier);
struct BufferSet {
RefPtr<WebCore::ImageBuffer> front;