Skip to content

Commit 2c92bb0

Browse files
authored
Merge pull request #380 from WebPlatformForEmbedded/main-update
Modified cobalt package to remove wpe platform specific patches (which are merged with cobalt repository).
2 parents 9f894a5 + e694135 commit 2c92bb0

File tree

5 files changed

+113
-220
lines changed

5 files changed

+113
-220
lines changed

package/cobalt/0001-changes-for-gcc-8.patch

Lines changed: 0 additions & 59 deletions
This file was deleted.
Lines changed: 107 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
1-
--- a/src/cobalt/render_tree/color_rgba.h 2021-03-15 12:59:14.681236752 +0100
2-
+++ b/src/cobalt/render_tree/color_rgba.h 2021-03-15 13:04:28.455345839 +0100
1+
diff -Naur cobalt.orig/src/cobalt/browser/memory_settings/auto_mem.cc cobalt/src/cobalt/browser/memory_settings/auto_mem.cc
2+
--- cobalt.orig/src/cobalt/browser/memory_settings/auto_mem.cc 2021-11-29 22:54:12.685641240 +0530
3+
+++ cobalt/src/cobalt/browser/memory_settings/auto_mem.cc 2021-11-30 01:27:03.573123050 +0530
4+
@@ -100,7 +100,7 @@
5+
new MemorySettingType(setting_name));
6+
SetMemorySetting(command_line_setting, build_setting, autoset_value,
7+
output.get());
8+
- return std::move(output);
9+
+ return output;
10+
}
11+
12+
std::unique_ptr<IntSetting> CreateSystemMemorySetting(
13+
diff -Naur cobalt.orig/src/cobalt/browser/memory_settings/texture_dimensions.h cobalt/src/cobalt/browser/memory_settings/texture_dimensions.h
14+
--- cobalt.orig/src/cobalt/browser/memory_settings/texture_dimensions.h 2021-11-29 22:54:12.685641240 +0530
15+
+++ cobalt/src/cobalt/browser/memory_settings/texture_dimensions.h 2021-11-30 01:27:03.573123050 +0530
16+
@@ -35,6 +35,13 @@
17+
height_(other.height_),
18+
bytes_per_pixel_(other.bytes_per_pixel_) {}
19+
20+
+ TextureDimensions& operator= (const TextureDimensions& other) {
21+
+ width_ = other.width_;
22+
+ height_ = other.height_;
23+
+ bytes_per_pixel_ = other.bytes_per_pixel_;
24+
+ return (*this);
25+
+ }
26+
+
27+
bool operator==(const TextureDimensions& other) const {
28+
return width_ == other.width_ && height_ == other.height_ &&
29+
bytes_per_pixel_ == other.bytes_per_pixel_;
30+
diff -Naur cobalt.orig/src/cobalt/layout/layout_unit.h cobalt/src/cobalt/layout/layout_unit.h
31+
--- cobalt.orig/src/cobalt/layout/layout_unit.h 2021-11-29 22:54:12.885643324 +0530
32+
+++ cobalt/src/cobalt/layout/layout_unit.h 2021-11-30 01:27:03.573123050 +0530
33+
@@ -57,6 +57,11 @@
34+
#endif
35+
}
36+
37+
+ LayoutUnit(const LayoutUnit& value) : value_(value.value_)
38+
+#ifdef _DEBUG
39+
+ , is_nan_ (value.is_nan_)
40+
+#endif
41+
+ {}
42+
float toFloat() const {
43+
return static_cast<float>(value_) / kFixedPointRatio;
44+
}
45+
@@ -69,7 +74,7 @@
46+
}
47+
48+
// Copy assignment operator.
49+
- LayoutUnit& operator=(LayoutUnit value) {
50+
+ LayoutUnit& operator=(const LayoutUnit& value) {
51+
value_ = value.value_;
52+
#ifdef _DEBUG
53+
is_nan_ = is_nan_ || value.is_nan_;
54+
diff -Naur cobalt.orig/src/cobalt/render_tree/color_rgba.h cobalt/src/cobalt/render_tree/color_rgba.h
55+
--- cobalt.orig/src/cobalt/render_tree/color_rgba.h 2021-11-29 22:54:13.197646530 +0530
56+
+++ cobalt/src/cobalt/render_tree/color_rgba.h 2021-11-30 01:27:03.573123050 +0530
357
@@ -39,6 +39,8 @@
458
public:
559
ColorRGBA() : r_(0), g_(0), b_(0), a_(0) {}
@@ -9,8 +63,25 @@
963
ColorRGBA(float red, float green, float blue) {
1064
CheckRange(red);
1165
r_ = red;
12-
--- a/src/cobalt/render_tree/rounded_corners.h 2021-03-15 13:11:07.658050242 +0100
13-
+++ b/src/cobalt/render_tree/rounded_corners.h 2021-03-15 13:10:23.177745487 +0100
66+
diff -Naur cobalt.orig/src/cobalt/render_tree/composition_node.h cobalt/src/cobalt/render_tree/composition_node.h
67+
--- cobalt.orig/src/cobalt/render_tree/composition_node.h 2021-11-29 22:54:13.197646530 +0530
68+
+++ cobalt/src/cobalt/render_tree/composition_node.h 2021-11-30 01:27:03.573123050 +0530
69+
@@ -74,6 +74,12 @@
70+
children_.swap(moved->children_);
71+
}
72+
73+
+ Builder& operator= (const Builder& other) {
74+
+ offset_ = other.offset_;
75+
+ children_ = other.children_;
76+
+ return (*this);
77+
+ }
78+
+
79+
bool operator==(const Builder& other) const {
80+
return offset_ == other.offset_ && children_ == other.children_;
81+
}
82+
diff -Naur cobalt.orig/src/cobalt/render_tree/rounded_corners.h cobalt/src/cobalt/render_tree/rounded_corners.h
83+
--- cobalt.orig/src/cobalt/render_tree/rounded_corners.h 2021-11-29 22:54:13.197646530 +0530
84+
+++ cobalt/src/cobalt/render_tree/rounded_corners.h 2021-11-30 01:27:03.577123029 +0530
1485
@@ -81,6 +81,14 @@
1586
bottom_right(bottom_right),
1687
bottom_left(bottom_left) {}
@@ -26,33 +97,9 @@
2697
bool operator==(const RoundedCorners& other) const {
2798
return top_left == other.top_left && top_right == other.top_right &&
2899
bottom_right == other.bottom_right &&
29-
--- a/src/cobalt/render_tree/composition_node.h 2021-03-15 13:13:39.263114548 +0100
30-
+++ b/src/cobalt/render_tree/composition_node.h 2021-03-15 13:15:28.779878893 +0100
31-
@@ -74,6 +74,12 @@
32-
children_.swap(moved->children_);
33-
}
34-
35-
+ Builder& operator= (const Builder& other) {
36-
+ offset_ = other.offset_;
37-
+ children_ = other.children_;
38-
+ return (*this);
39-
+ }
40-
+
41-
bool operator==(const Builder& other) const {
42-
return offset_ == other.offset_ && children_ == other.children_;
43-
}
44-
--- a/src/net/spdy/spdy_session_key.h 2021-03-15 13:18:51.137283739 +0100
45-
+++ b/src/net/spdy/spdy_session_key.h 2021-03-15 13:19:40.013621927 +0100
46-
@@ -22,6 +22,7 @@
47-
const SocketTag& socket_tag);
48-
49-
SpdySessionKey(const SpdySessionKey& other);
50-
+ SpdySessionKey& operator= (const SpdySessionKey& other);
51-
52-
~SpdySessionKey();
53-
54-
--- a/src/net/spdy/spdy_session_key.cc 2021-03-15 13:19:54.077719176 +0100
55-
+++ b/src/net/spdy/spdy_session_key.cc 2021-03-15 15:40:35.297362549 +0100
100+
diff -Naur cobalt.orig/src/net/spdy/spdy_session_key.cc cobalt/src/net/spdy/spdy_session_key.cc
101+
--- cobalt.orig/src/net/spdy/spdy_session_key.cc 2021-11-29 22:54:13.533649953 +0530
102+
+++ cobalt/src/net/spdy/spdy_session_key.cc 2021-11-30 01:27:03.577123029 +0530
56103
@@ -28,6 +28,13 @@
57104

58105
SpdySessionKey::SpdySessionKey(const SpdySessionKey& other) = default;
@@ -67,84 +114,47 @@
67114
SpdySessionKey::~SpdySessionKey() = default;
68115

69116
bool SpdySessionKey::operator<(const SpdySessionKey& other) const {
70-
--- a/rc/net/third_party/quic/core/frames/quic_inlined_frame.h 2021-03-15 15:44:23.275043043 +0100
71-
+++ b/src/net/third_party/quic/core/frames/quic_inlined_frame.h 2021-03-15 15:44:47.043216095 +0100
72-
@@ -17,13 +17,6 @@
73-
template <typename DerivedT>
74-
struct QUIC_EXPORT_PRIVATE QuicInlinedFrame {
75-
QuicInlinedFrame(QuicFrameType type) : type(type) {
76-
-#if !(defined(STARBOARD) && defined(__GNUC__) && !defined(__clang__) && \
77-
- __GNUC__ <= 8)
78-
- // Raspi compiler does not allow none-static type in offsetof, but we should
79-
- // turn on this check on as many platforms as possible.
80-
- static_assert(offsetof(DerivedT, type) == 0,
81-
- "type must be the first field.");
82-
-#endif
83-
static_assert(sizeof(DerivedT) <= 24,
84-
"Frames larger than 24 bytes should not be inlined.");
85-
}
86-
--- a/src/cobalt/layout/layout_unit.h 2021-03-15 15:49:00.461043068 +0100
87-
+++ b/src/cobalt/layout/layout_unit.h 2021-03-15 15:53:44.619063933 +0100
88-
@@ -57,6 +57,11 @@
89-
#endif
90-
}
91-
92-
+ LayoutUnit(const LayoutUnit& value) : value_(value.value_)
93-
+#ifdef _DEBUG
94-
+ , is_nan_ (value.is_nan_)
95-
+#endif
96-
+ {}
97-
float toFloat() const {
98-
return static_cast<float>(value_) / kFixedPointRatio;
99-
}
100-
@@ -69,7 +74,7 @@
101-
}
117+
diff -Naur cobalt.orig/src/net/spdy/spdy_session_key.h cobalt/src/net/spdy/spdy_session_key.h
118+
--- cobalt.orig/src/net/spdy/spdy_session_key.h 2021-11-29 22:54:13.533649953 +0530
119+
+++ cobalt/src/net/spdy/spdy_session_key.h 2021-11-30 01:27:03.577123029 +0530
120+
@@ -22,6 +22,7 @@
121+
const SocketTag& socket_tag);
102122

103-
// Copy assignment operator.
104-
- LayoutUnit& operator=(LayoutUnit value) {
105-
+ LayoutUnit& operator=(const LayoutUnit& value) {
106-
value_ = value.value_;
107-
#ifdef _DEBUG
108-
is_nan_ = is_nan_ || value.is_nan_;
109-
--- a/src/cobalt/browser/memory_settings/texture_dimensions.h 2021-03-15 15:59:48.261625985 +0100
110-
+++ b/src/cobalt/browser/memory_settings/texture_dimensions.h 2021-03-15 16:01:24.654302396 +0100
111-
@@ -35,6 +35,13 @@
112-
height_(other.height_),
113-
bytes_per_pixel_(other.bytes_per_pixel_) {}
123+
SpdySessionKey(const SpdySessionKey& other);
124+
+ SpdySessionKey& operator= (const SpdySessionKey& other);
114125

115-
+ TextureDimensions& operator= (const TextureDimensions& other) {
116-
+ width_ = other.width_;
117-
+ height_ = other.height_;
118-
+ bytes_per_pixel_ = other.bytes_per_pixel_;
119-
+ return (*this);
120-
+ }
121-
+
122-
bool operator==(const TextureDimensions& other) const {
123-
return width_ == other.width_ && height_ == other.height_ &&
124-
bytes_per_pixel_ == other.bytes_per_pixel_;
125-
--- a/src/cobalt/browser/memory_settings/auto_mem.cc 2021-03-15 16:03:32.134773858 +0100
126-
+++ b/src/cobalt/browser/memory_settings/auto_mem.cc 2021-03-15 16:04:00.414880367 +0100
127-
@@ -100,7 +100,7 @@
128-
new MemorySettingType(setting_name));
129-
SetMemorySetting(command_line_setting, build_setting, autoset_value,
130-
output.get());
131-
- return std::move(output);
132-
+ return output;
133-
}
126+
~SpdySessionKey();
134127

135-
std::unique_ptr<IntSetting> CreateSystemMemorySetting(
136-
--- a/src/net/third_party/quic/core/frames/quic_frame.h 2021-03-15 19:57:08.191428438 +0100
137-
+++ b/src/net/third_party/quic/core/frames/quic_frame.h 2021-03-15 19:57:33.911585298 +0100
128+
diff -Naur cobalt.orig/src/net/third_party/quic/core/frames/quic_frame.h cobalt/src/net/third_party/quic/core/frames/quic_frame.h
129+
--- cobalt.orig/src/net/third_party/quic/core/frames/quic_frame.h 2021-11-29 22:54:13.565650280 +0530
130+
+++ cobalt/src/net/third_party/quic/core/frames/quic_frame.h 2021-11-30 01:27:03.577123029 +0530
138131
@@ -110,12 +110,6 @@
139132

140133
static_assert(sizeof(QuicFrame) <= 24,
141134
"Frames larger than 24 bytes should be referenced by pointer.");
142135
-#if !(defined(STARBOARD) && defined(__GNUC__) && !defined(__clang__) && \
143-
- __GNUC__ <= 8)
136+
- __GNUC__ <= 7)
144137
-// Raspi compiler does not allow none-static type in offsetof.
145138
-static_assert(offsetof(QuicStreamFrame, type) == offsetof(QuicFrame, type),
146139
- "Offset of |type| must match in QuicFrame and QuicStreamFrame");
147140
-#endif
148141

149142
// A inline size of 1 is chosen to optimize the typical use case of
150143
// 1-stream-frame in QuicTransmissionInfo.retransmittable_frames.
144+
diff -Naur cobalt.orig/src/net/third_party/quic/core/frames/quic_inlined_frame.h cobalt/src/net/third_party/quic/core/frames/quic_inlined_frame.h
145+
--- cobalt.orig/src/net/third_party/quic/core/frames/quic_inlined_frame.h 2021-11-29 22:54:13.565650280 +0530
146+
+++ cobalt/src/net/third_party/quic/core/frames/quic_inlined_frame.h 2021-11-30 01:27:03.581123009 +0530
147+
@@ -17,13 +17,6 @@
148+
template <typename DerivedT>
149+
struct QUIC_EXPORT_PRIVATE QuicInlinedFrame {
150+
QuicInlinedFrame(QuicFrameType type) : type(type) {
151+
-#if !(defined(STARBOARD) && defined(__GNUC__) && !defined(__clang__) && \
152+
- __GNUC__ <= 7)
153+
- // Raspi compiler does not allow none-static type in offsetof, but we should
154+
- // turn on this check on as many platforms as possible.
155+
- static_assert(offsetof(DerivedT, type) == 0,
156+
- "type must be the first field.");
157+
-#endif
158+
static_assert(sizeof(DerivedT) <= 24,
159+
"Frames larger than 24 bytes should not be inlined.");
160+
}
Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
diff -ruN cobalt.orig/src/cobalt/renderer/backend/egl/graphics_context.cc cobalt/src/cobalt/renderer/backend/egl/graphics_context.cc
2-
--- cobalt.orig/src/cobalt/renderer/backend/egl/graphics_context.cc 2021-05-27 17:36:48.000000000 +0530
3-
+++ cobalt/src/cobalt/renderer/backend/egl/graphics_context.cc 2021-07-05 22:36:14.143943715 +0530
1+
diff -Naur cobalt.orig/src/cobalt/renderer/backend/egl/graphics_context.cc cobalt/src/cobalt/renderer/backend/egl/graphics_context.cc
2+
--- cobalt.orig/src/cobalt/renderer/backend/egl/graphics_context.cc 2021-11-29 22:54:13.197646530 +0530
3+
+++ cobalt/src/cobalt/renderer/backend/egl/graphics_context.cc 2021-11-30 01:32:19.702689365 +0530
44
@@ -76,7 +76,7 @@
55
// when we need to make OpenGL calls that do not depend on a surface (e.g.
66
// creating a texture).
@@ -10,9 +10,9 @@ diff -ruN cobalt.orig/src/cobalt/renderer/backend/egl/graphics_context.cc cobalt
1010

1111
ScopedMakeCurrent scoped_current_context(this);
1212

13-
diff -ruN cobalt.orig/src/cobalt/renderer/backend/egl/graphics_system.cc cobalt/src/cobalt/renderer/backend/egl/graphics_system.cc
14-
--- cobalt.orig/src/cobalt/renderer/backend/egl/graphics_system.cc 2021-05-27 17:36:48.000000000 +0530
15-
+++ cobalt/src/cobalt/renderer/backend/egl/graphics_system.cc 2021-07-05 22:36:39.544296168 +0530
13+
diff -Naur cobalt.orig/src/cobalt/renderer/backend/egl/graphics_system.cc cobalt/src/cobalt/renderer/backend/egl/graphics_system.cc
14+
--- cobalt.orig/src/cobalt/renderer/backend/egl/graphics_system.cc 2021-11-29 22:54:13.197646530 +0530
15+
+++ cobalt/src/cobalt/renderer/backend/egl/graphics_system.cc 2021-11-30 01:32:19.702689365 +0530
1616
@@ -105,7 +105,10 @@
1717
// Return the first config that succeeds the above test.
1818
EGLint num_configs = 0;
@@ -41,25 +41,3 @@ diff -ruN cobalt.orig/src/cobalt/renderer/backend/egl/graphics_system.cc cobalt/
4141
DCHECK(choose_config_results);
4242

4343
config_ = choose_config_results->config;
44-
diff -ruN cobalt.orig/src/third_party/starboard/wpe/rpi/gyp_configuration.gypi cobalt/src/third_party/starboard/wpe/rpi/gyp_configuration.gypi
45-
--- cobalt.orig/src/third_party/starboard/wpe/rpi/gyp_configuration.gypi 2021-07-05 22:30:34.734565943 +0530
46-
+++ cobalt/src/third_party/starboard/wpe/rpi/gyp_configuration.gypi 2021-07-05 22:40:01.850929559 +0530
47-
@@ -50,6 +50,7 @@
48-
49-
# To support large files
50-
'-D_FILE_OFFSET_BITS=64',
51-
+ '-DEGL_NO_X11',
52-
53-
# Suppress some warnings that will be hard to fix.
54-
'-Wno-unused-local-typedefs',
55-
diff -ruN cobalt.orig/src/third_party/starboard/wpe/shared/window/window_internal.h cobalt/src/third_party/starboard/wpe/shared/window/window_internal.h
56-
--- cobalt.orig/src/third_party/starboard/wpe/shared/window/window_internal.h 2021-05-27 17:36:48.000000000 +0530
57-
+++ cobalt/src/third_party/starboard/wpe/shared/window/window_internal.h 2021-07-05 22:37:46.997216291 +0530
58-
@@ -20,7 +20,6 @@
59-
#include "starboard/time.h"
60-
#include "starboard/window.h"
61-
62-
-#define EGL_NO_X11
63-
#include "WPEFramework/compositor/Client.h"
64-
65-
namespace third_party {

package/cobalt/0004-changes-for-brcm.patch

Lines changed: 0 additions & 15 deletions
This file was deleted.

package/cobalt/0005-compile-fix.patch

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)