Back out 6a24b31747be (bug 1232042) for crashes @RecvForcePresent

CLOSED TREE
This commit is contained in:
Phil Ringnalda 2016-02-23 21:27:46 -08:00
Родитель fd04611c7c
Коммит a5861fc16a
8 изменённых файлов: 2 добавлений и 36 удалений

Просмотреть файл

@ -450,8 +450,6 @@ public:
*/
virtual bool Ready() { return true; }
virtual void ForcePresent() { }
// XXX I expect we will want to move mWidget into this class and implement
// these methods properly.
virtual nsIWidget* GetWidget() const { return nullptr; }

Просмотреть файл

@ -285,8 +285,6 @@ public:
// overlay.
void SetWindowOverlayChanged() { mWindowOverlayChanged = true; }
void ForcePresent() { mCompositor->ForcePresent(); }
private:
/** Region we're clipping our current drawing to. */
nsIntRegion mClippingRegion;

Просмотреть файл

@ -143,8 +143,6 @@ public:
return LayersBackend::LAYERS_D3D11;
}
virtual void ForcePresent() { mSwapChain->Present(0, 0); }
virtual nsIWidget* GetWidget() const override { return mWidget; }
ID3D11Device* GetDevice() { return mDevice; }

Просмотреть файл

@ -872,13 +872,6 @@ CompositorParent::RecvFlushRendering()
return true;
}
bool
CompositorParent::RecvForcePresent()
{
mLayerManager->ForcePresent();
return true;
}
bool
CompositorParent::RecvGetTileSize(int32_t* aWidth, int32_t* aHeight)
{
@ -1912,7 +1905,6 @@ public:
virtual bool RecvMakeWidgetSnapshot(const SurfaceDescriptor& aInSnapshot) override
{ return true; }
virtual bool RecvFlushRendering() override { return true; }
virtual bool RecvForcePresent() override { return true; }
virtual bool RecvNotifyRegionInvalidated(const nsIntRegion& aRegion) override { return true; }
virtual bool RecvStartFrameTimeRecording(const int32_t& aBufferSize, uint32_t* aOutStartIndex) override { return true; }
virtual bool RecvStopFrameTimeRecording(const uint32_t& aStartIndex, InfallibleTArray<float>* intervals) override { return true; }

Просмотреть файл

@ -237,7 +237,6 @@ public:
const gfx::IntRect& aRect) override;
virtual bool RecvMakeWidgetSnapshot(const SurfaceDescriptor& aInSnapshot) override;
virtual bool RecvFlushRendering() override;
virtual bool RecvForcePresent() override;
virtual bool RecvGetTileSize(int32_t* aWidth, int32_t* aHeight) override;

Просмотреть файл

@ -140,10 +140,6 @@ parent:
// block until they are completed.
sync FlushRendering();
// Force an additional frame presentation to be executed. This is used to
// work around a windows presentation bug (See Bug 1232042)
async ForcePresent();
// Get the size of the tiles. This number should not change at runtime.
sync GetTileSize()
returns (int32_t tileWidth, int32_t tileHeight);

Просмотреть файл

@ -263,8 +263,6 @@ public:
static void ClearCompositor(nsWindow* aWindow);
void ForcePresent();
/**
* AssociateDefaultIMC() associates or disassociates the default IMC for
* the window.

Просмотреть файл

@ -43,7 +43,6 @@ using mozilla::plugins::PluginInstanceParent;
#include "nsIXULRuntime.h"
#include "mozilla/layers/CompositorParent.h"
#include "mozilla/layers/CompositorChild.h"
#include "ClientLayerManager.h"
#include "nsUXThemeData.h"
@ -167,13 +166,6 @@ nsIWidgetListener* nsWindow::GetPaintListener()
return mAttachedWidgetListener ? mAttachedWidgetListener : mWidgetListener;
}
void nsWindow::ForcePresent()
{
if (CompositorChild* remoteRenderer = GetRemoteRenderer()) {
remoteRenderer->SendForcePresent();
}
}
bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
{
// We never have reentrant paint events, except when we're running our RPC
@ -524,13 +516,8 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
}
break;
case LayersBackend::LAYERS_CLIENT:
{
result = listener->PaintWindow(
this, LayoutDeviceIntRegion::FromUnknownRegion(region));
nsCOMPtr<nsIRunnable> event =
NS_NewRunnableMethod(this, &nsWindow::ForcePresent);
NS_DispatchToMainThread(event);
}
result = listener->PaintWindow(
this, LayoutDeviceIntRegion::FromUnknownRegion(region));
break;
default:
NS_ERROR("Unknown layers backend used!");