зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1509575 - Expose the isFirstPaint flag on LayerManager. r=kats
So that it's easily available during painting. The flag is set based on nsIPresShell::mIsFirstPaint, but the pres shell flag is cleared at the beginning of the paint, so we can't query it from the pres shell during the paint. Differential Revision: https://phabricator.services.mozilla.com/D16237 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5dc5a82752
Коммит
e98d64e015
|
@ -610,6 +610,7 @@ class LayerManager : public FrameRecorder {
|
|||
* Flag the next paint as the first for a document.
|
||||
*/
|
||||
virtual void SetIsFirstPaint() {}
|
||||
virtual bool GetIsFirstPaint() const { return false; }
|
||||
|
||||
/**
|
||||
* Set the current focus target to be sent with the next paint.
|
||||
|
|
|
@ -134,6 +134,9 @@ class ClientLayerManager final : public LayerManager,
|
|||
}
|
||||
|
||||
virtual void SetIsFirstPaint() override;
|
||||
virtual bool GetIsFirstPaint() const override {
|
||||
return mForwarder->GetIsFirstPaint();
|
||||
}
|
||||
|
||||
virtual void SetFocusTarget(const FocusTarget& aFocusTarget) override;
|
||||
|
||||
|
|
|
@ -338,6 +338,7 @@ class ShadowLayerForwarder final : public LayersIPCActor,
|
|||
* Flag the next paint as the first for a document.
|
||||
*/
|
||||
void SetIsFirstPaint() { mIsFirstPaint = true; }
|
||||
bool GetIsFirstPaint() const { return mIsFirstPaint; }
|
||||
|
||||
/**
|
||||
* Set the current focus target to be sent with the next paint.
|
||||
|
|
|
@ -139,6 +139,7 @@ class WebRenderLayerManager final : public LayerManager {
|
|||
}
|
||||
virtual bool NeedsComposite() const override { return mNeedsComposite; }
|
||||
virtual void SetIsFirstPaint() override { mIsFirstPaint = true; }
|
||||
virtual bool GetIsFirstPaint() const override { return mIsFirstPaint; }
|
||||
virtual void SetFocusTarget(const FocusTarget& aFocusTarget) override;
|
||||
|
||||
virtual already_AddRefed<PersistentBufferProvider>
|
||||
|
|
Загрузка…
Ссылка в новой задаче