View | Details | Raw Unified | Return to bug 277129
Collapse All | Expand All

(-)b/devel/electron25/files/patch-cc_layers_mirror__layer__impl.h (+20 lines)
Added Link Here
1
--- cc/layers/mirror_layer_impl.h.orig	2023-08-12 07:07:10 UTC
2
+++ cc/layers/mirror_layer_impl.h
3
@@ -5,6 +5,7 @@
4
 #ifndef CC_LAYERS_MIRROR_LAYER_IMPL_H_
5
 #define CC_LAYERS_MIRROR_LAYER_IMPL_H_
6
 
7
+#include <cstdint>
8
 #include <memory>
9
 
10
 #include "base/memory/ptr_util.h"
11
@@ -56,7 +57,8 @@ class CC_EXPORT MirrorLayerImpl : public LayerImpl {
12
  private:
13
   const char* LayerTypeAsString() const override;
14
   viz::CompositorRenderPassId mirrored_layer_render_pass_id() const {
15
-    return viz::CompositorRenderPassId{mirrored_layer_id()};
16
+    return viz::CompositorRenderPassId{
17
+        static_cast<uint64_t>(mirrored_layer_id())};
18
   }
19
 
20
   int mirrored_layer_id_ = 0;
(-)b/devel/electron25/files/patch-components_power__metrics_energy__metrics__provider__linux.cc (+14 lines)
Added Link Here
1
--- components/power_metrics/energy_metrics_provider_linux.cc.orig	2023-08-12 07:07:15 UTC
2
+++ components/power_metrics/energy_metrics_provider_linux.cc
3
@@ -58,9 +58,9 @@ base::ScopedFD OpenPerfEvent(perf_event_attr* perf_att
4
 // value of less than 1. Here, we only consider cpu0. See details in
5
 // https://man7.org/linux/man-pages/man2/perf_event_open.2.html.
6
 base::ScopedFD OpenPerfEvent(perf_event_attr* perf_attr) {
7
-  base::ScopedFD perf_fd{syscall(__NR_perf_event_open, perf_attr, /*pid=*/-1,
8
+  base::ScopedFD perf_fd(syscall(__NR_perf_event_open, perf_attr, /*pid=*/-1,
9
                                  /*cpu=*/0, /*group_fd=*/-1,
10
-                                 PERF_FLAG_FD_CLOEXEC)};
11
+                                 static_cast<int>(PERF_FLAG_FD_CLOEXEC)));
12
   return perf_fd;
13
 }
14
 
(-)b/devel/electron25/files/patch-third__party_webrtc_pc_legacy__stats__collector.cc (+114 lines)
Added Link Here
1
commit 267f9bdd53a37d1cbee760d5af07880198e1beef
2
Author: Tommi <tommi@webrtc.org>
3
Date:   2023-12-21T14:08:26+01:00
4
5
    Update LegacyStatsCollector to conform with Wc++11-narrowing
6
    
7
    Bug: none
8
    Change-Id: Ida6a1af5c324473a55ea4f3b143862ea016ff50a
9
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332240
10
    Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
11
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
12
    Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
13
    Reviewed-by: Alexander Kornienko <alexfh@google.com>
14
    Reviewed-by: Henrik Boström <hbos@webrtc.org>
15
    Cr-Commit-Position: refs/heads/main@{#41432}
16
17
--- third_party/webrtc/pc/legacy_stats_collector.cc.orig	2023-08-12 07:13:59 UTC
18
+++ third_party/webrtc/pc/legacy_stats_collector.cc
19
@@ -188,9 +188,10 @@ void ExtractStats(const cricket::VoiceReceiverInfo& in
20
       {StatsReport::kStatsValueNameAccelerateRate, info.accelerate_rate},
21
       {StatsReport::kStatsValueNamePreemptiveExpandRate,
22
        info.preemptive_expand_rate},
23
-      {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_output_energy},
24
+      {StatsReport::kStatsValueNameTotalAudioEnergy,
25
+       static_cast<float>(info.total_output_energy)},
26
       {StatsReport::kStatsValueNameTotalSamplesDuration,
27
-       info.total_output_duration}};
28
+       static_cast<float>(info.total_output_duration)}};
29
 
30
   const IntForAdd ints[] = {
31
       {StatsReport::kStatsValueNameCurrentDelayMs, info.delay_estimate_ms},
32
@@ -244,9 +245,10 @@ void ExtractStats(const cricket::VoiceSenderInfo& info
33
   SetAudioProcessingStats(report, info.apm_statistics);
34
 
35
   const FloatForAdd floats[] = {
36
-      {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_input_energy},
37
+      {StatsReport::kStatsValueNameTotalAudioEnergy,
38
+       static_cast<float>(info.total_input_energy)},
39
       {StatsReport::kStatsValueNameTotalSamplesDuration,
40
-       info.total_input_duration}};
41
+       static_cast<float>(info.total_input_duration)}};
42
 
43
   RTC_DCHECK_GE(info.audio_level, 0);
44
   const IntForAdd ints[] = {
45
@@ -340,7 +342,8 @@ void ExtractStats(const cricket::VideoReceiverInfo& in
46
       {StatsReport::kStatsValueNamePlisSent, info.plis_sent},
47
       {StatsReport::kStatsValueNameRenderDelayMs, info.render_delay_ms},
48
       {StatsReport::kStatsValueNameTargetDelayMs, info.target_delay_ms},
49
-      {StatsReport::kStatsValueNameFramesDecoded, info.frames_decoded},
50
+      {StatsReport::kStatsValueNameFramesDecoded,
51
+       static_cast<int>(info.frames_decoded)},
52
   };
53
 
54
   for (const auto& i : ints)
55
@@ -384,15 +387,19 @@ void ExtractStats(const cricket::VideoSenderInfo& info
56
        info.encode_usage_percent},
57
       {StatsReport::kStatsValueNameFirsReceived, info.firs_received},
58
       {StatsReport::kStatsValueNameFrameHeightSent, info.send_frame_height},
59
-      {StatsReport::kStatsValueNameFrameRateInput, round(info.framerate_input)},
60
+      {StatsReport::kStatsValueNameFrameRateInput,
61
+       static_cast<int>(round(info.framerate_input))},
62
       {StatsReport::kStatsValueNameFrameRateSent, info.framerate_sent},
63
       {StatsReport::kStatsValueNameFrameWidthSent, info.send_frame_width},
64
-      {StatsReport::kStatsValueNameNacksReceived, info.nacks_received},
65
+      {StatsReport::kStatsValueNameNacksReceived,
66
+       static_cast<int>(info.nacks_received)},
67
       {StatsReport::kStatsValueNamePacketsLost, info.packets_lost},
68
       {StatsReport::kStatsValueNamePacketsSent, info.packets_sent},
69
       {StatsReport::kStatsValueNamePlisReceived, info.plis_received},
70
-      {StatsReport::kStatsValueNameFramesEncoded, info.frames_encoded},
71
-      {StatsReport::kStatsValueNameHugeFramesSent, info.huge_frames_sent},
72
+      {StatsReport::kStatsValueNameFramesEncoded,
73
+       static_cast<int>(info.frames_encoded)},
74
+      {StatsReport::kStatsValueNameHugeFramesSent,
75
+       static_cast<int>(info.huge_frames_sent)},
76
   };
77
 
78
   for (const auto& i : ints)
79
@@ -780,19 +787,25 @@ StatsReport* LegacyStatsCollector::AddConnectionInfoRe
80
                 AddCandidateReport(remote_candidate_stats, false)->id());
81
 
82
   const Int64ForAdd int64s[] = {
83
-      {StatsReport::kStatsValueNameBytesReceived, info.recv_total_bytes},
84
-      {StatsReport::kStatsValueNameBytesSent, info.sent_total_bytes},
85
-      {StatsReport::kStatsValueNamePacketsSent, info.sent_total_packets},
86
-      {StatsReport::kStatsValueNameRtt, info.rtt},
87
+      {StatsReport::kStatsValueNameBytesReceived,
88
+       static_cast<int64_t>(info.recv_total_bytes)},
89
+      {StatsReport::kStatsValueNameBytesSent,
90
+       static_cast<int64_t>(info.sent_total_bytes)},
91
+      {StatsReport::kStatsValueNamePacketsSent,
92
+       static_cast<int64_t>(info.sent_total_packets)},
93
+      {StatsReport::kStatsValueNameRtt, static_cast<int64_t>(info.rtt)},
94
       {StatsReport::kStatsValueNameSendPacketsDiscarded,
95
-       info.sent_discarded_packets},
96
+       static_cast<int64_t>(info.sent_discarded_packets)},
97
       {StatsReport::kStatsValueNameSentPingRequestsTotal,
98
-       info.sent_ping_requests_total},
99
+       static_cast<int64_t>(info.sent_ping_requests_total)},
100
       {StatsReport::kStatsValueNameSentPingRequestsBeforeFirstResponse,
101
-       info.sent_ping_requests_before_first_response},
102
-      {StatsReport::kStatsValueNameSentPingResponses, info.sent_ping_responses},
103
-      {StatsReport::kStatsValueNameRecvPingRequests, info.recv_ping_requests},
104
-      {StatsReport::kStatsValueNameRecvPingResponses, info.recv_ping_responses},
105
+       static_cast<int64_t>(info.sent_ping_requests_before_first_response)},
106
+      {StatsReport::kStatsValueNameSentPingResponses,
107
+       static_cast<int64_t>(info.sent_ping_responses)},
108
+      {StatsReport::kStatsValueNameRecvPingRequests,
109
+       static_cast<int64_t>(info.recv_ping_requests)},
110
+      {StatsReport::kStatsValueNameRecvPingResponses,
111
+       static_cast<int64_t>(info.recv_ping_responses)},
112
   };
113
   for (const auto& i : int64s)
114
     report->AddInt64(i.name, i.value);

Return to bug 277129