mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
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:
parent
20dea375cb
commit
cc8a4f7fb6
@ -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;
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user