Backed out changeset 0b1911ea8b8b (bug 1520275) for qr wrench bustages. CLOSED TREE

This commit is contained in:
Cosmin Sabou 2019-01-16 21:22:29 +02:00
Родитель d21cee0f2d
Коммит c5393102ee
5 изменённых файлов: 7 добавлений и 34 удалений

Просмотреть файл

@ -579,9 +579,7 @@ void WebRenderDebugPrefChangeCallback(const char* aPrefName, void*) {
GFX_WEBRENDER_DEBUG(".gpu-cache", 1 << 12)
GFX_WEBRENDER_DEBUG(".slow-frame-indicator", 1 << 13)
GFX_WEBRENDER_DEBUG(".texture-cache.clear-evicted", 1 << 14)
GFX_WEBRENDER_DEBUG(".picture-caching", 1 << 15)
GFX_WEBRENDER_DEBUG(".texture-cache.disable-shrink", 1 << 16)
GFX_WEBRENDER_DEBUG(".primitives", 1 << 17)
#undef GFX_WEBRENDER_DEBUG
gfx::gfxVars::SetWebRenderDebugFlags(flags);

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use api::{BorderRadius, ClipMode, ColorF, DebugFlags, PictureRect, ColorU, LayoutVector2D};
use api::{BorderRadius, ClipMode, ColorF, PictureRect, ColorU, LayoutVector2D};
use api::{DeviceIntRect, DevicePixelScale, DeviceRect, WorldVector2D};
use api::{FilterOp, ImageRendering, TileOffset, RepeatMode, WorldPoint, WorldSize};
use api::{LayoutPoint, LayoutRect, LayoutSideOffsets, LayoutSize};
@ -18,8 +18,6 @@ use clip::{ClipStore};
use clip_scroll_tree::{ClipScrollTree, SpatialNodeIndex, ROOT_SPATIAL_NODE_INDEX};
use clip::{ClipDataStore, ClipNodeFlags, ClipChainId, ClipChainInstance, ClipItem};
#[cfg(feature = "debug_renderer")]
use debug_colors;
#[cfg(feature = "debug_renderer")]
use debug_render::DebugItem;
use display_list_flattener::{AsInstanceKind, CreateShadow, IsVisible};
use euclid::{SideOffsets2D, TypedTransform3D, TypedRect, TypedScale, TypedSize2D};
@ -2000,29 +1998,6 @@ impl PrimitiveStore {
}
};
// When the debug display is enabled, paint a colored rectangle around each
// primitive.
#[cfg(feature = "debug_renderer")]
{
if frame_context.debug_flags.contains(DebugFlags::PRIMITIVE_DBG) {
let debug_color = match prim_instance.kind {
PrimitiveInstanceKind::Picture { .. } => debug_colors::GREEN,
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);
}
}
let vis_index = PrimitiveVisibilityIndex(frame_state.scratch.prim_info.len() as u32);
frame_state.scratch.prim_info.push(

Просмотреть файл

@ -1038,8 +1038,6 @@ bitflags! {
/// Show picture caching debug overlay
const PICTURE_CACHING_DBG = 1 << 15;
const TEXTURE_CACHE_DBG_DISABLE_SHRINK = 1 << 16;
/// Highlight all primitives with colors based on kind.
const PRIMITIVE_DBG = 1 << 17;
}
}

Просмотреть файл

@ -21,10 +21,12 @@ pub struct PremultipliedColorF {
pub a: f32,
}
#[allow(missing_docs)]
impl PremultipliedColorF {
///
pub const BLACK: Self = PremultipliedColorF { r: 0.0, g: 0.0, b: 0.0, a: 1.0 };
///
pub const TRANSPARENT: Self = PremultipliedColorF { r: 0.0, g: 0.0, b: 0.0, a: 0.0 };
///
pub const WHITE: Self = PremultipliedColorF { r: 1.0, g: 1.0, b: 1.0, a: 1.0 };
pub fn to_array(&self) -> [f32; 4] {
@ -45,10 +47,12 @@ pub struct ColorF {
pub a: f32,
}
#[allow(missing_docs)]
impl ColorF {
///
pub const BLACK: Self = ColorF { r: 0.0, g: 0.0, b: 0.0, a: 1.0 };
///
pub const TRANSPARENT: Self = ColorF { r: 0.0, g: 0.0, b: 0.0, a: 0.0 };
///
pub const WHITE: Self = ColorF { r: 1.0, g: 1.0, b: 1.0, a: 1.0 };
/// Constructs a new `ColorF` from its components.

Просмотреть файл

@ -961,8 +961,6 @@ pref("gfx.webrender.debug.new-frame-indicator", false);
pref("gfx.webrender.debug.new-scene-indicator", false);
pref("gfx.webrender.debug.show-overdraw", false);
pref("gfx.webrender.debug.slow-frame-indicator", false);
pref("gfx.webrender.debug.picture-caching", false);
pref("gfx.webrender.debug.primitives", false);
pref("gfx.webrender.dl.dump-parent", false);
pref("gfx.webrender.dl.dump-content", false);
pref("gfx.webrender.picture-caching", false);