Skip to content

Commit d451d22

Browse files
authored
Auto merge of #4758 - moz-gfx:github-sync, r=auto
Sync changes from mozilla-central gfx/wr None
2 parents 2756e7e + da82a81 commit d451d22

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

wr_glyph_rasterizer/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dynamic_freetype = []
1212
static_freetype = ["freetype/freetype-sys"]
1313
capture = ["api/serialize", "serde", "smallvec/serde"]
1414
replay = ["api/deserialize", "serde", "smallvec/serde"]
15-
gecko = ["fog"]
15+
gecko = ["fog", "glean"]
1616

1717
[dependencies]
1818
api = { version = "0.62.0", path = "../webrender_api", package = "webrender_api" }
@@ -25,7 +25,7 @@ tracy-rs = "0.1.2"
2525
log = "0.4"
2626
lazy_static = "1"
2727
fxhash = "0.2.1"
28-
glean = "51.8.2"
28+
glean = { version = "51.8.2", optional = true }
2929
fog = { version = "0.1.0", optional = true }
3030
serde = { optional = true, version = "1.0", features = ["serde_derive"] }
3131

wr_glyph_rasterizer/src/telemetry.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5+
#[cfg(feature = "gecko")]
56
use glean::TimerId;
67
#[cfg(feature = "gecko")]
78
use fog::metrics::wr;
89

10+
#[cfg(not(feature = "gecko"))]
11+
pub struct TimerId;
12+
913
pub struct Telemetry;
1014

1115
/// Defines the interface for hooking up an external telemetry reporter to WR.
1216
#[cfg(not(feature = "gecko"))]
1317
impl Telemetry {
1418
// Start rasterize glyph time collection
15-
pub fn start_rasterize_glyphs_time() -> TimerId { return TimerId { id: 0 }; }
19+
pub fn start_rasterize_glyphs_time() -> TimerId { return TimerId {}; }
1620
// End rasterize glyph time collection
1721
pub fn stop_and_accumulate_rasterize_glyphs_time(_id: TimerId) { }
1822
}

0 commit comments

Comments
 (0)