зеркало из https://github.com/mozilla/gecko-dev.git
Remove TabParent use of CompositorBridgeParent. (bug 1274149 part 4, r=mattwoodrow)
This commit is contained in:
Родитель
25f45d71ec
Коммит
5a87aaf54e
|
@ -25,12 +25,12 @@
|
|||
#include "mozilla/EventStateManager.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/gfx/DataSurfaceHelpers.h"
|
||||
#include "mozilla/gfx/GPUProcessManager.h"
|
||||
#include "mozilla/Hal.h"
|
||||
#include "mozilla/IMEStateManager.h"
|
||||
#include "mozilla/ipc/DocumentRendererParent.h"
|
||||
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"
|
||||
#include "mozilla/layers/AsyncDragMetrics.h"
|
||||
#include "mozilla/layers/CompositorBridgeParent.h"
|
||||
#include "mozilla/layers/InputAPZContext.h"
|
||||
#include "mozilla/layout/RenderFrameParent.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
|
@ -105,6 +105,7 @@ using namespace mozilla::layout;
|
|||
using namespace mozilla::services;
|
||||
using namespace mozilla::widget;
|
||||
using namespace mozilla::jsipc;
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
// The flags passed by the webProgress notifications are 16 bits shifted
|
||||
// from the ones registered by webProgressListeners.
|
||||
|
@ -2978,7 +2979,7 @@ TabParent::RequestNotifyLayerTreeReady()
|
|||
if (!frame || !frame->IsInitted()) {
|
||||
mNeedLayerTreeReadyNotification = true;
|
||||
} else {
|
||||
CompositorBridgeParent::RequestNotifyLayerTreeReady(
|
||||
GPUProcessManager::Get()->RequestNotifyLayerTreeReady(
|
||||
frame->GetLayersId(),
|
||||
mLayerUpdateObserver);
|
||||
}
|
||||
|
@ -2993,7 +2994,7 @@ TabParent::RequestNotifyLayerTreeCleared()
|
|||
return false;
|
||||
}
|
||||
|
||||
CompositorBridgeParent::RequestNotifyLayerTreeCleared(
|
||||
GPUProcessManager::Get()->RequestNotifyLayerTreeCleared(
|
||||
frame->GetLayersId(),
|
||||
mLayerUpdateObserver);
|
||||
return true;
|
||||
|
@ -3034,10 +3035,10 @@ TabParent::SwapLayerTreeObservers(TabParent* aOther)
|
|||
return;
|
||||
}
|
||||
|
||||
// The swap that happens for the observers in CompositorBridgeParent has to
|
||||
// The swap that happens for the observers in GPUProcessManager has to
|
||||
// happen in a lock so that an update being processed on the compositor thread
|
||||
// can't grab the layer update observer for the wrong tab parent.
|
||||
CompositorBridgeParent::SwapLayerTreeObservers(
|
||||
GPUProcessManager::Get()->SwapLayerTreeObservers(
|
||||
rfp->GetLayersId(),
|
||||
otherRfp->GetLayersId());
|
||||
|
||||
|
|
|
@ -78,5 +78,23 @@ GPUProcessManager::DeallocateLayerTreeId(uint64_t aLayersId)
|
|||
CompositorBridgeParent::DeallocateLayerTreeId(aLayersId);
|
||||
}
|
||||
|
||||
void
|
||||
GPUProcessManager::RequestNotifyLayerTreeReady(uint64_t aLayersId, CompositorUpdateObserver* aObserver)
|
||||
{
|
||||
CompositorBridgeParent::RequestNotifyLayerTreeReady(aLayersId, aObserver);
|
||||
}
|
||||
|
||||
void
|
||||
GPUProcessManager::RequestNotifyLayerTreeCleared(uint64_t aLayersId, CompositorUpdateObserver* aObserver)
|
||||
{
|
||||
CompositorBridgeParent::RequestNotifyLayerTreeCleared(aLayersId, aObserver);
|
||||
}
|
||||
|
||||
void
|
||||
GPUProcessManager::SwapLayerTreeObservers(uint64_t aLayer, uint64_t aOtherLayer)
|
||||
{
|
||||
CompositorBridgeParent::SwapLayerTreeObservers(aLayer, aOtherLayer);
|
||||
}
|
||||
|
||||
} // namespace gfx
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace layers {
|
|||
class APZCTreeManager;
|
||||
class CompositorSession;
|
||||
class ClientLayerManager;
|
||||
class CompositorUpdateObserver;
|
||||
} // namespace layers
|
||||
namespace widget {
|
||||
class CompositorWidgetProxy;
|
||||
|
@ -26,6 +27,7 @@ namespace gfx {
|
|||
class GPUProcessManager final
|
||||
{
|
||||
typedef layers::APZCTreeManager APZCTreeManager;
|
||||
typedef layers::CompositorUpdateObserver CompositorUpdateObserver;
|
||||
|
||||
public:
|
||||
static void Initialize();
|
||||
|
@ -58,6 +60,10 @@ public:
|
|||
// Must run on the content main thread.
|
||||
void DeallocateLayerTreeId(uint64_t aLayersId);
|
||||
|
||||
void RequestNotifyLayerTreeReady(uint64_t aLayersId, CompositorUpdateObserver* aObserver);
|
||||
void RequestNotifyLayerTreeCleared(uint64_t aLayersId, CompositorUpdateObserver* aObserver);
|
||||
void SwapLayerTreeObservers(uint64_t aLayer, uint64_t aOtherLayer);
|
||||
|
||||
private:
|
||||
GPUProcessManager();
|
||||
|
||||
|
|
|
@ -458,10 +458,6 @@ public:
|
|||
*/
|
||||
static void PostInsertVsyncProfilerMarker(mozilla::TimeStamp aVsyncTimestamp);
|
||||
|
||||
static void RequestNotifyLayerTreeReady(uint64_t aLayersId, CompositorUpdateObserver* aObserver);
|
||||
static void RequestNotifyLayerTreeCleared(uint64_t aLayersId, CompositorUpdateObserver* aObserver);
|
||||
static void SwapLayerTreeObservers(uint64_t aLayer, uint64_t aOtherLayer);
|
||||
|
||||
float ComputeRenderIntegrity();
|
||||
|
||||
widget::CompositorWidgetProxy* GetWidgetProxy() { return mWidgetProxy; }
|
||||
|
@ -506,6 +502,10 @@ private:
|
|||
*/
|
||||
static void DeallocateLayerTreeId(uint64_t aId);
|
||||
|
||||
static void RequestNotifyLayerTreeReady(uint64_t aLayersId, CompositorUpdateObserver* aObserver);
|
||||
static void RequestNotifyLayerTreeCleared(uint64_t aLayersId, CompositorUpdateObserver* aObserver);
|
||||
static void SwapLayerTreeObservers(uint64_t aLayer, uint64_t aOtherLayer);
|
||||
|
||||
protected:
|
||||
// Protected destructor, to discourage deletion outside of Release():
|
||||
virtual ~CompositorBridgeParent();
|
||||
|
|
Загрузка…
Ссылка в новой задаче