Bug 1333503 - Remove some dead code relating to overfill calculation. r=mchang,mrbkap

MozReview-Commit-ID: HiT0jJynpyC
This commit is contained in:
Kartikaya Gupta 2017-01-25 14:03:36 -05:00
Родитель 05bfbf26be
Коммит 40947fdc4f
12 изменённых файлов: 0 добавлений и 110 удалений

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

@ -8000,24 +8000,6 @@ nsGlobalWindow::MozScrollSnap()
} }
} }
void
nsGlobalWindow::MozRequestOverfill(OverfillCallback& aCallback,
mozilla::ErrorResult& aError)
{
MOZ_ASSERT(IsInnerWindow());
nsIWidget* widget = nsContentUtils::WidgetForDocument(mDoc);
if (widget) {
mozilla::layers::LayerManager* manager = widget->GetLayerManager();
if (manager) {
manager->RequestOverfill(&aCallback);
return;
}
}
aError.Throw(NS_ERROR_NOT_AVAILABLE);
}
void void
nsGlobalWindow::ClearTimeout(int32_t aHandle) nsGlobalWindow::ClearTimeout(int32_t aHandle)
{ {

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

@ -1071,7 +1071,6 @@ public:
{ {
return GetScrollY(aError); return GetScrollY(aError);
} }
void MozRequestOverfill(mozilla::dom::OverfillCallback& aCallback, mozilla::ErrorResult& aError);
void GetScreenX(JSContext* aCx, JS::MutableHandle<JS::Value> aValue, void GetScreenX(JSContext* aCx, JS::MutableHandle<JS::Value> aValue,
mozilla::dom::CallerType aCallerType, mozilla::dom::CallerType aCallerType,
mozilla::ErrorResult& aError); mozilla::ErrorResult& aError);

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

@ -207,17 +207,6 @@ partial interface Window {
[Throws, NeedsCallerType] attribute any outerHeight; [Throws, NeedsCallerType] attribute any outerHeight;
}; };
/**
* Special function that gets the fill ratio from the compositor used for testing
* and is an indicator that we're layerizing correctly.
* This function will call the given callback current fill ratio for a
* composited frame. We don't guarantee which frame fill ratios will be returned.
*/
partial interface Window {
[ChromeOnly, Throws] void mozRequestOverfill(OverfillCallback callback);
};
callback OverfillCallback = void (unsigned long overfill);
// https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/RequestAnimationFrame/Overview.html // https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/RequestAnimationFrame/Overview.html
partial interface Window { partial interface Window {
[Throws] long requestAnimationFrame(FrameRequestCallback callback); [Throws] long requestAnimationFrame(FrameRequestCallback callback);

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

@ -70,10 +70,6 @@ namespace gfx {
class DrawTarget; class DrawTarget;
} // namespace gfx } // namespace gfx
namespace dom {
class OverfillCallback;
} // namespace dom
namespace layers { namespace layers {
class Animation; class Animation;
@ -642,8 +638,6 @@ public:
bool IsInTransaction() const { return mInTransaction; } bool IsInTransaction() const { return mInTransaction; }
virtual void GetFrameUniformity(FrameUniformityData* aOutData) { } virtual void GetFrameUniformity(FrameUniformityData* aOutData) { }
virtual bool RequestOverfill(mozilla::dom::OverfillCallback* aCallback) { return true; }
virtual void RunOverfillCallback(const uint32_t aOverfill) { }
virtual void SetRegionToClear(const nsIntRegion& aRegion) virtual void SetRegionToClear(const nsIntRegion& aRegion)
{ {

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

@ -26,7 +26,6 @@
#include "nsTArray.h" // for AutoTArray #include "nsTArray.h" // for AutoTArray
#include "nsXULAppAPI.h" // for XRE_GetProcessType, etc #include "nsXULAppAPI.h" // for XRE_GetProcessType, etc
#include "TiledLayerBuffer.h" #include "TiledLayerBuffer.h"
#include "mozilla/dom/WindowBinding.h" // for Overfill Callback
#include "FrameLayerBuilder.h" // for FrameLayerbuilder #include "FrameLayerBuilder.h" // for FrameLayerbuilder
#ifdef MOZ_WIDGET_ANDROID #ifdef MOZ_WIDGET_ANDROID
#include "AndroidBridge.h" #include "AndroidBridge.h"
@ -545,35 +544,6 @@ ClientLayerManager::GetFrameUniformity(FrameUniformityData* aOutData)
return LayerManager::GetFrameUniformity(aOutData); return LayerManager::GetFrameUniformity(aOutData);
} }
bool
ClientLayerManager::RequestOverfill(mozilla::dom::OverfillCallback* aCallback)
{
MOZ_ASSERT(aCallback != nullptr);
MOZ_ASSERT(HasShadowManager(), "Request Overfill only supported on b2g for now");
if (HasShadowManager()) {
CompositorBridgeChild* child = GetRemoteRenderer();
NS_ASSERTION(child, "Could not get CompositorBridgeChild");
child->AddOverfillObserver(this);
child->SendRequestOverfill();
mOverfillCallbacks.AppendElement(aCallback);
}
return true;
}
void
ClientLayerManager::RunOverfillCallback(const uint32_t aOverfill)
{
for (size_t i = 0; i < mOverfillCallbacks.Length(); i++) {
ErrorResult error;
mOverfillCallbacks[i]->Call(aOverfill, error);
}
mOverfillCallbacks.Clear();
}
void void
ClientLayerManager::MakeSnapshotIfRequired() ClientLayerManager::MakeSnapshotIfRequired()
{ {

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

@ -174,8 +174,6 @@ public:
virtual void Composite() override; virtual void Composite() override;
virtual void GetFrameUniformity(FrameUniformityData* aFrameUniformityData) override; virtual void GetFrameUniformity(FrameUniformityData* aFrameUniformityData) override;
virtual bool RequestOverfill(mozilla::dom::OverfillCallback* aCallback) override;
virtual void RunOverfillCallback(const uint32_t aOverfill) override;
void DidComposite(uint64_t aTransactionId, void DidComposite(uint64_t aTransactionId,
const mozilla::TimeStamp& aCompositeStart, const mozilla::TimeStamp& aCompositeStart,
@ -336,7 +334,6 @@ private:
APZTestData mApzTestData; APZTestData mApzTestData;
RefPtr<ShadowLayerForwarder> mForwarder; RefPtr<ShadowLayerForwarder> mForwarder;
AutoTArray<dom::OverfillCallback*,0> mOverfillCallbacks;
mozilla::TimeStamp mTransactionStart; mozilla::TimeStamp mTransactionStart;
nsTArray<DidCompositeObserver*> mDidCompositeObservers; nsTArray<DidCompositeObserver*> mDidCompositeObservers;

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

@ -585,23 +585,6 @@ CompositorBridgeChild::RecvDidComposite(const uint64_t& aId, const uint64_t& aTr
return IPC_OK(); return IPC_OK();
} }
mozilla::ipc::IPCResult
CompositorBridgeChild::RecvOverfill(const uint32_t &aOverfill)
{
for (size_t i = 0; i < mOverfillObservers.Length(); i++) {
mOverfillObservers[i]->RunOverfillCallback(aOverfill);
}
mOverfillObservers.Clear();
return IPC_OK();
}
void
CompositorBridgeChild::AddOverfillObserver(ClientLayerManager* aLayerManager)
{
MOZ_ASSERT(aLayerManager);
mOverfillObservers.AppendElement(aLayerManager);
}
mozilla::ipc::IPCResult mozilla::ipc::IPCResult
CompositorBridgeChild::RecvClearCachedResources(const uint64_t& aId) CompositorBridgeChild::RecvClearCachedResources(const uint64_t& aId)
{ {

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

@ -93,8 +93,6 @@ public:
// process). This may only be called on the main thread. // process). This may only be called on the main thread.
static bool CompositorIsInGPUProcess(); static bool CompositorIsInGPUProcess();
void AddOverfillObserver(ClientLayerManager* aLayerManager);
virtual mozilla::ipc::IPCResult virtual mozilla::ipc::IPCResult
RecvClearCachedResources(const uint64_t& id) override; RecvClearCachedResources(const uint64_t& id) override;
@ -111,9 +109,6 @@ public:
const TextureFactoryIdentifier& aNewIdentifier, const TextureFactoryIdentifier& aNewIdentifier,
const uint64_t& aSequenceNumber) override; const uint64_t& aSequenceNumber) override;
virtual mozilla::ipc::IPCResult
RecvOverfill(const uint32_t &aOverfill) override;
virtual mozilla::ipc::IPCResult virtual mozilla::ipc::IPCResult
RecvUpdatePluginConfigurations(const LayoutDeviceIntPoint& aContentOffset, RecvUpdatePluginConfigurations(const LayoutDeviceIntPoint& aContentOffset,
const LayoutDeviceIntRegion& aVisibleRegion, const LayoutDeviceIntRegion& aVisibleRegion,
@ -308,9 +303,6 @@ private:
DISALLOW_EVIL_CONSTRUCTORS(CompositorBridgeChild); DISALLOW_EVIL_CONSTRUCTORS(CompositorBridgeChild);
// When we receive overfill numbers, notify these client layer managers
AutoTArray<ClientLayerManager*,0> mOverfillObservers;
// True until the beginning of the two-step shutdown sequence of this actor. // True until the beginning of the two-step shutdown sequence of this actor.
bool mCanSend; bool mCanSend;

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

@ -1273,14 +1273,6 @@ CompositorBridgeParent::RecvGetFrameUniformity(FrameUniformityData* aOutData)
return IPC_OK(); return IPC_OK();
} }
mozilla::ipc::IPCResult
CompositorBridgeParent::RecvRequestOverfill()
{
uint32_t overfillRatio = mCompositor->GetFillRatio();
Unused << SendOverfill(overfillRatio);
return IPC_OK();
}
void void
CompositorBridgeParent::FlushApzRepaints(const LayerTransactionParent* aLayerTree) CompositorBridgeParent::FlushApzRepaints(const LayerTransactionParent* aLayerTree)
{ {

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

@ -177,7 +177,6 @@ public:
bool* aResult, bool* aResult,
TextureFactoryIdentifier* aOutIdentifier) override; TextureFactoryIdentifier* aOutIdentifier) override;
virtual mozilla::ipc::IPCResult RecvGetFrameUniformity(FrameUniformityData* aOutData) override; virtual mozilla::ipc::IPCResult RecvGetFrameUniformity(FrameUniformityData* aOutData) override;
virtual mozilla::ipc::IPCResult RecvRequestOverfill() override;
virtual mozilla::ipc::IPCResult RecvWillClose() override; virtual mozilla::ipc::IPCResult RecvWillClose() override;
virtual mozilla::ipc::IPCResult RecvPause() override; virtual mozilla::ipc::IPCResult RecvPause() override;
virtual mozilla::ipc::IPCResult RecvResume() override; virtual mozilla::ipc::IPCResult RecvResume() override;

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

@ -50,7 +50,6 @@ public:
bool* aResult, bool* aResult,
TextureFactoryIdentifier* aOutIdentifier) override TextureFactoryIdentifier* aOutIdentifier) override
{ return IPC_FAIL_NO_REASON(this); } { return IPC_FAIL_NO_REASON(this); }
virtual mozilla::ipc::IPCResult RecvRequestOverfill() override { return IPC_OK(); }
virtual mozilla::ipc::IPCResult RecvWillClose() override { return IPC_OK(); } virtual mozilla::ipc::IPCResult RecvWillClose() override { return IPC_OK(); }
virtual mozilla::ipc::IPCResult RecvPause() override { return IPC_OK(); } virtual mozilla::ipc::IPCResult RecvPause() override { return IPC_OK(); }
virtual mozilla::ipc::IPCResult RecvResume() override { return IPC_OK(); } virtual mozilla::ipc::IPCResult RecvResume() override { return IPC_OK(); }

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

@ -95,9 +95,6 @@ child:
async DidComposite(uint64_t id, uint64_t transactionId, async DidComposite(uint64_t id, uint64_t transactionId,
TimeStamp compositeStart, TimeStamp compositeEnd); TimeStamp compositeStart, TimeStamp compositeEnd);
// The parent sends the child the requested fill ratio numbers.
async Overfill(uint32_t aOverfill);
/** /**
* Parent informs the child that the graphics objects are ready for * Parent informs the child that the graphics objects are ready for
* compositing. This usually means that the graphics objects (textures * compositing. This usually means that the graphics objects (textures
@ -164,9 +161,6 @@ parent:
// request layers against an old compositor. // request layers against an old compositor.
async AcknowledgeCompositorUpdate(uint64_t aLayersId, uint64_t aSeqNo); async AcknowledgeCompositorUpdate(uint64_t aLayersId, uint64_t aSeqNo);
// Child sends the parent a request for fill ratio numbers.
async RequestOverfill();
// Child requests frame uniformity measurements // Child requests frame uniformity measurements
sync GetFrameUniformity() returns (FrameUniformityData data); sync GetFrameUniformity() returns (FrameUniformityData data);