Bug 1728914 - Convert a few uses of AsLayerManager to use WebRenderLayerManager. r=gfx-reviewers,aosmond

Depends on D124419

Differential Revision: https://phabricator.services.mozilla.com/D124420
This commit is contained in:
Matt Woodrow 2021-09-05 02:16:38 +00:00
parent 20dea375cb
commit cc8a4f7fb6
2 changed files with 4 additions and 4 deletions

View File

@ -213,12 +213,12 @@ static nscoord GetMaxDisplayPortSize(nsIContent* aContent,
return safeMaximum;
}
WindowRenderer* renderer = widget->GetWindowRenderer();
if (!renderer || !renderer->AsLayerManager()) {
if (!renderer || !renderer->AsWebRender()) {
return safeMaximum;
}
nsPresContext* presContext = frame->PresContext();
int32_t maxSizeInDevPixels = renderer->AsLayerManager()->GetMaxTextureSize();
int32_t maxSizeInDevPixels = renderer->GetMaxTextureSize();
if (maxSizeInDevPixels < 0 || maxSizeInDevPixels == INT_MAX) {
return safeMaximum;
}

View File

@ -126,9 +126,9 @@ void RemoteLayerTreeOwner::GetTextureFactoryIdentifier(
RefPtr<WindowRenderer> renderer =
mBrowserParent ? GetWindowRenderer(mBrowserParent) : nullptr;
// Perhaps the document containing this frame currently has no presentation?
if (renderer && renderer->AsLayerManager()) {
if (renderer && renderer->AsWebRender()) {
*aTextureFactoryIdentifier =
renderer->AsLayerManager()->GetTextureFactoryIdentifier();
renderer->AsWebRender()->GetTextureFactoryIdentifier();
} else {
*aTextureFactoryIdentifier = TextureFactoryIdentifier();
}