зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1574745 - Calculate mShouldInvalidateWindow at the beginning of the frame. r=mattwoodrow
This is so that we can invalidate all layers when screenshot profiling has started, and not just the first layer. Differential Revision: https://phabricator.services.mozilla.com/D43874 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
611b0edd41
Коммит
8490842d2f
|
@ -885,9 +885,9 @@ Maybe<gfx::IntRect> BasicCompositor::BeginFrameForWindow(
|
|||
|
||||
IntRect rect(IntPoint(), mWidget->GetClientSize().ToUnknownSize());
|
||||
|
||||
const bool shouldInvalidateWindow = NeedToRecreateFullWindowRenderTarget();
|
||||
mShouldInvalidateWindow = NeedToRecreateFullWindowRenderTarget();
|
||||
|
||||
if (shouldInvalidateWindow) {
|
||||
if (mShouldInvalidateWindow) {
|
||||
mInvalidRegion = rect;
|
||||
} else {
|
||||
IntRegion invalidRegionSafe;
|
||||
|
@ -1005,6 +1005,8 @@ void BasicCompositor::BeginFrameForNativeLayers() {
|
|||
MOZ_RELEASE_ASSERT(mCurrentFrameDest == FrameDestination::NO_CURRENT_FRAME,
|
||||
"mCurrentFrameDest not restored properly");
|
||||
|
||||
mShouldInvalidateWindow = NeedToRecreateFullWindowRenderTarget();
|
||||
|
||||
// Make a 1x1 dummy render target so that GetCurrentRenderTarget() returns
|
||||
// something non-null even outside of calls to
|
||||
// Begin/EndRenderingToNativeLayer.
|
||||
|
@ -1023,7 +1025,13 @@ Maybe<gfx::IntRect> BasicCompositor::BeginRenderingToNativeLayer(
|
|||
const nsIntRegion& aInvalidRegion, const Maybe<gfx::IntRect>& aClipRect,
|
||||
const nsIntRegion& aOpaqueRegion, NativeLayer* aNativeLayer) {
|
||||
IntRect rect = aNativeLayer->GetRect();
|
||||
mInvalidRegion.And(aInvalidRegion, rect);
|
||||
|
||||
if (mShouldInvalidateWindow) {
|
||||
mInvalidRegion = rect;
|
||||
} else {
|
||||
mInvalidRegion.And(aInvalidRegion, rect);
|
||||
}
|
||||
|
||||
if (mInvalidRegion.IsEmpty()) {
|
||||
return Nothing();
|
||||
}
|
||||
|
@ -1124,6 +1132,7 @@ void BasicCompositor::EndFrame() {
|
|||
break;
|
||||
}
|
||||
mCurrentFrameDest = FrameDestination::NO_CURRENT_FRAME;
|
||||
mShouldInvalidateWindow = false;
|
||||
}
|
||||
|
||||
void BasicCompositor::TryToEndRemoteDrawing() {
|
||||
|
|
|
@ -230,6 +230,7 @@ class BasicCompositor : public Compositor {
|
|||
uint32_t mMaxTextureSize;
|
||||
bool mIsPendingEndRemoteDrawing;
|
||||
bool mRecordFrames;
|
||||
bool mShouldInvalidateWindow = false;
|
||||
|
||||
// Where the current frame is being rendered to.
|
||||
enum class FrameDestination : uint8_t {
|
||||
|
|
Загрузка…
Ссылка в новой задаче