Bug 946958 part 1. Remove GetWidgetSize. r=mattwoodrow

This commit is contained in:
Nicholas Cameron 2013-12-09 14:40:59 +13:00
Родитель 5cac3eba12
Коммит 67f3ec8830
8 изменённых файлов: 0 добавлений и 34 удалений

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

@ -431,7 +431,6 @@ public:
// XXX I expect we will want to move mWidget into this class and implement // XXX I expect we will want to move mWidget into this class and implement
// these methods properly. // these methods properly.
virtual nsIWidget* GetWidget() const { return nullptr; } virtual nsIWidget* GetWidget() const { return nullptr; }
virtual const nsIntSize& GetWidgetSize() = 0;
// Call before and after any rendering not done by this compositor but which // Call before and after any rendering not done by this compositor but which
// might affect the compositor's internal state or the state of any APIs it // might affect the compositor's internal state or the state of any APIs it

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

@ -220,7 +220,6 @@ CreateBasicDeprecatedTextureHost(SurfaceDescriptorType aDescriptorType,
BasicCompositor::BasicCompositor(nsIWidget *aWidget) BasicCompositor::BasicCompositor(nsIWidget *aWidget)
: mWidget(aWidget) : mWidget(aWidget)
, mWidgetSize(-1, -1)
{ {
MOZ_COUNT_CTOR(BasicCompositor); MOZ_COUNT_CTOR(BasicCompositor);
sBackend = LAYERS_BASIC; sBackend = LAYERS_BASIC;
@ -540,7 +539,6 @@ BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion,
nsIntRect intRect; nsIntRect intRect;
mWidget->GetClientBounds(intRect); mWidget->GetClientBounds(intRect);
Rect rect = Rect(0, 0, intRect.width, intRect.height); Rect rect = Rect(0, 0, intRect.width, intRect.height);
mWidgetSize = intRect.Size();
nsIntRect invalidRect = aInvalidRegion.GetBounds(); nsIntRect invalidRect = aInvalidRegion.GetBounds();
mInvalidRect = IntRect(invalidRect.x, invalidRect.y, invalidRect.width, invalidRect.height); mInvalidRect = IntRect(invalidRect.x, invalidRect.y, invalidRect.width, invalidRect.height);

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

@ -119,10 +119,6 @@ public:
virtual const char* Name() const { return "Basic"; } virtual const char* Name() const { return "Basic"; }
virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; } virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; }
virtual const nsIntSize& GetWidgetSize() MOZ_OVERRIDE
{
return mWidgetSize;
}
gfx::DrawTarget *GetDrawTarget() { return mDrawTarget; } gfx::DrawTarget *GetDrawTarget() { return mDrawTarget; }

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

@ -786,12 +786,6 @@ LayerComposite::Destroy()
} }
} }
const nsIntSize&
LayerManagerComposite::GetWidgetSize()
{
return mCompositor->GetWidgetSize();
}
void void
LayerManagerComposite::SetCompositorID(uint32_t aID) LayerManagerComposite::SetCompositorID(uint32_t aID)
{ {

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

@ -198,8 +198,6 @@ public:
CreateDrawTarget(const mozilla::gfx::IntSize &aSize, CreateDrawTarget(const mozilla::gfx::IntSize &aSize,
mozilla::gfx::SurfaceFormat aFormat) MOZ_OVERRIDE; mozilla::gfx::SurfaceFormat aFormat) MOZ_OVERRIDE;
const nsIntSize& GetWidgetSize();
/** /**
* Calculates the 'completeness' of the rendering that intersected with the * Calculates the 'completeness' of the rendering that intersected with the
* screen on the last render. This is only useful when progressive tile * screen on the last render. This is only useful when progressive tile

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

@ -139,14 +139,6 @@ public:
virtual void NotifyLayersTransaction() MOZ_OVERRIDE { } virtual void NotifyLayersTransaction() MOZ_OVERRIDE { }
virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; } virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; }
virtual const nsIntSize& GetWidgetSize() MOZ_OVERRIDE
{
NS_ASSERTION(false, "Getting the widget size on windows causes some kind of resizing of buffers. "
"You should not do that outside of BeginFrame, so the best we can do is return "
"the last size we got, that might not be up to date. So you probably shouldn't "
"use this method.");
return mSize;
}
ID3D11Device* GetDevice() { return mDevice; } ID3D11Device* GetDevice() { return mDevice; }

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

@ -86,14 +86,6 @@ public:
virtual void NotifyLayersTransaction() MOZ_OVERRIDE {} virtual void NotifyLayersTransaction() MOZ_OVERRIDE {}
virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; } virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; }
virtual const nsIntSize& GetWidgetSize() MOZ_OVERRIDE
{
NS_ASSERTION(false, "Getting the widget size on windows causes some kind of resizing of buffers. "
"You should not do that outside of BeginFrame, so the best we can do is return "
"the last size we got, that might not be up to date. So you probably shouldn't "
"use this method.");
return mSize;
}
IDirect3DDevice9* device() const IDirect3DDevice9* device() const
{ {

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

@ -158,9 +158,6 @@ public:
virtual bool Resume() MOZ_OVERRIDE; virtual bool Resume() MOZ_OVERRIDE;
virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; } virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; }
virtual const nsIntSize& GetWidgetSize() MOZ_OVERRIDE {
return mWidgetSize;
}
GLContext* gl() const { return mGLContext; } GLContext* gl() const { return mGLContext; }
ShaderProgramType GetFBOLayerProgramType() const { ShaderProgramType GetFBOLayerProgramType() const {