forked from mirrors/gecko-dev
Bug 1900022 - Rename APPLY_DEVICE_CLIP into APPLY_RENDER_TASK_CLIP. r=gw
I think that it's more informative to explain what the clip represents than its coordinate space in the name of the flag. The documentation for the flag is extended to explain the coordinate space and its relation with the render task rect. Differential Revision: https://phabricator.services.mozilla.com/D212272
This commit is contained in:
parent
2ea485c39c
commit
25a7edba47
3 changed files with 8 additions and 7 deletions
|
|
@ -76,8 +76,9 @@ bitflags! {
|
|||
pub struct QuadFlags : u8 {
|
||||
const IS_OPAQUE = 1 << 0;
|
||||
|
||||
/// If true, the prim is 2d and we can apply a clip to the task rect in vertex shader
|
||||
const APPLY_DEVICE_CLIP = 1 << 1;
|
||||
/// If true, the prim is 2d and axis-aligned in device space. The render task rect can
|
||||
/// cheaply be used as a device-space clip in the vertex shader.
|
||||
const APPLY_RENDER_TASK_CLIP = 1 << 1;
|
||||
|
||||
/// If true, the device-pixel scale is already applied, so ignore in vertex shaders
|
||||
const IGNORE_DEVICE_PIXEL_SCALE = 1 << 2;
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ pub fn push_quad(
|
|||
}
|
||||
let needs_scissor = !prim_is_2d_scale_translation;
|
||||
if !needs_scissor {
|
||||
quad_flags |= QuadFlags::APPLY_DEVICE_CLIP;
|
||||
quad_flags |= QuadFlags::APPLY_RENDER_TASK_CLIP;
|
||||
}
|
||||
|
||||
// TODO(gw): For now, we don't select per-edge AA at all if the primitive
|
||||
|
|
@ -643,7 +643,7 @@ fn add_pattern_prim(
|
|||
frame_state.set_segments(segments, targets);
|
||||
|
||||
let mut quad_flags = QuadFlags::IGNORE_DEVICE_PIXEL_SCALE
|
||||
| QuadFlags::APPLY_DEVICE_CLIP;
|
||||
| QuadFlags::APPLY_RENDER_TASK_CLIP;
|
||||
|
||||
if is_opaque {
|
||||
quad_flags |= QuadFlags::IS_OPAQUE;
|
||||
|
|
@ -685,7 +685,7 @@ fn add_composite_prim(
|
|||
frame_state.set_segments(segments, targets);
|
||||
|
||||
let mut quad_flags = QuadFlags::IGNORE_DEVICE_PIXEL_SCALE
|
||||
| QuadFlags::APPLY_DEVICE_CLIP;
|
||||
| QuadFlags::APPLY_RENDER_TASK_CLIP;
|
||||
|
||||
if pattern.is_opaque && !is_masked {
|
||||
quad_flags |= QuadFlags::IS_OPAQUE;
|
||||
|
|
|
|||
|
|
@ -1223,7 +1223,7 @@ fn build_mask_tasks(
|
|||
let mut quad_flags = QuadFlags::SAMPLE_AS_MASK;
|
||||
|
||||
if is_same_coord_system {
|
||||
quad_flags |= QuadFlags::APPLY_DEVICE_CLIP;
|
||||
quad_flags |= QuadFlags::APPLY_RENDER_TASK_CLIP;
|
||||
}
|
||||
|
||||
for tile in clip_store.visible_mask_tiles(&clip_instance) {
|
||||
|
|
@ -1337,7 +1337,7 @@ fn build_mask_tasks(
|
|||
let clip_needs_scissor_rect = !is_same_coord_system;
|
||||
|
||||
let quad_flags = if is_same_coord_system {
|
||||
QuadFlags::APPLY_DEVICE_CLIP
|
||||
QuadFlags::APPLY_RENDER_TASK_CLIP
|
||||
} else {
|
||||
QuadFlags::empty()
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue