Bug 1522654 - Make the primitive debug display paint a transparent rect for pictures. r=gw
authorBobby Holley <bobbyholley@gmail.com>
Thu, 24 Jan 2019 12:59:08 -0800
changeset 515352 6ccd730174ffc3433f50aad28b540da0f58f9357
parent 515351 41ac42ce006f22502c0498fffaf6228c36a424d2
child 515353 8431bedf934c736cea962c692006ddcf0901eab0
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgw
bugs1522654
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1522654 - Make the primitive debug display paint a transparent rect for pictures. r=gw Differential Revision: https://phabricator.services.mozilla.com/D17545
gfx/wr/webrender/src/prim_store/mod.rs
--- a/gfx/wr/webrender/src/prim_store/mod.rs
+++ b/gfx/wr/webrender/src/prim_store/mod.rs
@@ -1984,30 +1984,32 @@ impl PrimitiveStore {
                         continue;
                     }
                 };
 
                 // When the debug display is enabled, paint a colored rectangle around each
                 // primitive.
                 if frame_context.debug_flags.contains(::api::DebugFlags::PRIMITIVE_DBG) {
                     let debug_color = match prim_instance.kind {
-                        PrimitiveInstanceKind::Picture { .. } => debug_colors::GREEN,
+                        PrimitiveInstanceKind::Picture { .. } => ColorF::TRANSPARENT,
                         PrimitiveInstanceKind::TextRun { .. } => debug_colors::RED,
                         PrimitiveInstanceKind::LineDecoration { .. } => debug_colors::PURPLE,
                         PrimitiveInstanceKind::NormalBorder { .. } |
                         PrimitiveInstanceKind::ImageBorder { .. } => debug_colors::ORANGE,
                         PrimitiveInstanceKind::Rectangle { .. } => ColorF { r: 0.8, g: 0.8, b: 0.8, a: 0.5 },
                         PrimitiveInstanceKind::YuvImage { .. } => debug_colors::BLUE,
                         PrimitiveInstanceKind::Image { .. } => debug_colors::BLUE,
                         PrimitiveInstanceKind::LinearGradient { .. } => debug_colors::PINK,
                         PrimitiveInstanceKind::RadialGradient { .. } => debug_colors::PINK,
                         PrimitiveInstanceKind::Clear { .. } => debug_colors::CYAN,
                     };
-                    let debug_rect = clipped_world_rect * frame_context.device_pixel_scale;
-                    frame_state.scratch.push_debug_rect(debug_rect, debug_color);
+                    if debug_color.a != 0.0 {
+                        let debug_rect = clipped_world_rect * frame_context.device_pixel_scale;
+                        frame_state.scratch.push_debug_rect(debug_rect, debug_color);
+                    }
                 }
 
                 let vis_index = PrimitiveVisibilityIndex(frame_state.scratch.prim_info.len() as u32);
 
                 frame_state.scratch.prim_info.push(
                     PrimitiveVisibility {
                         clipped_world_rect,
                         clip_chain,