зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1677929 - Stop passing aEpochsBeingRendered to WebRender's APZ sampling callback, because it's now unused. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D99144
This commit is contained in:
Родитель
f85a609d81
Коммит
84b150a119
|
@ -56,15 +56,13 @@ class APZSampler {
|
|||
* which thread it is.
|
||||
*/
|
||||
static void SetSamplerThread(const wr::WrWindowId& aWindowId);
|
||||
static void SampleForWebRender(
|
||||
const wr::WrWindowId& aWindowId, const uint64_t* aGeneratedFrameId,
|
||||
wr::Transaction* aTransaction,
|
||||
const wr::WrPipelineIdEpochs* aEpochsBeingRendered);
|
||||
static void SampleForWebRender(const wr::WrWindowId& aWindowId,
|
||||
const uint64_t* aGeneratedFrameId,
|
||||
wr::Transaction* aTransaction);
|
||||
|
||||
void SetSampleTime(const SampleTime& aSampleTime);
|
||||
void SampleForWebRender(const Maybe<VsyncId>& aGeneratedFrameId,
|
||||
wr::TransactionWrapper& aTxn,
|
||||
const wr::WrPipelineIdEpochs* aEpochsBeingRendered);
|
||||
wr::TransactionWrapper& aTxn);
|
||||
|
||||
bool AdvanceAnimations(const SampleTime& aSampleTime);
|
||||
|
||||
|
|
|
@ -705,10 +705,9 @@ void APZCTreeManager::UpdateHitTestingTree(
|
|||
aPaintSequenceNumber);
|
||||
}
|
||||
|
||||
void APZCTreeManager::SampleForWebRender(
|
||||
const Maybe<VsyncId>& aVsyncId, wr::TransactionWrapper& aTxn,
|
||||
const SampleTime& aSampleTime,
|
||||
const wr::WrPipelineIdEpochs* aEpochsBeingRendered) {
|
||||
void APZCTreeManager::SampleForWebRender(const Maybe<VsyncId>& aVsyncId,
|
||||
wr::TransactionWrapper& aTxn,
|
||||
const SampleTime& aSampleTime) {
|
||||
AssertOnSamplerThread();
|
||||
MutexAutoLock lock(mMapLock);
|
||||
|
||||
|
|
|
@ -198,8 +198,7 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
|
|||
*/
|
||||
void SampleForWebRender(const Maybe<VsyncId>& aVsyncId,
|
||||
wr::TransactionWrapper& aTxn,
|
||||
const SampleTime& aSampleTime,
|
||||
const wr::WrPipelineIdEpochs* aEpochsBeingRendered);
|
||||
const SampleTime& aSampleTime);
|
||||
|
||||
/**
|
||||
* Walk through all the APZCs and do the sampling steps needed when
|
||||
|
|
|
@ -65,15 +65,14 @@ void APZSampler::SetSamplerThread(const wr::WrWindowId& aWindowId) {
|
|||
}
|
||||
|
||||
/*static*/
|
||||
void APZSampler::SampleForWebRender(
|
||||
const wr::WrWindowId& aWindowId, const uint64_t* aGeneratedFrameId,
|
||||
wr::Transaction* aTransaction,
|
||||
const wr::WrPipelineIdEpochs* aEpochsBeingRendered) {
|
||||
void APZSampler::SampleForWebRender(const wr::WrWindowId& aWindowId,
|
||||
const uint64_t* aGeneratedFrameId,
|
||||
wr::Transaction* aTransaction) {
|
||||
if (RefPtr<APZSampler> sampler = GetSampler(aWindowId)) {
|
||||
wr::TransactionWrapper txn(aTransaction);
|
||||
Maybe<VsyncId> vsyncId =
|
||||
aGeneratedFrameId ? Some(VsyncId{*aGeneratedFrameId}) : Nothing();
|
||||
sampler->SampleForWebRender(vsyncId, txn, aEpochsBeingRendered);
|
||||
sampler->SampleForWebRender(vsyncId, txn);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,9 +85,8 @@ void APZSampler::SetSampleTime(const SampleTime& aSampleTime) {
|
|||
mSampleTime = aSampleTime;
|
||||
}
|
||||
|
||||
void APZSampler::SampleForWebRender(
|
||||
const Maybe<VsyncId>& aVsyncId, wr::TransactionWrapper& aTxn,
|
||||
const wr::WrPipelineIdEpochs* aEpochsBeingRendered) {
|
||||
void APZSampler::SampleForWebRender(const Maybe<VsyncId>& aVsyncId,
|
||||
wr::TransactionWrapper& aTxn) {
|
||||
AssertOnSamplerThread();
|
||||
SampleTime sampleTime;
|
||||
{ // scope lock
|
||||
|
@ -124,7 +122,7 @@ void APZSampler::SampleForWebRender(
|
|||
? now
|
||||
: mSampleTime;
|
||||
}
|
||||
mApz->SampleForWebRender(aVsyncId, aTxn, sampleTime, aEpochsBeingRendered);
|
||||
mApz->SampleForWebRender(aVsyncId, aTxn, sampleTime);
|
||||
}
|
||||
|
||||
bool APZSampler::AdvanceAnimations(const SampleTime& aSampleTime) {
|
||||
|
@ -333,12 +331,11 @@ void apz_register_sampler(mozilla::wr::WrWindowId aWindowId) {
|
|||
mozilla::layers::APZSampler::SetSamplerThread(aWindowId);
|
||||
}
|
||||
|
||||
void apz_sample_transforms(
|
||||
mozilla::wr::WrWindowId aWindowId, const uint64_t* aGeneratedFrameId,
|
||||
mozilla::wr::Transaction* aTransaction,
|
||||
const mozilla::wr::WrPipelineIdEpochs* aEpochsBeingRendered) {
|
||||
mozilla::layers::APZSampler::SampleForWebRender(
|
||||
aWindowId, aGeneratedFrameId, aTransaction, aEpochsBeingRendered);
|
||||
void apz_sample_transforms(mozilla::wr::WrWindowId aWindowId,
|
||||
const uint64_t* aGeneratedFrameId,
|
||||
mozilla::wr::Transaction* aTransaction) {
|
||||
mozilla::layers::APZSampler::SampleForWebRender(aWindowId, aGeneratedFrameId,
|
||||
aTransaction);
|
||||
}
|
||||
|
||||
void apz_deregister_sampler(mozilla::wr::WrWindowId aWindowId) {}
|
||||
|
|
|
@ -35,10 +35,10 @@ use swgl_bindings::SwCompositor;
|
|||
use tracy_rs::register_thread_with_profiler;
|
||||
use webrender::{
|
||||
api::units::*, api::*, render_api::*, set_profiler_hooks, AsyncPropertySampler, AsyncScreenshotHandle, Compositor,
|
||||
CompositorCapabilities, CompositorConfig, CompositorSurfaceTransform, DebugFlags, Device, FastHashMap,
|
||||
NativeSurfaceId, NativeSurfaceInfo, NativeTileId, PartialPresentCompositor, PipelineInfo, ProfilerHooks,
|
||||
RecordedFrameHandle, Renderer, RendererOptions, RendererStats, SceneBuilderHooks, ShaderPrecacheFlags, Shaders,
|
||||
ThreadListener, UploadMethod, WrShaders, ONE_TIME_USAGE_HINT,
|
||||
CompositorCapabilities, CompositorConfig, CompositorSurfaceTransform, DebugFlags, Device, NativeSurfaceId,
|
||||
NativeSurfaceInfo, NativeTileId, PartialPresentCompositor, PipelineInfo, ProfilerHooks, RecordedFrameHandle,
|
||||
Renderer, RendererOptions, RendererStats, SceneBuilderHooks, ShaderPrecacheFlags, Shaders, ThreadListener,
|
||||
UploadMethod, WrShaders, ONE_TIME_USAGE_HINT,
|
||||
};
|
||||
use wr_malloc_size_of::MallocSizeOfOps;
|
||||
|
||||
|
@ -797,8 +797,6 @@ impl<'a> From<(&WrPipelineId, &WrEpoch)> for WrPipelineIdAndEpoch {
|
|||
}
|
||||
}
|
||||
|
||||
type WrPipelineIdEpochs = ThinVec<WrPipelineIdAndEpoch>;
|
||||
|
||||
#[repr(C)]
|
||||
pub struct WrRemovedPipeline {
|
||||
pipeline_id: WrPipelineId,
|
||||
|
@ -915,12 +913,7 @@ extern "C" {
|
|||
// These callbacks are invoked from the render backend thread (aka the APZ
|
||||
// sampler thread)
|
||||
fn apz_register_sampler(window_id: WrWindowId);
|
||||
fn apz_sample_transforms(
|
||||
window_id: WrWindowId,
|
||||
generated_frame_id: *const u64,
|
||||
transaction: &mut Transaction,
|
||||
epochs_being_rendered: &WrPipelineIdEpochs,
|
||||
);
|
||||
fn apz_sample_transforms(window_id: WrWindowId, generated_frame_id: *const u64, transaction: &mut Transaction);
|
||||
fn apz_deregister_sampler(window_id: WrWindowId);
|
||||
|
||||
fn omta_register_sampler(window_id: WrWindowId);
|
||||
|
@ -1012,12 +1005,7 @@ impl AsyncPropertySampler for SamplerCallback {
|
|||
}
|
||||
}
|
||||
|
||||
fn sample(
|
||||
&self,
|
||||
_document_id: DocumentId,
|
||||
generated_frame_id: Option<u64>,
|
||||
epochs_being_rendered: &FastHashMap<PipelineId, Epoch>,
|
||||
) -> Vec<FrameMsg> {
|
||||
fn sample(&self, _document_id: DocumentId, generated_frame_id: Option<u64>) -> Vec<FrameMsg> {
|
||||
let generated_frame_id_value;
|
||||
let generated_frame_id: *const u64 = match generated_frame_id {
|
||||
Some(id) => {
|
||||
|
@ -1031,12 +1019,7 @@ impl AsyncPropertySampler for SamplerCallback {
|
|||
// XXX: When we implement scroll-linked animations, we will probably
|
||||
// need to call apz_sample_transforms prior to omta_sample.
|
||||
omta_sample(self.window_id, &mut transaction);
|
||||
apz_sample_transforms(
|
||||
self.window_id,
|
||||
generated_frame_id,
|
||||
&mut transaction,
|
||||
&epochs_being_rendered.iter().map(WrPipelineIdAndEpoch::from).collect(),
|
||||
)
|
||||
apz_sample_transforms(self.window_id, generated_frame_id, &mut transaction)
|
||||
};
|
||||
transaction.get_frame_ops()
|
||||
}
|
||||
|
|
|
@ -91,10 +91,9 @@ void apz_run_updater(mozilla::wr::WrWindowId aWindowId);
|
|||
void apz_deregister_updater(mozilla::wr::WrWindowId aWindowId);
|
||||
|
||||
void apz_register_sampler(mozilla::wr::WrWindowId aWindowId);
|
||||
void apz_sample_transforms(
|
||||
mozilla::wr::WrWindowId aWindowId, const uint64_t* aGeneratedFrameId,
|
||||
mozilla::wr::Transaction* aTransaction,
|
||||
const mozilla::wr::WrPipelineIdEpochs* aPipelineEpochs);
|
||||
void apz_sample_transforms(mozilla::wr::WrWindowId aWindowId,
|
||||
const uint64_t* aGeneratedFrameId,
|
||||
mozilla::wr::Transaction* aTransaction);
|
||||
void apz_deregister_sampler(mozilla::wr::WrWindowId aWindowId);
|
||||
|
||||
void omta_register_sampler(mozilla::wr::WrWindowId aWindowId);
|
||||
|
|
|
@ -1434,8 +1434,7 @@ impl RenderBackend {
|
|||
// async transforms.
|
||||
if requested_frame || has_built_scene {
|
||||
if let Some(ref sampler) = self.sampler {
|
||||
frame_ops.append(&mut sampler.sample(document_id, generated_frame_id,
|
||||
&doc.scene.pipeline_epochs));
|
||||
frame_ops.append(&mut sampler.sample(document_id, generated_frame_id));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6907,8 +6907,7 @@ pub trait AsyncPropertySampler {
|
|||
/// This is called for each transaction with the generate_frame flag set
|
||||
/// (i.e. that will trigger a render). The list of frame messages returned
|
||||
/// are processed as though they were part of the original transaction.
|
||||
fn sample(&self, document_id: DocumentId, generated_frame_id: Option<u64>,
|
||||
doc: &FastHashMap<PipelineId, Epoch>) -> Vec<FrameMsg>;
|
||||
fn sample(&self, document_id: DocumentId, generated_frame_id: Option<u64>) -> Vec<FrameMsg>;
|
||||
/// This is called exactly once, when the render backend thread is about to
|
||||
/// terminate.
|
||||
fn deregister(&self);
|
||||
|
|
Загрузка…
Ссылка в новой задаче