зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1622360 - Remove render root arguments from ScheduleRender functions. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74404
This commit is contained in:
Родитель
cf2201e264
Коммит
6e66eea2d4
|
@ -19,13 +19,9 @@ class CompositorController {
|
|||
NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING
|
||||
|
||||
/**
|
||||
* Ask the compositor to schedule a new composite. If WebRender is enabled,
|
||||
* and the provided render root set is non-empty, then only those render roots
|
||||
* will be scheduled for a recomposite. Otherwise, all render roots will be
|
||||
* scheduled.
|
||||
* Ask the compositor to schedule a new composite.
|
||||
*/
|
||||
virtual void ScheduleRenderOnCompositorThread(
|
||||
const wr::RenderRootSet& aRenderRoots) = 0;
|
||||
virtual void ScheduleRenderOnCompositorThread() = 0;
|
||||
virtual void ScheduleHideAllPluginWindows() = 0;
|
||||
virtual void ScheduleShowAllPluginWindows() = 0;
|
||||
|
||||
|
|
|
@ -717,8 +717,7 @@ void APZCTreeManager::SampleForWebRender(
|
|||
controller = aState.GetCompositorController();
|
||||
});
|
||||
if (controller) {
|
||||
controller->ScheduleRenderOnCompositorThread(
|
||||
wr::RenderRootSet(aRenderRoot));
|
||||
controller->ScheduleRenderOnCompositorThread();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3807,8 +3807,7 @@ const ScreenMargin AsyncPanZoomController::CalculatePendingDisplayPort(
|
|||
|
||||
void AsyncPanZoomController::ScheduleComposite() {
|
||||
if (mCompositorController) {
|
||||
mCompositorController->ScheduleRenderOnCompositorThread(
|
||||
wr::RenderRootSet(mRenderRoot));
|
||||
mCompositorController->ScheduleRenderOnCompositorThread();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -677,12 +677,11 @@ void CompositorBridgeParent::ActorDestroy(ActorDestroyReason why) {
|
|||
&CompositorBridgeParent::DeferredDestroy));
|
||||
}
|
||||
|
||||
void CompositorBridgeParent::ScheduleRenderOnCompositorThread(
|
||||
const wr::RenderRootSet& aRenderRoots) {
|
||||
void CompositorBridgeParent::ScheduleRenderOnCompositorThread() {
|
||||
MOZ_ASSERT(CompositorThread());
|
||||
CompositorThread()->Dispatch(NewRunnableMethod<wr::RenderRootSet>(
|
||||
CompositorThread()->Dispatch(NewRunnableMethod(
|
||||
"layers::CompositorBridgeParent::ScheduleComposition", this,
|
||||
&CompositorBridgeParent::ScheduleComposition, aRenderRoots));
|
||||
&CompositorBridgeParent::ScheduleComposition));
|
||||
}
|
||||
|
||||
void CompositorBridgeParent::InvalidateOnCompositorThread() {
|
||||
|
@ -751,7 +750,7 @@ void CompositorBridgeParent::ResumeComposition() {
|
|||
void CompositorBridgeParent::ForceComposition() {
|
||||
// Cancel the orientation changed state to force composition
|
||||
mForceCompositionTask = nullptr;
|
||||
ScheduleRenderOnCompositorThread(wr::RenderRootSet());
|
||||
ScheduleRenderOnCompositorThread();
|
||||
}
|
||||
|
||||
void CompositorBridgeParent::CancelCurrentCompositeTask() {
|
||||
|
@ -880,8 +879,7 @@ void CompositorBridgeParent::NotifyShadowTreeTransaction(
|
|||
}
|
||||
}
|
||||
|
||||
void CompositorBridgeParent::ScheduleComposition(
|
||||
const wr::RenderRootSet& aRenderRoots) {
|
||||
void CompositorBridgeParent::ScheduleComposition() {
|
||||
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
|
||||
if (mPaused) {
|
||||
return;
|
||||
|
|
|
@ -475,8 +475,7 @@ class CompositorBridgeParent final : public CompositorBridgeParentBase,
|
|||
void AsyncRender();
|
||||
|
||||
// Can be called from any thread
|
||||
void ScheduleRenderOnCompositorThread(
|
||||
const wr::RenderRootSet& aRenderRoots) override;
|
||||
void ScheduleRenderOnCompositorThread() override;
|
||||
void SchedulePauseOnCompositorThread();
|
||||
void InvalidateOnCompositorThread();
|
||||
/**
|
||||
|
@ -486,8 +485,7 @@ class CompositorBridgeParent final : public CompositorBridgeParentBase,
|
|||
bool ScheduleResumeOnCompositorThread();
|
||||
bool ScheduleResumeOnCompositorThread(int x, int y, int width, int height);
|
||||
|
||||
void ScheduleComposition(
|
||||
const wr::RenderRootSet& aRenderRoots = wr::RenderRootSet());
|
||||
void ScheduleComposition();
|
||||
|
||||
void NotifyShadowTreeTransaction(LayersId aId, bool aIsFirstPaint,
|
||||
const FocusTarget& aFocusTarget,
|
||||
|
|
|
@ -1080,17 +1080,11 @@ void wr_notifier_external_event(mozilla::wr::WrWindowId aWindowId,
|
|||
std::move(evt));
|
||||
}
|
||||
|
||||
void wr_schedule_render(mozilla::wr::WrWindowId aWindowId,
|
||||
const mozilla::wr::WrDocumentId* aDocumentIds,
|
||||
size_t aDocumentIdsCount) {
|
||||
void wr_schedule_render(mozilla::wr::WrWindowId aWindowId) {
|
||||
RefPtr<mozilla::layers::CompositorBridgeParent> cbp = mozilla::layers::
|
||||
CompositorBridgeParent::GetCompositorBridgeParentFromWindowId(aWindowId);
|
||||
if (cbp) {
|
||||
wr::RenderRootSet renderRoots;
|
||||
for (size_t i = 0; i < aDocumentIdsCount; ++i) {
|
||||
renderRoots += wr::RenderRootFromId(aDocumentIds[i]);
|
||||
}
|
||||
cbp->ScheduleRenderOnCompositorThread(renderRoots);
|
||||
cbp->ScheduleRenderOnCompositorThread();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -524,7 +524,7 @@ extern "C" {
|
|||
fn wr_notifier_new_frame_ready(window_id: WrWindowId);
|
||||
fn wr_notifier_nop_frame_done(window_id: WrWindowId);
|
||||
fn wr_notifier_external_event(window_id: WrWindowId, raw_event: usize);
|
||||
fn wr_schedule_render(window_id: WrWindowId, document_id_array: *const WrDocumentId, document_id_count: usize);
|
||||
fn wr_schedule_render(window_id: WrWindowId);
|
||||
// NOTE: This moves away from pipeline_info.
|
||||
fn wr_finished_scene_build(
|
||||
window_id: WrWindowId,
|
||||
|
@ -939,8 +939,8 @@ impl SceneBuilderHooks for APZCallbacks {
|
|||
}
|
||||
}
|
||||
|
||||
fn post_resource_update(&self, document_ids: &Vec<DocumentId>) {
|
||||
unsafe { wr_schedule_render(self.window_id, document_ids.as_ptr(), document_ids.len()) }
|
||||
fn post_resource_update(&self, _document_ids: &Vec<DocumentId>) {
|
||||
unsafe { wr_schedule_render(self.window_id) }
|
||||
unsafe {
|
||||
gecko_profiler_end_marker(b"SceneBuilding\0".as_ptr() as *const c_char);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче