From f7d1db5b8e26b77e8b403efb6a8843378f32b8dd Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Tue, 1 Mar 2022 13:00:17 -0500 Subject: chromium-100.0.4896.12 (testing) --- ...omium-100-GLImplementationParts-constexpr.patch | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 www-client/chromium/files/chromium-100-GLImplementationParts-constexpr.patch (limited to 'www-client/chromium/files/chromium-100-GLImplementationParts-constexpr.patch') diff --git a/www-client/chromium/files/chromium-100-GLImplementationParts-constexpr.patch b/www-client/chromium/files/chromium-100-GLImplementationParts-constexpr.patch new file mode 100644 index 0000000..437e672 --- /dev/null +++ b/www-client/chromium/files/chromium-100-GLImplementationParts-constexpr.patch @@ -0,0 +1,92 @@ +From d32156fd3773330eca99e9cba5e18db57aaa1a53 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Sat, 19 Feb 2022 10:14:24 +0000 +Subject: [PATCH] GCC: make GLImplementationParts constructors constexpr + +Fix build error in GCC, as the constexpr operator== requires its +invocations to be also constexpr. +--- + ui/gl/gl_implementation.cc | 23 ----------------------- + ui/gl/gl_implementation.h | 25 +++++++++++++++++++++++-- + 2 files changed, 23 insertions(+), 25 deletions(-) + +diff --git a/ui/gl/gl_implementation.cc b/ui/gl/gl_implementation.cc +index e4e5456..3e4a47c 100644 +--- a/ui/gl/gl_implementation.cc ++++ b/ui/gl/gl_implementation.cc +@@ -26,29 +26,6 @@ + + namespace gl { + +-ANGLEImplementation MakeANGLEImplementation( +- const GLImplementation gl_impl, +- const ANGLEImplementation angle_impl) { +- if (gl_impl == kGLImplementationEGLANGLE) { +- if (angle_impl == ANGLEImplementation::kNone) { +- return ANGLEImplementation::kDefault; +- } else { +- return angle_impl; +- } +- } else { +- return ANGLEImplementation::kNone; +- } +-} +- +-GLImplementationParts::GLImplementationParts( +- const ANGLEImplementation angle_impl) +- : gl(kGLImplementationEGLANGLE), +- angle(MakeANGLEImplementation(kGLImplementationEGLANGLE, angle_impl)) {} +- +-GLImplementationParts::GLImplementationParts(const GLImplementation gl_impl) +- : gl(gl_impl), +- angle(MakeANGLEImplementation(gl_impl, ANGLEImplementation::kDefault)) {} +- + bool GLImplementationParts::IsValid() const { + if (angle == ANGLEImplementation::kNone) { + return (gl != kGLImplementationEGLANGLE); +diff --git a/ui/gl/gl_implementation.h b/ui/gl/gl_implementation.h +index 376ed58..a2513ea 100644 +--- a/ui/gl/gl_implementation.h ++++ b/ui/gl/gl_implementation.h +@@ -59,8 +59,14 @@ enum class ANGLEImplementation { + }; + + struct GL_EXPORT GLImplementationParts { +- explicit GLImplementationParts(const ANGLEImplementation angle_impl); +- explicit GLImplementationParts(const GLImplementation gl_impl); ++ constexpr explicit GLImplementationParts(const ANGLEImplementation angle_impl) ++ : gl(kGLImplementationEGLANGLE), ++ angle(MakeANGLEImplementation(kGLImplementationEGLANGLE, angle_impl)) {} ++ ++ constexpr explicit GLImplementationParts(const GLImplementation gl_impl) ++ : gl(gl_impl), ++ angle(MakeANGLEImplementation(gl_impl, ANGLEImplementation::kDefault)) { ++ } + + GLImplementation gl = kGLImplementationNone; + ANGLEImplementation angle = ANGLEImplementation::kNone; +@@ -80,6 +86,21 @@ struct GL_EXPORT GLImplementationParts { + bool IsValid() const; + bool IsAllowed(const std::vector& allowed_impls) const; + std::string ToString() const; ++ ++ private: ++ constexpr ANGLEImplementation MakeANGLEImplementation( ++ const GLImplementation gl_impl, ++ const ANGLEImplementation angle_impl) { ++ if (gl_impl == kGLImplementationEGLANGLE) { ++ if (angle_impl == ANGLEImplementation::kNone) { ++ return ANGLEImplementation::kDefault; ++ } else { ++ return angle_impl; ++ } ++ } else { ++ return ANGLEImplementation::kNone; ++ } ++ } + }; + + struct GL_EXPORT GLWindowSystemBindingInfo { +-- +2.34.1 + -- cgit v1.2.3