Bug 1922323 - Rename ColorRenderTarget into RenderTarget. r=gfx-reviewers,gw

Differential Revision: https://phabricator.services.mozilla.com/D224782
This commit is contained in:
Nicolas Silva 2024-10-14 16:27:50 +00:00
parent c53361b54c
commit ef41f35a37
3 changed files with 9 additions and 9 deletions

View File

@ -27,7 +27,7 @@ use crate::profiler::{self, TransactionProfile};
use crate::render_backend::{DataStores, ScratchBuffer}; use crate::render_backend::{DataStores, ScratchBuffer};
use crate::renderer::{GpuBufferF, GpuBufferBuilderF, GpuBufferI, GpuBufferBuilderI, GpuBufferBuilder}; use crate::renderer::{GpuBufferF, GpuBufferBuilderF, GpuBufferI, GpuBufferBuilderI, GpuBufferBuilder};
use crate::render_target::{PictureCacheTarget, TextureCacheRenderTarget, PictureCacheTargetKind}; use crate::render_target::{PictureCacheTarget, TextureCacheRenderTarget, PictureCacheTargetKind};
use crate::render_target::{RenderTargetContext, RenderTargetKind, ColorRenderTarget}; use crate::render_target::{RenderTargetContext, RenderTargetKind, RenderTarget};
use crate::render_task_graph::{RenderTaskGraph, Pass, SubPassSurface}; use crate::render_task_graph::{RenderTaskGraph, Pass, SubPassSurface};
use crate::render_task_graph::{RenderPass, RenderTaskGraphBuilder}; use crate::render_task_graph::{RenderPass, RenderTaskGraphBuilder};
use crate::render_task::{RenderTaskKind, StaticRenderTaskSurface}; use crate::render_task::{RenderTaskKind, StaticRenderTaskSurface};
@ -940,7 +940,7 @@ pub fn build_render_pass(
SubPassSurface::Dynamic { target_kind, texture_id, used_rect } => { SubPassSurface::Dynamic { target_kind, texture_id, used_rect } => {
match target_kind { match target_kind {
RenderTargetKind::Color => { RenderTargetKind::Color => {
let mut target = ColorRenderTarget::new( let mut target = RenderTarget::new(
RenderTargetKind::Color, RenderTargetKind::Color,
texture_id, texture_id,
screen_size, screen_size,
@ -964,7 +964,7 @@ pub fn build_render_pass(
pass.color.targets.push(target); pass.color.targets.push(target);
} }
RenderTargetKind::Alpha => { RenderTargetKind::Alpha => {
let mut target = ColorRenderTarget::new( let mut target = RenderTarget::new(
RenderTargetKind::Alpha, RenderTargetKind::Alpha,
texture_id, texture_id,
screen_size, screen_size,

View File

@ -95,7 +95,7 @@ pub struct RenderTargetContext<'a, 'rc> {
#[cfg_attr(feature = "capture", derive(Serialize))] #[cfg_attr(feature = "capture", derive(Serialize))]
#[cfg_attr(feature = "replay", derive(Deserialize))] #[cfg_attr(feature = "replay", derive(Deserialize))]
pub struct RenderTargetList { pub struct RenderTargetList {
pub targets: FrameVec<ColorRenderTarget>, pub targets: FrameVec<RenderTarget>,
} }
impl RenderTargetList { impl RenderTargetList {
@ -155,7 +155,7 @@ const NUM_PATTERNS: usize = crate::pattern::NUM_PATTERNS as usize;
/// into draw commands on that surface. /// into draw commands on that surface.
#[cfg_attr(feature = "capture", derive(Serialize))] #[cfg_attr(feature = "capture", derive(Serialize))]
#[cfg_attr(feature = "replay", derive(Deserialize))] #[cfg_attr(feature = "replay", derive(Deserialize))]
pub struct ColorRenderTarget { pub struct RenderTarget {
pub target_kind: RenderTargetKind, pub target_kind: RenderTargetKind,
screen_size: DeviceIntSize, screen_size: DeviceIntSize,
pub texture_id: CacheTextureId, pub texture_id: CacheTextureId,
@ -187,7 +187,7 @@ pub struct ColorRenderTarget {
pub one_clears: FrameVec<RenderTaskId>, pub one_clears: FrameVec<RenderTaskId>,
} }
impl ColorRenderTarget { impl RenderTarget {
pub fn new( pub fn new(
target_kind: RenderTargetKind, target_kind: RenderTargetKind,
texture_id: CacheTextureId, texture_id: CacheTextureId,
@ -196,7 +196,7 @@ impl ColorRenderTarget {
used_rect: DeviceIntRect, used_rect: DeviceIntRect,
memory: &FrameMemory, memory: &FrameMemory,
) -> Self { ) -> Self {
ColorRenderTarget { RenderTarget {
target_kind, target_kind,
screen_size, screen_size,
texture_id, texture_id,

View File

@ -86,7 +86,7 @@ use crate::render_target::{ResolveOp};
use crate::render_task_graph::{RenderTaskGraph}; use crate::render_task_graph::{RenderTaskGraph};
use crate::render_task::{RenderTask, RenderTaskKind, ReadbackTask}; use crate::render_task::{RenderTask, RenderTaskKind, ReadbackTask};
use crate::screen_capture::AsyncScreenshotGrabber; use crate::screen_capture::AsyncScreenshotGrabber;
use crate::render_target::{ColorRenderTarget, PictureCacheTarget, PictureCacheTargetKind}; use crate::render_target::{RenderTarget, PictureCacheTarget, PictureCacheTargetKind};
use crate::render_target::{TextureCacheRenderTarget, RenderTargetKind, BlitJob}; use crate::render_target::{TextureCacheRenderTarget, RenderTargetKind, BlitJob};
use crate::telemetry::Telemetry; use crate::telemetry::Telemetry;
use crate::tile_cache::PictureCacheDebugInfo; use crate::tile_cache::PictureCacheDebugInfo;
@ -3484,7 +3484,7 @@ impl Renderer {
fn draw_color_target( fn draw_color_target(
&mut self, &mut self,
draw_target: DrawTarget, draw_target: DrawTarget,
target: &ColorRenderTarget, target: &RenderTarget,
clear_depth: Option<f32>, clear_depth: Option<f32>,
render_tasks: &RenderTaskGraph, render_tasks: &RenderTaskGraph,
projection: &default::Transform3D<f32>, projection: &default::Transform3D<f32>,