Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 412213f

Browse files
committed
Bug 1892398 - Remove unused prim_spatial_node_index in PrimTask. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D208314
1 parent b1c58de commit 412213f

File tree

8 files changed

+5
-19
lines changed

8 files changed

+5
-19
lines changed

gfx/wr/webrender/src/prepare.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,6 @@ fn prepare_interned_prim_for_render(
698698
image_data.update(
699699
common_data,
700700
image_instance,
701-
pic_context.surface_index,
702701
prim_spatial_node_index,
703702
frame_state,
704703
frame_context,
@@ -721,7 +720,7 @@ fn prepare_interned_prim_for_render(
721720

722721
// Update the template this instane references, which may refresh the GPU
723722
// cache with any shared template data.
724-
prim_data.update(frame_state, pic_context.surface_index);
723+
prim_data.update(frame_state);
725724

726725
if prim_data.stretch_size.width >= prim_data.common.prim_rect.width() &&
727726
prim_data.stretch_size.height >= prim_data.common.prim_rect.height() {
@@ -787,7 +786,7 @@ fn prepare_interned_prim_for_render(
787786

788787
// Update the template this instance references, which may refresh the GPU
789788
// cache with any shared template data.
790-
prim_data.update(frame_state, pic_context.surface_index);
789+
prim_data.update(frame_state);
791790

792791
if prim_data.tile_spacing != LayoutSize::zero() {
793792
prim_data.common.may_need_repetition = false;
@@ -851,7 +850,7 @@ fn prepare_interned_prim_for_render(
851850

852851
// Update the template this instane references, which may refresh the GPU
853852
// cache with any shared template data.
854-
prim_data.update(frame_state, pic_context.surface_index);
853+
prim_data.update(frame_state);
855854

856855
if prim_data.tile_spacing != LayoutSize::zero() {
857856
prim_data.common.may_need_repetition = false;
@@ -915,7 +914,7 @@ fn prepare_interned_prim_for_render(
915914

916915
// Update the template this instane references, which may refresh the GPU
917916
// cache with any shared template data.
918-
prim_data.update(frame_state, pic_context.surface_index);
917+
prim_data.update(frame_state);
919918

920919
if prim_data.tile_spacing != LayoutSize::zero() {
921920
prim_data.common.may_need_repetition = false;

gfx/wr/webrender/src/prim_store/gradient/conic.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use crate::render_task::{RenderTask, RenderTaskKind};
2424
use crate::render_task_graph::RenderTaskId;
2525
use crate::render_task_cache::{RenderTaskCacheKeyKind, RenderTaskCacheKey, RenderTaskParent};
2626
use crate::renderer::{GpuBufferAddress, GpuBufferBuilder};
27-
use crate::picture::SurfaceIndex;
2827

2928
use std::{hash, ops::{Deref, DerefMut}};
3029
use super::{stops_and_min_alpha, GradientStopKey, GradientGpuBlockBuilder};
@@ -214,7 +213,6 @@ impl ConicGradientTemplate {
214213
pub fn update(
215214
&mut self,
216215
frame_state: &mut FrameBuildingState,
217-
parent_surface: SurfaceIndex,
218216
) {
219217
if let Some(mut request) =
220218
frame_state.gpu_cache.request(&mut self.common.gpu_cache_handle) {

gfx/wr/webrender/src/prim_store/gradient/linear.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ use crate::render_task_graph::RenderTaskId;
2626
use crate::render_task_cache::{RenderTaskCacheKeyKind, RenderTaskCacheKey, RenderTaskParent};
2727
use crate::renderer::GpuBufferAddress;
2828
use crate::segment::EdgeAaSegmentMask;
29-
use crate::picture::{SurfaceIndex};
3029
use crate::util::pack_as_float;
3130
use super::{stops_and_min_alpha, GradientStopKey, GradientGpuBlockBuilder, apply_gradient_local_clip};
3231
use std::ops::{Deref, DerefMut};
@@ -450,7 +449,6 @@ impl LinearGradientTemplate {
450449
pub fn update(
451450
&mut self,
452451
frame_state: &mut FrameBuildingState,
453-
parent_surface: SurfaceIndex,
454452
) {
455453
if let Some(mut request) = frame_state.gpu_cache.request(
456454
&mut self.common.gpu_cache_handle

gfx/wr/webrender/src/prim_store/gradient/radial.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use crate::render_task::{RenderTask, RenderTaskKind};
2424
use crate::render_task_graph::RenderTaskId;
2525
use crate::render_task_cache::{RenderTaskCacheKeyKind, RenderTaskCacheKey, RenderTaskParent};
2626
use crate::renderer::{GpuBufferAddress, GpuBufferBuilder};
27-
use crate::picture::SurfaceIndex;
2827

2928
use std::{hash, ops::{Deref, DerefMut}};
3029
use super::{
@@ -179,7 +178,6 @@ impl RadialGradientTemplate {
179178
pub fn update(
180179
&mut self,
181180
frame_state: &mut FrameBuildingState,
182-
parent_surface: SurfaceIndex,
183181
) {
184182
if let Some(mut request) =
185183
frame_state.gpu_cache.request(&mut self.common.gpu_cache_handle) {

gfx/wr/webrender/src/prim_store/image.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ use crate::scene_building::{CreateShadow, IsVisible};
1313
use crate::frame_builder::{FrameBuildingContext, FrameBuildingState};
1414
use crate::gpu_cache::{GpuCache, GpuDataRequest};
1515
use crate::intern::{Internable, InternDebug, Handle as InternHandle};
16-
use crate::internal_types::{LayoutPrimitiveInfo};
17-
use crate::picture::SurfaceIndex;
16+
use crate::internal_types::LayoutPrimitiveInfo;
1817
use crate::prim_store::{
1918
EdgeAaSegmentMask, PrimitiveInstanceKind,
2019
PrimitiveOpacity, PrimKey,
@@ -136,7 +135,6 @@ impl ImageData {
136135
&mut self,
137136
common: &mut PrimTemplateCommonData,
138137
image_instance: &mut ImageInstance,
139-
parent_surface: SurfaceIndex,
140138
prim_spatial_node_index: SpatialNodeIndex,
141139
frame_state: &mut FrameBuildingState,
142140
frame_context: &FrameBuildingContext,

gfx/wr/webrender/src/quad.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ fn add_render_task_with_mask(
494494
RenderTaskKind::new_prim(
495495
pattern.kind,
496496
pattern.shader_input,
497-
prim_spatial_node_index,
498497
raster_spatial_node_index,
499498
device_pixel_scale,
500499
content_origin,

gfx/wr/webrender/src/render_task.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ pub struct PrimTask {
190190
pub device_pixel_scale: DevicePixelScale,
191191
pub content_origin: DevicePoint,
192192
pub prim_address_f: GpuBufferAddress,
193-
pub prim_spatial_node_index: SpatialNodeIndex,
194193
pub raster_spatial_node_index: SpatialNodeIndex,
195194
pub transform_id: TransformPaletteId,
196195
pub edge_flags: EdgeAaSegmentMask,
@@ -521,7 +520,6 @@ impl RenderTaskKind {
521520
pub fn new_prim(
522521
pattern: PatternKind,
523522
pattern_input: PatternShaderInput,
524-
prim_spatial_node_index: SpatialNodeIndex,
525523
raster_spatial_node_index: SpatialNodeIndex,
526524
device_pixel_scale: DevicePixelScale,
527525
content_origin: DevicePoint,
@@ -535,7 +533,6 @@ impl RenderTaskKind {
535533
RenderTaskKind::Prim(PrimTask {
536534
pattern,
537535
pattern_input,
538-
prim_spatial_node_index,
539536
raster_spatial_node_index,
540537
device_pixel_scale,
541538
content_origin,

gfx/wr/webrender/src/render_task_cache.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use crate::device::TextureFilter;
1111
use crate::freelist::{FreeList, FreeListHandle, WeakFreeListHandle};
1212
use crate::gpu_cache::GpuCache;
1313
use crate::internal_types::FastHashMap;
14-
use crate::picture::SurfaceIndex;
1514
use crate::prim_store::image::ImageCacheKey;
1615
use crate::prim_store::gradient::{
1716
FastLinearGradientCacheKey, LinearGradientCacheKey, RadialGradientCacheKey,

0 commit comments

Comments
 (0)