Bug 1688096 - Part 1. Merge SW-WR and WR render texture host paths to allow mixed compositors. r=mattwoodrow

Differential Revision: https://phabricator.services.mozilla.com/D104854
This commit is contained in:
Andrew Osmond
2021-02-18 11:50:05 +00:00
parent a2ea1a6a96
commit b76cb0a8b0
28 changed files with 313 additions and 352 deletions

View File

@@ -217,8 +217,10 @@ class RemoveRenderer : public RendererEvent {
layers::SynchronousTask* mTask;
};
TransactionBuilder::TransactionBuilder(bool aUseSceneBuilderThread)
: mUseSceneBuilderThread(aUseSceneBuilderThread) {
TransactionBuilder::TransactionBuilder(WebRenderAPI* aApi,
bool aUseSceneBuilderThread)
: mUseSceneBuilderThread(aUseSceneBuilderThread),
mApiBackend(aApi->GetBackendType()) {
mTxn = wr_transaction_new(mUseSceneBuilderThread);
}
@@ -924,11 +926,14 @@ void WebRenderAPI::RunOnRenderThread(UniquePtr<RendererEvent> aEvent) {
wr_api_send_external_event(mDocHandle, event);
}
DisplayListBuilder::DisplayListBuilder(PipelineId aId, size_t aCapacity,
DisplayListBuilder::DisplayListBuilder(PipelineId aId,
WebRenderBackend aBackend,
size_t aCapacity,
layers::DisplayItemCache* aCache)
: mCurrentSpaceAndClipChain(wr::RootScrollNodeWithChain()),
mActiveFixedPosTracker(nullptr),
mPipelineId(aId),
mBackend(aBackend),
mDisplayItemCache(aCache) {
MOZ_COUNT_CTOR(DisplayListBuilder);
mWrState = wr_state_new(aId, aCapacity);