summaryrefslogtreecommitdiffstats
path: root/gfx/layers/wr
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/layers/wr')
-rw-r--r--gfx/layers/wr/AsyncImagePipelineManager.cpp3
-rw-r--r--gfx/layers/wr/WebRenderBridgeParent.cpp10
-rw-r--r--gfx/layers/wr/WebRenderImageHost.cpp13
-rw-r--r--gfx/layers/wr/WebRenderScrollData.cpp16
-rw-r--r--gfx/layers/wr/WebRenderScrollData.h13
5 files changed, 44 insertions, 11 deletions
diff --git a/gfx/layers/wr/AsyncImagePipelineManager.cpp b/gfx/layers/wr/AsyncImagePipelineManager.cpp
index 464b8fb69f..8a49ffef69 100644
--- a/gfx/layers/wr/AsyncImagePipelineManager.cpp
+++ b/gfx/layers/wr/AsyncImagePipelineManager.cpp
@@ -229,8 +229,7 @@ Maybe<TextureHost::ResourceUpdateOp> AsyncImagePipelineManager::UpdateImageKeys(
auto* wrapper = aTexture ? aTexture->AsRemoteTextureHostWrapper() : nullptr;
if (wrapper && !aPipeline->mImageHost->GetAsyncRef()) {
std::function<void(const RemoteTextureInfo&)> function;
- RemoteTextureMap::Get()->GetRemoteTexture(
- wrapper, std::move(function), /* aWaitForRemoteTextureOwner */ false);
+ RemoteTextureMap::Get()->GetRemoteTexture(wrapper, std::move(function));
}
if (!aTexture || aTexture->NumSubTextures() == 0) {
diff --git a/gfx/layers/wr/WebRenderBridgeParent.cpp b/gfx/layers/wr/WebRenderBridgeParent.cpp
index 789476cb6b..83139b6af6 100644
--- a/gfx/layers/wr/WebRenderBridgeParent.cpp
+++ b/gfx/layers/wr/WebRenderBridgeParent.cpp
@@ -141,7 +141,7 @@ void gfx_wr_set_crash_annotation(mozilla::wr::CrashAnnotation aAnnotation,
return;
}
- CrashReporter::AnnotateCrashReport(annotation, nsDependentCString(aValue));
+ CrashReporter::RecordAnnotationCString(annotation, aValue);
}
void gfx_wr_clear_crash_annotation(mozilla::wr::CrashAnnotation aAnnotation) {
@@ -150,7 +150,7 @@ void gfx_wr_clear_crash_annotation(mozilla::wr::CrashAnnotation aAnnotation) {
return;
}
- CrashReporter::RemoveCrashReportAnnotation(annotation);
+ CrashReporter::UnrecordAnnotation(annotation);
}
}
@@ -1188,7 +1188,8 @@ mozilla::ipc::IPCResult WebRenderBridgeParent::RecvSetDisplayList(
IsRootWebRenderBridgeParent());
if (!IsRootWebRenderBridgeParent()) {
- CrashReporter::AnnotateCrashReport(CrashReporter::Annotation::URL, aTxnURL);
+ CrashReporter::RecordAnnotationNSCString(CrashReporter::Annotation::URL,
+ aTxnURL);
}
CompositorBridgeParent* cbp = GetRootCompositorBridgeParent();
@@ -1330,7 +1331,8 @@ mozilla::ipc::IPCResult WebRenderBridgeParent::RecvEmptyTransaction(
IsRootWebRenderBridgeParent());
if (!IsRootWebRenderBridgeParent()) {
- CrashReporter::AnnotateCrashReport(CrashReporter::Annotation::URL, aTxnURL);
+ CrashReporter::RecordAnnotationNSCString(CrashReporter::Annotation::URL,
+ aTxnURL);
}
AUTO_PROFILER_TRACING_MARKER("Paint", "EmptyTransaction", GRAPHICS);
diff --git a/gfx/layers/wr/WebRenderImageHost.cpp b/gfx/layers/wr/WebRenderImageHost.cpp
index e3bbd5d50f..5016bc30f8 100644
--- a/gfx/layers/wr/WebRenderImageHost.cpp
+++ b/gfx/layers/wr/WebRenderImageHost.cpp
@@ -198,8 +198,11 @@ void WebRenderImageHost::UseRemoteTexture() {
while (!mPendingRemoteTextureWrappers.empty()) {
auto* wrapper =
mPendingRemoteTextureWrappers.front()->AsRemoteTextureHostWrapper();
- mWaitingReadyCallback = RemoteTextureMap::Get()->GetRemoteTexture(
- wrapper, readyCallback, mWaitForRemoteTextureOwner);
+ if (mWaitForRemoteTextureOwner) {
+ RemoteTextureMap::Get()->WaitForRemoteTextureOwner(wrapper);
+ }
+ mWaitingReadyCallback =
+ RemoteTextureMap::Get()->GetRemoteTexture(wrapper, readyCallback);
MOZ_ASSERT_IF(mWaitingReadyCallback, !wrapper->IsReadyForRendering());
if (!wrapper->IsReadyForRendering()) {
break;
@@ -213,9 +216,9 @@ void WebRenderImageHost::UseRemoteTexture() {
mPendingRemoteTextureWrappers.pop_front();
MOZ_ASSERT(mPendingRemoteTextureWrappers.empty());
- std::function<void(const RemoteTextureInfo&)> function;
- RemoteTextureMap::Get()->GetRemoteTexture(wrapper, std::move(function),
- mWaitForRemoteTextureOwner);
+ if (mWaitForRemoteTextureOwner) {
+ RemoteTextureMap::Get()->WaitForRemoteTextureOwner(wrapper);
+ }
mWaitForRemoteTextureOwner = false;
}
diff --git a/gfx/layers/wr/WebRenderScrollData.cpp b/gfx/layers/wr/WebRenderScrollData.cpp
index 538df8bdef..905b7e1de0 100644
--- a/gfx/layers/wr/WebRenderScrollData.cpp
+++ b/gfx/layers/wr/WebRenderScrollData.cpp
@@ -370,6 +370,22 @@ void WebRenderScrollData::ApplyUpdates(ScrollUpdatesMap&& aUpdates,
mPaintSequenceNumber = aPaintSequenceNumber;
}
+void WebRenderScrollData::PrependUpdates(
+ const WebRenderScrollData& aPreviousData) {
+ for (auto previousMetadata : aPreviousData.mScrollMetadatas) {
+ const nsTArray<ScrollPositionUpdate>& previousUpdates =
+ previousMetadata.GetScrollUpdates();
+ if (previousUpdates.IsEmpty()) {
+ continue;
+ }
+
+ if (Maybe<size_t> index =
+ HasMetadataFor(previousMetadata.GetMetrics().GetScrollId())) {
+ mScrollMetadatas[*index].PrependUpdates(previousUpdates);
+ }
+ }
+}
+
void WebRenderScrollData::DumpSubtree(std::ostream& aOut, size_t aIndex,
const std::string& aIndent) const {
aOut << aIndent;
diff --git a/gfx/layers/wr/WebRenderScrollData.h b/gfx/layers/wr/WebRenderScrollData.h
index c575d4ca21..fd82ac93fc 100644
--- a/gfx/layers/wr/WebRenderScrollData.h
+++ b/gfx/layers/wr/WebRenderScrollData.h
@@ -276,6 +276,13 @@ class WebRenderScrollData {
void ApplyUpdates(ScrollUpdatesMap&& aUpdates, uint32_t aPaintSequenceNumber);
+ // Prepend the scroll position updates in the previous data to this data so
+ // that we can handle all scroll position updates in the proper order.
+ void PrependUpdates(const WebRenderScrollData& aPreviousData);
+
+ void SetWasUpdateSkipped() { mWasUpdateSkipped = true; }
+ bool GetWasUpdateSkipped() const { return mWasUpdateSkipped; }
+
friend struct IPC::ParamTraits<WebRenderScrollData>;
friend std::ostream& operator<<(std::ostream& aOut,
@@ -328,6 +335,12 @@ class WebRenderScrollData {
bool mIsFirstPaint;
uint32_t mPaintSequenceNumber;
+
+ // Wether this data was skipped to updated because the parent process hasn't
+ // yet gotten the referent LayersId for this data.
+ //
+ // Note this variable is not copied over IPC.
+ bool mWasUpdateSkipped = false;
};
} // namespace layers