mirror of
https://github.com/servo/servo.git
synced 2025-07-03 13:33:39 +01:00
Avoid debug serialization of PropertyDeclaration & co in release builds.
In total, this PR saves ~60k. The conditional compilation on the _Debug FFI function eliminates one of the ToCss variants, eliminating 54.4k, as well as a bunch of other <1k functions. Removing the public trait implementation of Debug for the font metrics provider eliminates the last Debug impl from stylo. MozReview-Commit-ID: nIfQ3sy4OW
This commit is contained in:
parent
2ff3e119fa
commit
9a8821a1b0
2 changed files with 8 additions and 2 deletions
|
@ -12,7 +12,6 @@ use context::SharedStyleContext;
|
|||
use logical_geometry::WritingMode;
|
||||
use media_queries::Device;
|
||||
use properties::style_structs::Font;
|
||||
use std::fmt;
|
||||
|
||||
/// Represents the font metrics that style needs from a font to compute the
|
||||
/// value of certain CSS units like `ex`.
|
||||
|
@ -35,7 +34,7 @@ pub enum FontMetricsQueryResult {
|
|||
}
|
||||
|
||||
/// A trait used to represent something capable of providing us font metrics.
|
||||
pub trait FontMetricsProvider: fmt::Debug {
|
||||
pub trait FontMetricsProvider {
|
||||
/// Obtain the metrics for given font family.
|
||||
///
|
||||
/// TODO: We could make this take the full list, I guess, and save a few
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue