зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1622360 - Remove mRenderRoot from WebRenderAPI classes. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74951
This commit is contained in:
Родитель
ac4a7f1b4d
Коммит
cae38bcf26
|
@ -325,8 +325,7 @@ already_AddRefed<WebRenderAPI> WebRenderAPI::Create(
|
|||
|
||||
return RefPtr<WebRenderAPI>(
|
||||
new WebRenderAPI(docHandle, aWindowId, maxTextureSize, useANGLE,
|
||||
useDComp, useTripleBuffering, syncHandle,
|
||||
wr::RenderRoot::Default))
|
||||
useDComp, useTripleBuffering, syncHandle))
|
||||
.forget();
|
||||
}
|
||||
|
||||
|
@ -336,30 +335,13 @@ already_AddRefed<WebRenderAPI> WebRenderAPI::Clone() {
|
|||
|
||||
RefPtr<WebRenderAPI> renderApi =
|
||||
new WebRenderAPI(docHandle, mId, mMaxTextureSize, mUseANGLE, mUseDComp,
|
||||
mUseTripleBuffering, mSyncHandle, mRenderRoot);
|
||||
mUseTripleBuffering, mSyncHandle);
|
||||
renderApi->mRootApi = this; // Hold root api
|
||||
renderApi->mRootDocumentApi = this;
|
||||
|
||||
return renderApi.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<WebRenderAPI> WebRenderAPI::CreateDocument(
|
||||
LayoutDeviceIntSize aSize, int8_t aLayerIndex, wr::RenderRoot aRenderRoot) {
|
||||
wr::DeviceIntSize wrSize;
|
||||
wrSize.width = aSize.width;
|
||||
wrSize.height = aSize.height;
|
||||
wr::DocumentHandle* newDoc;
|
||||
|
||||
wr_api_create_document(mDocHandle, &newDoc, wrSize, aLayerIndex,
|
||||
(uint32_t)aRenderRoot);
|
||||
|
||||
RefPtr<WebRenderAPI> api(
|
||||
new WebRenderAPI(newDoc, mId, mMaxTextureSize, mUseANGLE, mUseDComp,
|
||||
mUseTripleBuffering, mSyncHandle, aRenderRoot));
|
||||
api->mRootApi = this;
|
||||
return api.forget();
|
||||
}
|
||||
|
||||
wr::WrIdNamespace WebRenderAPI::GetNamespace() {
|
||||
return wr_api_get_namespace(mDocHandle);
|
||||
}
|
||||
|
@ -367,8 +349,7 @@ wr::WrIdNamespace WebRenderAPI::GetNamespace() {
|
|||
WebRenderAPI::WebRenderAPI(wr::DocumentHandle* aHandle, wr::WindowId aId,
|
||||
uint32_t aMaxTextureSize, bool aUseANGLE,
|
||||
bool aUseDComp, bool aUseTripleBuffering,
|
||||
layers::SyncHandle aSyncHandle,
|
||||
wr::RenderRoot aRenderRoot)
|
||||
layers::SyncHandle aSyncHandle)
|
||||
: mDocHandle(aHandle),
|
||||
mId(aId),
|
||||
mMaxTextureSize(aMaxTextureSize),
|
||||
|
@ -376,8 +357,7 @@ WebRenderAPI::WebRenderAPI(wr::DocumentHandle* aHandle, wr::WindowId aId,
|
|||
mUseDComp(aUseDComp),
|
||||
mUseTripleBuffering(aUseTripleBuffering),
|
||||
mCaptureSequence(false),
|
||||
mSyncHandle(aSyncHandle),
|
||||
mRenderRoot(aRenderRoot) {}
|
||||
mSyncHandle(aSyncHandle) {}
|
||||
|
||||
WebRenderAPI::~WebRenderAPI() {
|
||||
if (!mRootDocumentApi) {
|
||||
|
@ -882,13 +862,11 @@ void WebRenderAPI::RunOnRenderThread(UniquePtr<RendererEvent> aEvent) {
|
|||
DisplayListBuilder::DisplayListBuilder(PipelineId aId,
|
||||
const wr::LayoutSize& aContentSize,
|
||||
size_t aCapacity,
|
||||
layers::DisplayItemCache* aCache,
|
||||
RenderRoot aRenderRoot)
|
||||
layers::DisplayItemCache* aCache)
|
||||
: mCurrentSpaceAndClipChain(wr::RootScrollNodeWithChain()),
|
||||
mActiveFixedPosTracker(nullptr),
|
||||
mPipelineId(aId),
|
||||
mContentSize(aContentSize),
|
||||
mRenderRoot(aRenderRoot),
|
||||
mDisplayItemCache(aCache) {
|
||||
MOZ_COUNT_CTOR(DisplayListBuilder);
|
||||
mWrState = wr_state_new(aId, aContentSize, aCapacity);
|
||||
|
@ -925,8 +903,6 @@ void DisplayListBuilder::Finalize(wr::LayoutSize& aOutContentSize,
|
|||
|
||||
void DisplayListBuilder::Finalize(
|
||||
layers::RenderRootDisplayListData& aOutTransaction) {
|
||||
MOZ_ASSERT(mRenderRoot == wr::RenderRoot::Default);
|
||||
|
||||
if (mDisplayItemCache && mDisplayItemCache->IsEnabled()) {
|
||||
wr_dp_set_cache_size(mWrState, mDisplayItemCache->CurrentSize());
|
||||
}
|
||||
|
|
|
@ -230,10 +230,6 @@ class WebRenderAPI final {
|
|||
RefPtr<widget::CompositorWidget>&& aWidget,
|
||||
const wr::WrWindowId& aWindowId, LayoutDeviceIntSize aSize);
|
||||
|
||||
already_AddRefed<WebRenderAPI> CreateDocument(LayoutDeviceIntSize aSize,
|
||||
int8_t aLayerIndex,
|
||||
wr::RenderRoot aRenderRoot);
|
||||
|
||||
already_AddRefed<WebRenderAPI> Clone();
|
||||
|
||||
wr::WindowId GetId() const { return mId; }
|
||||
|
@ -267,7 +263,6 @@ class WebRenderAPI final {
|
|||
void AccumulateMemoryReport(wr::MemoryReport*);
|
||||
|
||||
wr::WrIdNamespace GetNamespace();
|
||||
wr::RenderRoot GetRenderRoot() const { return mRenderRoot; }
|
||||
uint32_t GetMaxTextureSize() const { return mMaxTextureSize; }
|
||||
bool GetUseANGLE() const { return mUseANGLE; }
|
||||
bool GetUseDComp() const { return mUseDComp; }
|
||||
|
@ -306,8 +301,7 @@ class WebRenderAPI final {
|
|||
protected:
|
||||
WebRenderAPI(wr::DocumentHandle* aHandle, wr::WindowId aId,
|
||||
uint32_t aMaxTextureSize, bool aUseANGLE, bool aUseDComp,
|
||||
bool aUseTripleBuffering, layers::SyncHandle aSyncHandle,
|
||||
wr::RenderRoot aRenderRoot);
|
||||
bool aUseTripleBuffering, layers::SyncHandle aSyncHandle);
|
||||
|
||||
~WebRenderAPI();
|
||||
// Should be used only for shutdown handling
|
||||
|
@ -323,7 +317,6 @@ class WebRenderAPI final {
|
|||
bool mUseTripleBuffering;
|
||||
bool mCaptureSequence;
|
||||
layers::SyncHandle mSyncHandle;
|
||||
wr::RenderRoot mRenderRoot;
|
||||
|
||||
// We maintain alive the root api to know when to shut the render backend
|
||||
// down, and the root api for the document to know when to delete the
|
||||
|
@ -403,8 +396,7 @@ class DisplayListBuilder final {
|
|||
public:
|
||||
DisplayListBuilder(wr::PipelineId aId, const wr::LayoutSize& aContentSize,
|
||||
size_t aCapacity = 0,
|
||||
layers::DisplayItemCache* aCache = nullptr,
|
||||
RenderRoot aRenderRoot = RenderRoot::Default);
|
||||
layers::DisplayItemCache* aCache = nullptr);
|
||||
DisplayListBuilder(DisplayListBuilder&&) = default;
|
||||
|
||||
~DisplayListBuilder();
|
||||
|
@ -421,8 +413,6 @@ class DisplayListBuilder final {
|
|||
wr::BuiltDisplayList& aOutDisplayList);
|
||||
void Finalize(layers::RenderRootDisplayListData& aOutTransaction);
|
||||
|
||||
RenderRoot GetRenderRoot() const { return mRenderRoot; }
|
||||
|
||||
Maybe<wr::WrSpatialId> PushStackingContext(
|
||||
const StackingContextParams& aParams, const wr::LayoutRect& aBounds,
|
||||
const wr::RasterSpace& aRasterSpace);
|
||||
|
@ -727,7 +717,6 @@ class DisplayListBuilder final {
|
|||
wr::LayoutSize mContentSize;
|
||||
|
||||
nsTArray<wr::PipelineId> mRemotePipelineIds;
|
||||
RenderRoot mRenderRoot;
|
||||
|
||||
layers::DisplayItemCache* mDisplayItemCache;
|
||||
Maybe<uint16_t> mCurrentCacheSlot;
|
||||
|
|
Загрузка…
Ссылка в новой задаче