tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 418cf7a6bcfc6f70797176fc30a6d85c1246ae31
parent 439399c3966cc9fd163cbdf9a2aa26231651e5c9
Author: Glenn Watson <git@chillybin.org>
Date:   Wed,  1 Oct 2025 01:24:12 +0000

Bug 1991773 - Fix some warnings reported by recent rustc update r=gfx-reviewers,lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D266915

Diffstat:
Mgfx/wr/webrender/src/clip.rs | 17-----------------
Mgfx/wr/webrender/src/gpu_types.rs | 23+----------------------
Mgfx/wr/webrender/src/prim_store/picture.rs | 5-----
Mgfx/wr/wrench/src/yaml_frame_reader.rs | 2+-
4 files changed, 2 insertions(+), 45 deletions(-)

diff --git a/gfx/wr/webrender/src/clip.rs b/gfx/wr/webrender/src/clip.rs @@ -2122,23 +2122,6 @@ impl ClipItemKind { } } -/// Represents a local rect and a device space -/// rectangles that are either outside or inside bounds. -#[derive(Clone, Debug, PartialEq)] -pub struct Geometry { - pub local_rect: LayoutRect, - pub device_rect: DeviceIntRect, -} - -impl From<LayoutRect> for Geometry { - fn from(local_rect: LayoutRect) -> Self { - Geometry { - local_rect, - device_rect: DeviceIntRect::zero(), - } - } -} - pub fn rounded_rectangle_contains_point( point: &LayoutPoint, rect: &LayoutRect, diff --git a/gfx/wr/webrender/src/gpu_types.rs b/gfx/wr/webrender/src/gpu_types.rs @@ -16,7 +16,7 @@ use crate::renderer::{ShaderColorMode, GpuBufferAddress}; use std::i32; use crate::util::{MatrixHelpers, TransformedRectKind}; use glyph_rasterizer::SubpixelDirection; -use crate::util::{ScaleOffset, pack_as_float}; +use crate::util::pack_as_float; // Contains type that must exactly match the same structures declared in GLSL. @@ -280,27 +280,6 @@ const UV_TYPE_NORMALIZED: u32 = 0; /// Specifies that an RGB CompositeInstance or ScalingInstance's UV coordinates are not normalized. const UV_TYPE_UNNORMALIZED: u32 = 1; -/// A GPU-friendly representation of the `ScaleOffset` type -#[derive(Clone, Debug)] -#[repr(C)] -pub struct CompositorTransform { - pub sx: f32, - pub sy: f32, - pub tx: f32, - pub ty: f32, -} - -impl From<ScaleOffset> for CompositorTransform { - fn from(scale_offset: ScaleOffset) -> Self { - CompositorTransform { - sx: scale_offset.scale.x, - sy: scale_offset.scale.y, - tx: scale_offset.offset.x, - ty: scale_offset.offset.y, - } - } -} - /// Vertex format for picture cache composite shader. /// When editing the members, update desc::COMPOSITE /// so its list of instance_attributes matches: diff --git a/gfx/wr/webrender/src/prim_store/picture.rs b/gfx/wr/webrender/src/prim_store/picture.rs @@ -1029,11 +1029,6 @@ impl InternDebug for PictureKey {} #[cfg_attr(feature = "capture", derive(Serialize))] #[cfg_attr(feature = "replay", derive(Deserialize))] #[derive(MallocSizeOf)] -pub struct PictureData; - -#[cfg_attr(feature = "capture", derive(Serialize))] -#[cfg_attr(feature = "replay", derive(Deserialize))] -#[derive(MallocSizeOf)] pub struct PictureTemplate; impl From<PictureKey> for PictureTemplate { diff --git a/gfx/wr/wrench/src/yaml_frame_reader.rs b/gfx/wr/wrench/src/yaml_frame_reader.rs @@ -155,7 +155,7 @@ impl ExternalImageHandler for LocalExternalImageHandler { key: ExternalImageId, _channel_index: u8, _is_composited: bool, - ) -> ExternalImage { + ) -> ExternalImage<'_> { let (id, desc) = self.texture_ids[key.0 as usize]; ExternalImage { uv: TexelRect::new(0.0, 0.0, desc.size.width as f32, desc.size.height as f32),