зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1359993 - Reduce invalidation of video r=nical
This commit is contained in:
Родитель
76f4ddb420
Коммит
e19a847326
|
@ -1813,6 +1813,8 @@ public:
|
|||
// matches the frame metrics array length.
|
||||
|
||||
virtual void ClearCachedResources() {}
|
||||
|
||||
virtual bool SupportsAsyncUpdate() { return false; }
|
||||
private:
|
||||
void ScrollMetadataChanged();
|
||||
public:
|
||||
|
|
|
@ -59,6 +59,14 @@ protected:
|
|||
DestroyBackBuffer();
|
||||
}
|
||||
|
||||
virtual bool SupportsAsyncUpdate() override
|
||||
{
|
||||
if (GetImageClientType() == CompositableType::IMAGE_BRIDGE) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void HandleMemoryPressure() override
|
||||
{
|
||||
if (mImageClient) {
|
||||
|
|
|
@ -90,6 +90,16 @@ WebRenderImageLayer::ClearCachedResources()
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
WebRenderImageLayer::SupportsAsyncUpdate()
|
||||
{
|
||||
if (GetImageClientType() == CompositableType::IMAGE_BRIDGE &&
|
||||
mPipelineId.isSome()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
WebRenderImageLayer::RenderLayer(wr::DisplayListBuilder& aBuilder,
|
||||
const StackingContextHelper& aSc)
|
||||
|
|
|
@ -24,6 +24,8 @@ public:
|
|||
|
||||
virtual void ClearCachedResources() override;
|
||||
|
||||
virtual bool SupportsAsyncUpdate() override;
|
||||
|
||||
protected:
|
||||
virtual ~WebRenderImageLayer();
|
||||
|
||||
|
|
|
@ -6681,8 +6681,7 @@ nsIFrame::InvalidateLayer(uint32_t aDisplayItemKey,
|
|||
|
||||
// If the layer is being updated asynchronously, and it's being forwarded
|
||||
// to a compositor, then we don't need to invalidate.
|
||||
if ((aFlags & UPDATE_IS_ASYNC) && layer &&
|
||||
layer->Manager()->GetBackendType() == LayersBackend::LAYERS_CLIENT) {
|
||||
if ((aFlags & UPDATE_IS_ASYNC) && layer && layer->SupportsAsyncUpdate()) {
|
||||
return layer;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче