зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1647742 - Move the prepare pass out of prim_store/mod.rs. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D80692
This commit is contained in:
Родитель
60ac872184
Коммит
c5e5e1cbac
|
@ -13,6 +13,7 @@ use crate::gpu_cache::{GpuCache, GpuCacheHandle};
|
||||||
use crate::gpu_types::{PrimitiveHeaders, TransformPalette, UvRectKind, ZBufferIdGenerator};
|
use crate::gpu_types::{PrimitiveHeaders, TransformPalette, UvRectKind, ZBufferIdGenerator};
|
||||||
use crate::gpu_types::TransformData;
|
use crate::gpu_types::TransformData;
|
||||||
use crate::internal_types::{FastHashMap, PlaneSplitter, SavedTargetIndex};
|
use crate::internal_types::{FastHashMap, PlaneSplitter, SavedTargetIndex};
|
||||||
|
use crate::prepare::prepare_primitives;
|
||||||
use crate::picture::{PictureUpdateState, ROOT_SURFACE_INDEX, SurfaceIndex, RecordedDirtyRegion};
|
use crate::picture::{PictureUpdateState, ROOT_SURFACE_INDEX, SurfaceIndex, RecordedDirtyRegion};
|
||||||
use crate::picture::{RetainedTiles, DirtyRegion, SurfaceRenderTasks, SubpixelMode};
|
use crate::picture::{RetainedTiles, DirtyRegion, SurfaceRenderTasks, SubpixelMode};
|
||||||
use crate::picture::{BackdropKind, TileCacheLogger, SurfaceInfo};
|
use crate::picture::{BackdropKind, TileCacheLogger, SurfaceInfo};
|
||||||
|
@ -432,7 +433,8 @@ impl FrameBuilder {
|
||||||
{
|
{
|
||||||
profile_marker!("PreparePrims");
|
profile_marker!("PreparePrims");
|
||||||
|
|
||||||
scene.prim_store.prepare_primitives(
|
prepare_primitives(
|
||||||
|
&mut scene.prim_store,
|
||||||
&mut prim_list,
|
&mut prim_list,
|
||||||
&pic_context,
|
&pic_context,
|
||||||
&mut pic_state,
|
&mut pic_state,
|
||||||
|
|
|
@ -27,11 +27,12 @@
|
||||||
use api::{DebugFlags, DocumentId, PremultipliedColorF};
|
use api::{DebugFlags, DocumentId, PremultipliedColorF};
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
use api::IdNamespace;
|
use api::IdNamespace;
|
||||||
use api::units::TexelRect;
|
use api::units::*;
|
||||||
use euclid::{HomogeneousVector, Rect};
|
use euclid::{HomogeneousVector, Rect};
|
||||||
use crate::internal_types::{FastHashMap, FastHashSet};
|
use crate::internal_types::{FastHashMap, FastHashSet};
|
||||||
use crate::profiler::GpuCacheProfileCounters;
|
use crate::profiler::GpuCacheProfileCounters;
|
||||||
use crate::render_backend::{FrameStamp, FrameId};
|
use crate::render_backend::{FrameStamp, FrameId};
|
||||||
|
use crate::prim_store::VECS_PER_SEGMENT;
|
||||||
use crate::renderer::MAX_VERTEX_TEXTURE_WIDTH;
|
use crate::renderer::MAX_VERTEX_TEXTURE_WIDTH;
|
||||||
use std::{mem, u16, u32};
|
use std::{mem, u16, u32};
|
||||||
use std::num::NonZeroU32;
|
use std::num::NonZeroU32;
|
||||||
|
@ -657,6 +658,17 @@ impl<'a> GpuDataRequest<'a> {
|
||||||
self.texture.pending_blocks.push(block.into());
|
self.texture.pending_blocks.push(block.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Write the GPU cache data for an individual segment.
|
||||||
|
pub fn write_segment(
|
||||||
|
&mut self,
|
||||||
|
local_rect: LayoutRect,
|
||||||
|
extra_data: [f32; 4],
|
||||||
|
) {
|
||||||
|
let _ = VECS_PER_SEGMENT;
|
||||||
|
self.push(local_rect);
|
||||||
|
self.push(extra_data);
|
||||||
|
}
|
||||||
|
|
||||||
pub fn current_used_block_num(&self) -> usize {
|
pub fn current_used_block_num(&self) -> usize {
|
||||||
self.texture.pending_blocks.len() - self.start_index
|
self.texture.pending_blocks.len() - self.start_index
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,6 +107,7 @@ mod intern;
|
||||||
mod internal_types;
|
mod internal_types;
|
||||||
mod lru_cache;
|
mod lru_cache;
|
||||||
mod picture;
|
mod picture;
|
||||||
|
mod prepare;
|
||||||
mod prim_store;
|
mod prim_store;
|
||||||
mod print_tree;
|
mod print_tree;
|
||||||
mod render_backend;
|
mod render_backend;
|
||||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче