[chromium-browser-privacy: 57/103] Upload new sources
by qvint
commit b76762bdf940445f3a365c683a26e10e6ccece8a
Author: Akarshan Biswas <akarshanbiswas(a)fedoraproject.org>
Date: Tue Jun 11 09:57:32 2019 +0530
Upload new sources
sources | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/sources b/sources
index adb8c64..46bb276 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-3e13a4f65b6189e85848586de46cf888 chromium-74.0.3729.169.tar.xz
+f5b5cae54486b5960c533640b47dceb8 chromium-75.0.3770.80.tar.xz
5 years, 4 months
[chromium-browser-privacy: 56/103] Update to 75.0.3770.80
by qvint
commit d8f20b8272c30fa6883c608dd2bd813aa04ef23b
Author: Akarshan Biswas <akarshanbiswas(a)fedoraproject.org>
Date: Mon Jun 10 23:10:32 2019 +0530
Update to 75.0.3770.80
chromium-glibc-2.29.patch | 98 -----
chromium-vaapi.spec | 19 +-
enable-vaapi.patch | 33 +-
fix-gn-74.patch | 917 ----------------------------------------------
fixwindowflashm74.patch | 15 +-
libstdc.patch | 36 ++
6 files changed, 73 insertions(+), 1045 deletions(-)
---
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
index fba38bd..891bf24 100644
--- a/chromium-vaapi.spec
+++ b/chromium-vaapi.spec
@@ -63,7 +63,7 @@
%global ozone 0
##############################Package Definitions######################################
Name: chromium-vaapi
-Version: 74.0.3729.169
+Version: 75.0.3770.80
Release: 1%{?dist}
Summary: A Chromium web browser with video decoding acceleration
License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
@@ -191,7 +191,7 @@ ExclusiveArch: x86_64
# Enable video acceleration on chromium for Linux
Patch1: enable-vaapi.patch
# Enable support for widevine
-Patch2: widevine.patch
+Patch2: widevine.patch
Patch50: nounrar.patch
# Bootstrap still uses python command
Patch51: py2-bootstrap.patch
@@ -202,12 +202,10 @@ Patch54: brand.patch
#Stolen from Fedora to fix building with pipewire
# https://src.fedoraproject.org/rpms/chromium/blob/master/f/chromium-73.0.3...
Patch65: chromium-73.0.3683.75-pipewire-cstring-fix.patch
-# Update Linux Seccomp syscall restrictions to EPERM posix_spawn/vfork
-Patch66: chromium-glibc-2.29.patch
# Fix some chromium regressions against certain type of window compositors
# Patch status: backported from https://chromium-review.googlesource.com/c/chromium/src/+/1597388
Patch67: fixwindowflashm74.patch
-Patch68: fix-gn-74.patch
+Patch68: libstdc.patch
%description
chromium-vaapi is an open-source web browser, powered by WebKit (Blink)
@@ -228,9 +226,8 @@ chromium-vaapi is an open-source web browser, powered by WebKit (Blink)
%if 0%{?fedora} >= 29
%patch65 -p1 -b .pipewire
%endif
-%patch66 -p1 -b .glibc
%patch67 -p1 -b .fwfm74
-%patch68 -p1 -b .fixgn74
+%patch68 -p1 -b .libstdc
%if 0%{?fedora} >= 30
# Add a workaround for a race condition in clang-llvm8+ compiler
@@ -277,6 +274,7 @@ find -depth -type f -writable -name "*.py" -exec sed -iE '1s=^#! */usr/bin/\(pyt
third_party/angle/third_party/vulkan-tools \
third_party/angle/third_party/vulkan-validation-layers \
third_party/apple_apsl \
+ third_party/axe-core \
third_party/boringssl \
third_party/boringssl/src/third_party/fiat \
third_party/blink \
@@ -299,9 +297,11 @@ find -depth -type f -writable -name "*.py" -exec sed -iE '1s=^#! */usr/bin/\(pyt
third_party/cld_3 \
third_party/closure_compiler \
third_party/crashpad \
+ third_party/crashpad/crashpad/third_party/lss \
third_party/crashpad/crashpad/third_party/zlib \
third_party/crc32c \
third_party/cros_system_api \
+ third_party/dawn \
third_party/dav1d \
third_party/devscripts \
third_party/dom_distiller_js \
@@ -309,7 +309,6 @@ find -depth -type f -writable -name "*.py" -exec sed -iE '1s=^#! */usr/bin/\(pyt
%if !%{with system_ffmpeg}
third_party/ffmpeg \
%endif
- third_party/fips181 \
third_party/flatbuffers \
third_party/flot \
third_party/freetype \
@@ -381,6 +380,7 @@ find -depth -type f -writable -name "*.py" -exec sed -iE '1s=^#! */usr/bin/\(pyt
third_party/pdfium/third_party/libtiff \
third_party/pdfium/third_party/skia_shared \
third_party/perfetto \
+ third_party/pffft \
%if !%{with system_ply}
third_party/ply \
%endif
@@ -671,6 +671,9 @@ appstream-util validate-relax --nonet "%{buildroot}%{_metainfodir}/%{name}.appda
%{chromiumdir}/locales/*.pak
#########################################changelogs#################################################
%changelog
+* Sat Jun 08 2019 Akarshan Biswas <akarshanbiswas(a)fedoraproject.org> 75.0.3770.80-1
+- Update to 75.0.3770.80
+
* Fri May 24 2019 Vasiliy N. Glazov <vascom2(a)gmail.com> - 74.0.3729.169-1
- Update to 74.0.3729.169
diff --git a/enable-vaapi.patch b/enable-vaapi.patch
index 32405d7..87e804a 100644
--- a/enable-vaapi.patch
+++ b/enable-vaapi.patch
@@ -1,20 +1,20 @@
-From 0e8ef1f42723287fce155d356b43522a192f2874 Mon Sep 17 00:00:00 2001
+From a70dbb7c6380e90eee255c124ebdc92242ea3db5 Mon Sep 17 00:00:00 2001
From: Akarshan Biswas <akarshan.biswas(a)gmail.com>
Date: Thu, 24 Jan 2019 12:45:29 +0530
Subject: [PATCH] Enable mojo with VDA2 on Linux
---
chrome/browser/about_flags.cc | 8 ++++----
- chrome/browser/flag_descriptions.cc | 9 +++++++--
+ chrome/browser/flag_descriptions.cc | 10 ++++++++--
chrome/browser/flag_descriptions.h | 10 ++++++++--
gpu/config/software_rendering_list.json | 3 ++-
- 4 files changed, 21 insertions(+), 9 deletions(-)
+ 4 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
-index 7074857d8..9127fa643 100644
+index 1f0fc06e1..c47080f2c 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
-@@ -1606,7 +1606,7 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -1390,7 +1390,7 @@ const FeatureEntry kFeatureEntries[] = {
"disable-accelerated-video-decode",
flag_descriptions::kAcceleratedVideoDecodeName,
flag_descriptions::kAcceleratedVideoDecodeDescription,
@@ -23,7 +23,7 @@ index 7074857d8..9127fa643 100644
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
},
#if defined(OS_WIN)
-@@ -2216,12 +2216,12 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -1882,12 +1882,12 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(service_manager::features::kXRSandbox)},
#endif // ENABLE_ISOLATED_XR_SERVICE
#endif // ENABLE_VR
@@ -40,10 +40,10 @@ index 7074857d8..9127fa643 100644
flag_descriptions::kV8CacheOptionsDescription, kOsAll,
MULTI_VALUE_TYPE(kV8CacheOptionsChoices)},
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
-index fe98e80e1..48fd3159a 100644
+index 91e5c085a..d810d3054 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
-@@ -3096,15 +3096,20 @@ const char kTextSuggestionsTouchBarDescription[] =
+@@ -2941,15 +2941,21 @@ const char kMacSystemMediaPermissionsInfoUiDescription[] =
#endif
@@ -58,19 +58,20 @@ index fe98e80e1..48fd3159a 100644
const char kAcceleratedMjpegDecodeDescription[] =
"Enable hardware-accelerated mjpeg decode for captured frame where "
"available.";
++
+#endif
+
+// Chrome OS --------------------------------------------------
+
+#if defined(OS_CHROMEOS)
- const char kAllowTouchpadThreeFingerClickName[] = "Touchpad three-finger-click";
- const char kAllowTouchpadThreeFingerClickDescription[] =
+ const char kAppServiceAshName[] = "App Service Ash";
+ const char kAppServiceAshDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
-index 244d0cc07..a8aca4b32 100644
+index c8e596e47..f91cc2388 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
-@@ -1842,13 +1842,19 @@ extern const char kPermissionPromptPersistenceToggleDescription[];
+@@ -1765,13 +1765,19 @@ extern const char kPermissionPromptPersistenceToggleDescription[];
#endif // defined(OS_MACOSX)
@@ -89,11 +90,11 @@ index 244d0cc07..a8aca4b32 100644
+
+#if defined(OS_CHROMEOS)
+
- extern const char kAllowTouchpadThreeFingerClickName[];
- extern const char kAllowTouchpadThreeFingerClickDescription[];
+ extern const char kAppServiceAshName[];
+ extern const char kAppServiceAshDescription[];
diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json
-index abb9a898f..c462d1eaf 100644
+index d4c3b4364..e4e935767 100644
--- a/gpu/config/software_rendering_list.json
+++ b/gpu/config/software_rendering_list.json
@@ -371,11 +371,12 @@
@@ -111,5 +112,5 @@ index abb9a898f..c462d1eaf 100644
"accelerated_video_decode"
]
--
-2.20.1
+2.21.0
diff --git a/fixwindowflashm74.patch b/fixwindowflashm74.patch
index 42076de..f977cbf 100644
--- a/fixwindowflashm74.patch
+++ b/fixwindowflashm74.patch
@@ -1,6 +1,6 @@
From 90e226ba50c98b5e60f74f9dce998b17117f9051 Mon Sep 17 00:00:00 2001
From: Peng Huang <penghuang(a)chromium.org>
-Date: Tue, 07 May 2019 13:16:21 +0000
+Date: Tue, 7 May 2019 13:16:21 +0000
Subject: [PATCH] Fix window flash for some WMs
Bug: 956061
@@ -10,12 +10,15 @@ Commit-Queue: Peng Huang <penghuang(a)chromium.org>
Reviewed-by: Antoine Labour <piman(a)chromium.org>
Cr-Commit-Position: refs/heads/master@{#657215}
---
+ ui/gl/BUILD.gn | 5 ++++-
+ ui/gl/gl_surface_glx.cc | 41 ++++++++++++++++++++++++++++-------------
+ 2 files changed, 32 insertions(+), 14 deletions(-)
diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn
-index 50df0e4..1753dd48 100644
+index 50df0e4085..1753dd480b 100644
--- a/ui/gl/BUILD.gn
+++ b/ui/gl/BUILD.gn
-@@ -274,7 +274,10 @@
+@@ -274,7 +274,10 @@ jumbo_component("gl") {
"//build/config/linux:xext",
]
@@ -28,7 +31,7 @@ index 50df0e4..1753dd48 100644
if (is_win) {
sources += [
diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
-index f4c13be..777bf76 100644
+index f4c13bed18..777bf767cb 100644
--- a/ui/gl/gl_surface_glx.cc
+++ b/ui/gl/gl_surface_glx.cc
@@ -21,6 +21,7 @@
@@ -39,7 +42,7 @@ index f4c13be..777bf76 100644
#include "ui/events/platform/platform_event_source.h"
#include "ui/gfx/x/x11.h"
#include "ui/gfx/x/x11_connection.h"
-@@ -431,7 +432,9 @@
+@@ -431,7 +432,9 @@ bool GLSurfaceGLX::InitializeOneOff() {
}
const XVisualInfo& visual_info =
@@ -50,7 +53,7 @@ index f4c13be..777bf76 100644
g_visual = visual_info.visual;
g_depth = visual_info.depth;
g_colormap =
-@@ -581,18 +584,30 @@
+@@ -581,18 +584,30 @@ bool NativeViewGLSurfaceGLX::Initialize(GLSurfaceFormat format) {
}
size_ = gfx::Size(attributes.width, attributes.height);
diff --git a/libstdc.patch b/libstdc.patch
new file mode 100644
index 0000000..2a2cad0
--- /dev/null
+++ b/libstdc.patch
@@ -0,0 +1,36 @@
+From aeed4d1f15ce84a17ea0bc219e258dc4982b2368 Mon Sep 17 00:00:00 2001
+From: Jose Dapena Paz <jose.dapena(a)lge.com>
+Date: Fri, 26 Apr 2019 20:07:05 +0000
+Subject: [PATCH] libstdc++: do not assume unique_ptr has ostream operator
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CompositorFrameReportingController is using DCHECK_NE to compare
+several unique_ptr. This is valid in libc++, but on libstdc++ unique_ptr
+does not have an ostream operator.
+
+Change-Id: I9f23ef17f02b9e107694ba493f6f8f3caf5cac4d
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1584292
+Reviewed-by: Sunny Sachanandani <sunnyps(a)chromium.org>
+Commit-Queue: José Dapena Paz <jose.dapena(a)lge.com>
+Cr-Commit-Position: refs/heads/master@{#654570}
+---
+ cc/scheduler/compositor_frame_reporting_controller.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cc/scheduler/compositor_frame_reporting_controller.cc b/cc/scheduler/compositor_frame_reporting_controller.cc
+index f1587ed158..1b17021fd2 100644
+--- a/cc/scheduler/compositor_frame_reporting_controller.cc
++++ b/cc/scheduler/compositor_frame_reporting_controller.cc
+@@ -31,8 +31,8 @@ void CompositorFrameReportingController::WillBeginImplFrame() {
+
+ void CompositorFrameReportingController::WillBeginMainFrame() {
+ DCHECK(reporters_[PipelineStage::kBeginImplFrame]);
+- DCHECK_NE(reporters_[PipelineStage::kBeginMainFrame],
+- reporters_[PipelineStage::kBeginImplFrame]);
++ DCHECK(reporters_[PipelineStage::kBeginMainFrame] !=
++ reporters_[PipelineStage::kBeginImplFrame]);
+ reporters_[PipelineStage::kBeginImplFrame]->StartStage(
+ "SendBeginMainFrameToCommit");
+ AdvanceReporterStage(PipelineStage::kBeginImplFrame,
5 years, 4 months
[chromium-browser-privacy: 55/103] Merge branch 'master' into f30
by qvint
commit 7d52ac76b35b30f305a75706f8ea62337589b0be
Merge: a16c57f 4591d7d
Author: Vasiliy Glazov <vascom2(a)gmail.com>
Date: Fri May 24 13:01:39 2019 +0300
Merge branch 'master' into f30
chromium-vaapi.spec | 2 +
fix-gn-74.patch | 917 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 919 insertions(+)
---
5 years, 4 months
[chromium-browser-privacy: 54/103] Add patch to Disallow non-buildable sources in binary targets.
by qvint
commit 4591d7d7f5441a48babef5ce96790346ae74e62e
Author: Vasiliy Glazov <vascom2(a)gmail.com>
Date: Fri May 24 12:12:44 2019 +0300
Add patch to Disallow non-buildable sources in binary targets.
chromium-vaapi.spec | 2 +
fix-gn-74.patch | 917 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 919 insertions(+)
---
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
index 2204870..fba38bd 100644
--- a/chromium-vaapi.spec
+++ b/chromium-vaapi.spec
@@ -207,6 +207,7 @@ Patch66: chromium-glibc-2.29.patch
# Fix some chromium regressions against certain type of window compositors
# Patch status: backported from https://chromium-review.googlesource.com/c/chromium/src/+/1597388
Patch67: fixwindowflashm74.patch
+Patch68: fix-gn-74.patch
%description
chromium-vaapi is an open-source web browser, powered by WebKit (Blink)
@@ -229,6 +230,7 @@ chromium-vaapi is an open-source web browser, powered by WebKit (Blink)
%endif
%patch66 -p1 -b .glibc
%patch67 -p1 -b .fwfm74
+%patch68 -p1 -b .fixgn74
%if 0%{?fedora} >= 30
# Add a workaround for a race condition in clang-llvm8+ compiler
diff --git a/fix-gn-74.patch b/fix-gn-74.patch
new file mode 100644
index 0000000..106f3ae
--- /dev/null
+++ b/fix-gn-74.patch
@@ -0,0 +1,917 @@
+From 8730b0feb6b991fa47368566501ab9ccfb453c92 Mon Sep 17 00:00:00 2001
+From: Tom Anderson <thomasanderson(a)chromium.org>
+Date: Thu, 16 May 2019 11:00:40 -0700
+Subject: [PATCH] Disallow non-buildable sources in binary targets
+
+When adding a file that's not a source, header, or object file to a source_set,
+loadable_module, shared_library, executable, or static_library, gn will now
+generate an error like the following:
+
+ERROR at //third_party/protobuf/proto_library.gni:369:15: Only source, header,
+and object files belong in the sources of a
+source_set. //out/Test/pyproto/google_apis/gcm/protocol/mcs_pb2.py is not one of
+the valid types.
+ sources = get_target_outputs(":$action_name")
+ ^---------------------------------
+See //google_apis/gcm/BUILD.gn:78:1: whence it was called.
+proto_library("proto") {
+^-----------------------
+See //BUILD.gn:89:7: which caused the file to be included.
+ "//google_apis/gcm:gcm_unit_tests",
+ ^---------------------------------
+
+BUG=77
+R=brettw
+
+Change-Id: I4ed8da10c48e3e5d74f79e51d8222c998a7b883a
+Reviewed-on: https://gn-review.googlesource.com/c/gn/+/4980
+Commit-Queue: Brett Wilson <brettw(a)google.com>
+Reviewed-by: Brett Wilson <brettw(a)google.com>
+---
+ tools/gn/binary_target_generator.cc | 32 +++++++++++++++++++++++++++++
+ tools/gn/binary_target_generator.h | 1 +
+ tools/gn/source_dir.cc | 6 +++---
+ tools/gn/source_file.cc | 12 ++++++++---
+ tools/gn/source_file.h | 7 ++++++-
+ tools/gn/target_generator.h | 2 +-
+ 6 files changed, 52 insertions(+), 8 deletions(-)
+
+diff --git b/tools/gn/binary_target_generator.cc a/tools/gn/binary_target_generator.cc
+index 6d8cec92..60af2423 100644
+--- b/tools/gn/tools/gn/binary_target_generator.cc
++++ a/tools/gn/tools/gn/binary_target_generator.cc
+@@ -68,38 +68,6 @@ void BinaryTargetGenerator::DoRun() {
+ return;
+ }
+
+-bool BinaryTargetGenerator::FillSources() {
+- bool ret = TargetGenerator::FillSources();
+- for (std::size_t i = 0; i < target_->sources().size(); ++i) {
+- const auto& source = target_->sources()[i];
+- switch (source.type()) {
+- case SourceFile::SOURCE_CPP:
+- case SourceFile::SOURCE_H:
+- case SourceFile::SOURCE_C:
+- case SourceFile::SOURCE_M:
+- case SourceFile::SOURCE_MM:
+- case SourceFile::SOURCE_S:
+- case SourceFile::SOURCE_ASM:
+- case SourceFile::SOURCE_O:
+- // These are allowed.
+- break;
+- case SourceFile::SOURCE_RC:
+- case SourceFile::SOURCE_DEF:
+- case SourceFile::SOURCE_RS:
+- case SourceFile::SOURCE_GO:
+- case SourceFile::SOURCE_UNKNOWN:
+- case SourceFile::SOURCE_NUMTYPES:
+- *err_ =
+- Err(scope_->GetValue(variables::kSources, true)->list_value()[i],
+- std::string("Only source, header, and object files belong in "
+- "the sources of a ") +
+- Target::GetStringForOutputType(target_->output_type()) +
+- ". " + source.value() + " is not one of the valid types.");
+- }
+- }
+- return ret;
+-}
+-
+ bool BinaryTargetGenerator::FillCompleteStaticLib() {
+ if (target_->output_type() == Target::STATIC_LIBRARY) {
+ const Value* value = scope_->GetValue(variables::kCompleteStaticLib, true);
+diff --git b/tools/gn/binary_target_generator.h a/tools/gn/binary_target_generator.h
+index 6cbd11ea..40fc3141 100644
+--- b/tools/gn/tools/gn/binary_target_generator.h
++++ a/tools/gn/tools/gn/binary_target_generator.h
+@@ -22,7 +22,6 @@ class BinaryTargetGenerator : public TargetGenerator {
+
+ protected:
+ void DoRun() override;
+- bool FillSources() override;
+
+ private:
+ bool FillCompleteStaticLib();
+diff --git b/tools/gn/source_dir.cc a/tools/gn/source_dir.cc
+index 50b45175..0fd5c75a 100644
+--- b/tools/gn/tools/gn/source_dir.cc
++++ a/tools/gn/tools/gn/source_dir.cc
+@@ -98,10 +98,10 @@ SourceFile SourceDir::ResolveRelativeFile(
+ return ret;
+
+ const std::string& input_string = p.string_value();
+- if (!ValidateResolveInput<std::string>(true, p, input_string, err))
++ if (!ValidateResolveInput<std::string>(true, p, input_string, err)) {
+ return ret;
+-
+- ret.SetValue(ResolveRelative(input_string, value_, true, source_root));
++ }
++ ret.value_ = ResolveRelative(input_string, value_, true, source_root);
+ return ret;
+ }
+
+diff --git b/tools/gn/source_file.cc a/tools/gn/source_file.cc
+index 29232274..7c860d43 100644
+--- b/tools/gn/tools/gn/source_file.cc
++++ a/tools/gn/tools/gn/source_file.cc
+@@ -55,19 +55,18 @@ SourceFile::Type GetSourceFileType(const std::string& file) {
+ SourceFile::SourceFile() : type_(SOURCE_UNKNOWN) {}
+
+ SourceFile::SourceFile(const base::StringPiece& p)
+- : value_(p.data(), p.size()) {
++ : value_(p.data(), p.size()), type_(GetSourceFileType(value_)) {
+ DCHECK(!value_.empty());
+ AssertValueSourceFileString(value_);
+ NormalizePath(&value_);
+- type_ = GetSourceFileType(value_);
+ }
+
+-SourceFile::SourceFile(SwapIn, std::string* value) {
++SourceFile::SourceFile(SwapIn, std::string* value)
++ : type_(GetSourceFileType(*value)) {
+ value_.swap(*value);
+ DCHECK(!value_.empty());
+ AssertValueSourceFileString(value_);
+ NormalizePath(&value_);
+- type_ = GetSourceFileType(value_);
+ }
+
+ SourceFile::~SourceFile() = default;
+@@ -93,8 +92,3 @@ SourceDir SourceFile::GetDir() const {
+ base::FilePath SourceFile::Resolve(const base::FilePath& source_root) const {
+ return ResolvePath(value_, true, source_root);
+ }
+-
+-void SourceFile::SetValue(const std::string& value) {
+- value_ = value;
+- type_ = GetSourceFileType(value_);
+-}
+diff --git b/tools/gn/source_file.h a/tools/gn/source_file.h
+index d42063d6..bcf5f422 100644
+--- b/tools/gn/tools/gn/source_file.h
++++ a/tools/gn/tools/gn/source_file.h
+@@ -97,16 +97,11 @@ class SourceFile {
+ return value_ < other.value_;
+ }
+
+- void swap(SourceFile& other) {
+- value_.swap(other.value_);
+- std::swap(type_, other.type_);
+- }
++ void swap(SourceFile& other) { value_.swap(other.value_); }
+
+ private:
+ friend class SourceDir;
+
+- void SetValue(const std::string& value);
+-
+ std::string value_;
+ Type type_;
+
+diff --git b/tools/gn/target_generator.h a/tools/gn/target_generator.h
+index 8795cbf9..627505da 100644
+--- b/tools/gn/tools/gn/target_generator.h
++++ a/tools/gn/tools/gn/target_generator.h
+@@ -47,7 +47,7 @@ class TargetGenerator {
+
+ const BuildSettings* GetBuildSettings() const;
+
+- virtual bool FillSources();
++ bool FillSources();
+ bool FillPublic();
+ bool FillConfigs();
+ bool FillOutputs(bool allow_substitutions);
+--
+2.21.0
+
+From 0d038c2e0a32a528713d3dfaf1f1e0cdfe87fd46 Mon Sep 17 00:00:00 2001
+From: Tom Anderson <thomasanderson(a)chromium.org>
+Date: Wed, 15 May 2019 13:00:20 -0700
+Subject: [PATCH] Cache source file type in SourceFile
+
+This is in preparation for fixing bug 77. Reduces the number of calls to
+GetSourceFileType() from ~2 million to ~500 thousand when generating Chromium's
+build files.
+
+BUG=77
+R=brettw
+
+Change-Id: I044e5b5ebf41ce70769ae3818ea5989206f44453
+Reviewed-on: https://gn-review.googlesource.com/c/gn/+/4960
+Reviewed-by: Brett Wilson <brettw(a)google.com>
+Commit-Queue: Brett Wilson <brettw(a)google.com>
+---
+ build/gen.py | 1 -
+ tools/gn/c_tool.h | 1 -
+ tools/gn/compile_commands_writer.cc | 20 ++++++-----
+ tools/gn/general_tool.h | 1 -
+ tools/gn/header_checker.cc | 8 ++---
+ tools/gn/ninja_binary_target_writer.cc | 15 ++++-----
+ tools/gn/ninja_binary_target_writer.h | 9 ++---
+ tools/gn/ninja_c_binary_target_writer.cc | 42 +++++++++++++-----------
+ tools/gn/source_file.cc | 36 ++++++++++++++++++--
+ tools/gn/source_file.h | 24 ++++++++++++++
+ tools/gn/source_file_type.cc | 37 ---------------------
+ tools/gn/source_file_type.h | 34 -------------------
+ tools/gn/target.cc | 7 ++--
+ tools/gn/tool.cc | 28 ++++++++--------
+ tools/gn/tool.h | 4 +--
+ tools/gn/toolchain.cc | 6 ++--
+ tools/gn/toolchain.h | 7 ++--
+ tools/gn/visual_studio_writer.cc | 1 -
+ 18 files changed, 130 insertions(+), 151 deletions(-)
+ delete mode 100644 tools/gn/source_file_type.cc
+ delete mode 100644 tools/gn/source_file_type.h
+
+diff --git b/build/gen.py a/build/gen.py
+index 97e5adb7..874ecbaa 100755
+--- b/tools/gn/build/gen.py
++++ a/tools/gn/build/gen.py
+@@ -520,6 +520,7 @@ def WriteGNNinja(path, platform, host, options):
+ 'tools/gn/setup.cc',
+ 'tools/gn/source_dir.cc',
+ 'tools/gn/source_file.cc',
++ 'tools/gn/source_file_type.cc',
+ 'tools/gn/standard_out.cc',
+ 'tools/gn/string_utils.cc',
+ 'tools/gn/substitution_list.cc',
+diff --git b/tools/gn/c_tool.h a/tools/gn/c_tool.h
+index 07dfcbe2..129a7332 100644
+--- b/tools/gn/tools/gn/c_tool.h
++++ a/tools/gn/tools/gn/c_tool.h
+@@ -12,6 +12,7 @@
+ #include "tools/gn/label.h"
+ #include "tools/gn/label_ptr.h"
+ #include "tools/gn/scope.h"
++#include "tools/gn/source_file_type.h"
+ #include "tools/gn/substitution_list.h"
+ #include "tools/gn/substitution_pattern.h"
+ #include "tools/gn/tool.h"
+diff --git b/tools/gn/compile_commands_writer.cc a/tools/gn/compile_commands_writer.cc
+index 208952d2..e4a1a191 100644
+--- b/tools/gn/tools/gn/compile_commands_writer.cc
++++ a/tools/gn/tools/gn/compile_commands_writer.cc
+@@ -122,7 +122,7 @@ void WriteCommand(const Target* target,
+ const CompileFlags& flags,
+ std::vector<OutputFile>& tool_outputs,
+ PathOutput& path_output,
+- SourceFile::Type source_type,
++ SourceFileType source_type,
+ const char* tool_name,
+ EscapeOptions opts,
+ std::string* compile_commands) {
+@@ -144,16 +144,16 @@ void WriteCommand(const Target* target,
+ } else if (range.type == &CSubstitutionCFlags) {
+ command_out << flags.cflags;
+ } else if (range.type == &CSubstitutionCFlagsC) {
+- if (source_type == SourceFile::SOURCE_C)
++ if (source_type == SOURCE_C)
+ command_out << flags.cflags_c;
+ } else if (range.type == &CSubstitutionCFlagsCc) {
+- if (source_type == SourceFile::SOURCE_CPP)
++ if (source_type == SOURCE_CPP)
+ command_out << flags.cflags_cc;
+ } else if (range.type == &CSubstitutionCFlagsObjC) {
+- if (source_type == SourceFile::SOURCE_M)
++ if (source_type == SOURCE_M)
+ command_out << flags.cflags_objc;
+ } else if (range.type == &CSubstitutionCFlagsObjCc) {
+- if (source_type == SourceFile::SOURCE_MM)
++ if (source_type == SOURCE_MM)
+ command_out << flags.cflags_objcc;
+ } else if (range.type == &SubstitutionLabel ||
+ range.type == &SubstitutionLabelName ||
+@@ -222,11 +222,9 @@ void CompileCommandsWriter::RenderJSON(const BuildSettings* build_settings,
+ for (const auto& source : target->sources()) {
+ // If this source is not a C/C++/ObjC/ObjC++ source (not header) file,
+ // continue as it does not belong in the compilation database.
+- SourceFile::Type source_type = source.type();
+- if (source_type != SourceFile::SOURCE_CPP &&
+- source_type != SourceFile::SOURCE_C &&
+- source_type != SourceFile::SOURCE_M &&
+- source_type != SourceFile::SOURCE_MM)
++ SourceFileType source_type = GetSourceFileType(source);
++ if (source_type != SOURCE_CPP && source_type != SOURCE_C &&
++ source_type != SOURCE_M && source_type != SOURCE_MM)
+ continue;
+
+ const char* tool_name = Tool::kToolNone;
+@@ -324,4 +322,4 @@ void CompileCommandsWriter::VisitDeps(const Target* target,
+ VisitDeps(pair.ptr, visited);
+ }
+ }
+-}
++}
+\ No newline at end of file
+diff --git b/tools/gn/general_tool.h a/tools/gn/general_tool.h
+index 827a48dc..b6e1af0c 100644
+--- b/tools/gn/tools/gn/general_tool.h
++++ a/tools/gn/tools/gn/general_tool.h
+@@ -11,6 +11,7 @@
+ #include "base/macros.h"
+ #include "tools/gn/label.h"
+ #include "tools/gn/label_ptr.h"
++#include "tools/gn/source_file_type.h"
+ #include "tools/gn/substitution_list.h"
+ #include "tools/gn/substitution_pattern.h"
+ #include "tools/gn/tool.h"
+diff --git b/tools/gn/header_checker.cc a/tools/gn/header_checker.cc
+index dca7302d..8407bd0f 100644
+--- b/tools/gn/tools/gn/header_checker.cc
++++ a/tools/gn/tools/gn/header_checker.cc
+@@ -18,6 +18,7 @@
+ #include "tools/gn/err.h"
+ #include "tools/gn/filesystem_utils.h"
+ #include "tools/gn/scheduler.h"
++#include "tools/gn/source_file_type.h"
+ #include "tools/gn/target.h"
+ #include "tools/gn/trace.h"
+ #include "util/worker_pool.h"
+@@ -151,10 +152,9 @@ void HeaderChecker::RunCheckOverFiles(const FileMap& files, bool force_check) {
+
+ for (const auto& file : files) {
+ // Only check C-like source files (RC files also have includes).
+- SourceFile::Type type = file.first.type();
+- if (type != SourceFile::SOURCE_CPP && type != SourceFile::SOURCE_H &&
+- type != SourceFile::SOURCE_C && type != SourceFile::SOURCE_M &&
+- type != SourceFile::SOURCE_MM && type != SourceFile::SOURCE_RC)
++ SourceFileType type = GetSourceFileType(file.first);
++ if (type != SOURCE_CPP && type != SOURCE_H && type != SOURCE_C &&
++ type != SOURCE_M && type != SOURCE_MM && type != SOURCE_RC)
+ continue;
+
+ if (!check_generated_) {
+diff --git b/tools/gn/ninja_binary_target_writer.cc a/tools/gn/ninja_binary_target_writer.cc
+index bf3ee355..aca3a247 100644
+--- b/tools/gn/tools/gn/ninja_binary_target_writer.cc
++++ a/tools/gn/tools/gn/ninja_binary_target_writer.cc
+@@ -23,23 +23,22 @@
+ #include "tools/gn/ninja_utils.h"
+ #include "tools/gn/scheduler.h"
+ #include "tools/gn/settings.h"
++#include "tools/gn/source_file_type.h"
+ #include "tools/gn/string_utils.h"
+ #include "tools/gn/substitution_writer.h"
+ #include "tools/gn/target.h"
+
+ bool NinjaBinaryTargetWriter::SourceFileTypeSet::CSourceUsed() {
+- return Get(SourceFile::SOURCE_CPP) || Get(SourceFile::SOURCE_H) ||
+- Get(SourceFile::SOURCE_C) || Get(SourceFile::SOURCE_M) ||
+- Get(SourceFile::SOURCE_MM) || Get(SourceFile::SOURCE_RC) ||
+- Get(SourceFile::SOURCE_S);
++ return Get(SOURCE_CPP) || Get(SOURCE_H) || Get(SOURCE_C) || Get(SOURCE_M) ||
++ Get(SOURCE_MM) || Get(SOURCE_RC) || Get(SOURCE_S);
+ }
+
+ bool NinjaBinaryTargetWriter::SourceFileTypeSet::RustSourceUsed() {
+- return Get(SourceFile::SOURCE_RS);
++ return Get(SOURCE_RS);
+ }
+
+ bool NinjaBinaryTargetWriter::SourceFileTypeSet::GoSourceUsed() {
+- return Get(SourceFile::SOURCE_GO);
++ return Get(SOURCE_GO);
+ }
+
+ NinjaBinaryTargetWriter::NinjaBinaryTargetWriter(const Target* target,
+@@ -50,6 +49,10 @@ NinjaBinaryTargetWriter::NinjaBinaryTargetWriter(const Target* target,
+ NinjaBinaryTargetWriter::~NinjaBinaryTargetWriter() = default;
+
+ void NinjaBinaryTargetWriter::Run() {
++ SourceFileTypeSet used_types;
++ for (const auto& source : target_->sources())
++ used_types.Set(GetSourceFileType(source));
++
+ NinjaCBinaryTargetWriter writer(target_, out_);
+ writer.Run();
+ }
+diff --git b/tools/gn/ninja_binary_target_writer.h a/tools/gn/ninja_binary_target_writer.h
+index 24d7ef19..1db9d81f 100644
+--- b/tools/gn/tools/gn/ninja_binary_target_writer.h
++++ a/tools/gn/tools/gn/ninja_binary_target_writer.h
+@@ -23,12 +23,11 @@ class NinjaBinaryTargetWriter : public NinjaTargetWriter {
+ class SourceFileTypeSet {
+ public:
+ SourceFileTypeSet() {
+- memset(flags_, 0,
+- sizeof(bool) * static_cast<int>(SourceFile::SOURCE_NUMTYPES));
++ memset(flags_, 0, sizeof(bool) * static_cast<int>(SOURCE_NUMTYPES));
+ }
+
+- void Set(SourceFile::Type type) { flags_[static_cast<int>(type)] = true; }
+- bool Get(SourceFile::Type type) const {
++ void Set(SourceFileType type) { flags_[static_cast<int>(type)] = true; }
++ bool Get(SourceFileType type) const {
+ return flags_[static_cast<int>(type)];
+ }
+
+@@ -37,7 +36,7 @@ class NinjaBinaryTargetWriter : public NinjaTargetWriter {
+ bool GoSourceUsed();
+
+ private:
+- bool flags_[static_cast<int>(SourceFile::SOURCE_NUMTYPES)];
++ bool flags_[static_cast<int>(SOURCE_NUMTYPES)];
+ };
+
+ NinjaBinaryTargetWriter(const Target* target, std::ostream& out);
+diff --git b/tools/gn/ninja_c_binary_target_writer.cc a/tools/gn/ninja_c_binary_target_writer.cc
+index 4e8217b5..f6ffd150 100644
+--- b/tools/gn/tools/gn/ninja_c_binary_target_writer.cc
++++ a/tools/gn/tools/gn/ninja_c_binary_target_writer.cc
+@@ -24,6 +24,7 @@
+ #include "tools/gn/ninja_utils.h"
+ #include "tools/gn/scheduler.h"
+ #include "tools/gn/settings.h"
++#include "tools/gn/source_file_type.h"
+ #include "tools/gn/string_utils.h"
+ #include "tools/gn/substitution_writer.h"
+ #include "tools/gn/target.h"
+@@ -66,27 +67,27 @@ void AddSourceSetObjectFiles(const Target* source_set,
+ if (source_set->GetOutputFilesForSource(source, &tool_name, &tool_outputs))
+ obj_files->push_back(tool_outputs[0]);
+
+- used_types.Set(source.type());
++ used_types.Set(GetSourceFileType(source));
+ }
+
+ // Add MSVC precompiled header object files. GCC .gch files are not object
+ // files so they are omitted.
+ if (source_set->config_values().has_precompiled_headers()) {
+- if (used_types.Get(SourceFile::SOURCE_C)) {
++ if (used_types.Get(SOURCE_C)) {
+ const CTool* tool = source_set->toolchain()->GetToolAsC(CTool::kCToolCc);
+ if (tool && tool->precompiled_header_type() == CTool::PCH_MSVC) {
+ GetPCHOutputFiles(source_set, CTool::kCToolCc, &tool_outputs);
+ obj_files->Append(tool_outputs.begin(), tool_outputs.end());
+ }
+ }
+- if (used_types.Get(SourceFile::SOURCE_CPP)) {
++ if (used_types.Get(SOURCE_CPP)) {
+ const CTool* tool = source_set->toolchain()->GetToolAsC(CTool::kCToolCxx);
+ if (tool && tool->precompiled_header_type() == CTool::PCH_MSVC) {
+ GetPCHOutputFiles(source_set, CTool::kCToolCxx, &tool_outputs);
+ obj_files->Append(tool_outputs.begin(), tool_outputs.end());
+ }
+ }
+- if (used_types.Get(SourceFile::SOURCE_M)) {
++ if (used_types.Get(SOURCE_M)) {
+ const CTool* tool =
+ source_set->toolchain()->GetToolAsC(CTool::kCToolObjC);
+ if (tool && tool->precompiled_header_type() == CTool::PCH_MSVC) {
+@@ -94,7 +95,7 @@ void AddSourceSetObjectFiles(const Target* source_set,
+ obj_files->Append(tool_outputs.begin(), tool_outputs.end());
+ }
+ }
+- if (used_types.Get(SourceFile::SOURCE_MM)) {
++ if (used_types.Get(SOURCE_MM)) {
+ const CTool* tool =
+ source_set->toolchain()->GetToolAsC(CTool::kCToolObjCxx);
+ if (tool && tool->precompiled_header_type() == CTool::PCH_MSVC) {
+@@ -118,7 +119,7 @@ void NinjaCBinaryTargetWriter::Run() {
+ // Figure out what source types are needed.
+ SourceFileTypeSet used_types;
+ for (const auto& source : target_->sources())
+- used_types.Set(source.type());
++ used_types.Set(GetSourceFileType(source));
+
+ WriteCompilerVars(used_types);
+
+@@ -234,34 +235,31 @@ void NinjaCBinaryTargetWriter::WriteCompilerVars(
+ target_->config_values().has_precompiled_headers();
+
+ EscapeOptions opts = GetFlagOptions();
+- if (used_types.Get(SourceFile::SOURCE_S) ||
+- used_types.Get(SourceFile::SOURCE_ASM)) {
++ if (used_types.Get(SOURCE_S) || used_types.Get(SOURCE_ASM)) {
+ WriteOneFlag(target_, &CSubstitutionAsmFlags, false, Tool::kToolNone,
+ &ConfigValues::asmflags, opts, path_output_, out_);
+ }
+- if (used_types.Get(SourceFile::SOURCE_C) ||
+- used_types.Get(SourceFile::SOURCE_CPP) ||
+- used_types.Get(SourceFile::SOURCE_M) ||
+- used_types.Get(SourceFile::SOURCE_MM)) {
++ if (used_types.Get(SOURCE_C) || used_types.Get(SOURCE_CPP) ||
++ used_types.Get(SOURCE_M) || used_types.Get(SOURCE_MM)) {
+ WriteOneFlag(target_, &CSubstitutionCFlags, false, Tool::kToolNone,
+ &ConfigValues::cflags, opts, path_output_, out_);
+ }
+- if (used_types.Get(SourceFile::SOURCE_C)) {
++ if (used_types.Get(SOURCE_C)) {
+ WriteOneFlag(target_, &CSubstitutionCFlagsC, has_precompiled_headers,
+ CTool::kCToolCc, &ConfigValues::cflags_c, opts, path_output_,
+ out_);
+ }
+- if (used_types.Get(SourceFile::SOURCE_CPP)) {
++ if (used_types.Get(SOURCE_CPP)) {
+ WriteOneFlag(target_, &CSubstitutionCFlagsCc, has_precompiled_headers,
+ CTool::kCToolCxx, &ConfigValues::cflags_cc, opts, path_output_,
+ out_);
+ }
+- if (used_types.Get(SourceFile::SOURCE_M)) {
++ if (used_types.Get(SOURCE_M)) {
+ WriteOneFlag(target_, &CSubstitutionCFlagsObjC, has_precompiled_headers,
+ CTool::kCToolObjC, &ConfigValues::cflags_objc, opts,
+ path_output_, out_);
+ }
+- if (used_types.Get(SourceFile::SOURCE_MM)) {
++ if (used_types.Get(SOURCE_MM)) {
+ WriteOneFlag(target_, &CSubstitutionCFlagsObjCc, has_precompiled_headers,
+ CTool::kCToolObjCxx, &ConfigValues::cflags_objcc, opts,
+ path_output_, out_);
+@@ -321,14 +319,14 @@ void NinjaCBinaryTargetWriter::WritePCHCommands(
+
+ const CTool* tool_c = target_->toolchain()->GetToolAsC(CTool::kCToolCc);
+ if (tool_c && tool_c->precompiled_header_type() != CTool::PCH_NONE &&
+- used_types.Get(SourceFile::SOURCE_C)) {
++ used_types.Get(SOURCE_C)) {
+ WritePCHCommand(&CSubstitutionCFlagsC, CTool::kCToolCc,
+ tool_c->precompiled_header_type(), input_dep,
+ order_only_deps, object_files, other_files);
+ }
+ const CTool* tool_cxx = target_->toolchain()->GetToolAsC(CTool::kCToolCxx);
+ if (tool_cxx && tool_cxx->precompiled_header_type() != CTool::PCH_NONE &&
+- used_types.Get(SourceFile::SOURCE_CPP)) {
++ used_types.Get(SOURCE_CPP)) {
+ WritePCHCommand(&CSubstitutionCFlagsCc, CTool::kCToolCxx,
+ tool_cxx->precompiled_header_type(), input_dep,
+ order_only_deps, object_files, other_files);
+@@ -336,7 +334,7 @@ void NinjaCBinaryTargetWriter::WritePCHCommands(
+
+ const CTool* tool_objc = target_->toolchain()->GetToolAsC(CTool::kCToolObjC);
+ if (tool_objc && tool_objc->precompiled_header_type() == CTool::PCH_GCC &&
+- used_types.Get(SourceFile::SOURCE_M)) {
++ used_types.Get(SOURCE_M)) {
+ WritePCHCommand(&CSubstitutionCFlagsObjC, CTool::kCToolObjC,
+ tool_objc->precompiled_header_type(), input_dep,
+ order_only_deps, object_files, other_files);
+@@ -345,7 +343,7 @@ void NinjaCBinaryTargetWriter::WritePCHCommands(
+ const CTool* tool_objcxx =
+ target_->toolchain()->GetToolAsC(CTool::kCToolObjCxx);
+ if (tool_objcxx && tool_objcxx->precompiled_header_type() == CTool::PCH_GCC &&
+- used_types.Get(SourceFile::SOURCE_MM)) {
++ used_types.Get(SOURCE_MM)) {
+ WritePCHCommand(&CSubstitutionCFlagsObjCc, CTool::kCToolObjCxx,
+ tool_objcxx->precompiled_header_type(), input_dep,
+ order_only_deps, object_files, other_files);
+@@ -478,7 +476,7 @@ void NinjaCBinaryTargetWriter::WriteSources(
+ deps.resize(0);
+ const char* tool_name = Tool::kToolNone;
+ if (!target_->GetOutputFilesForSource(source, &tool_name, &tool_outputs)) {
+- if (source.type() == SourceFile::SOURCE_DEF)
++ if (GetSourceFileType(source) == SOURCE_DEF)
+ other_files->push_back(source);
+ continue; // No output for this source.
+ }
+@@ -599,7 +597,7 @@ void NinjaCBinaryTargetWriter::WriteLinkerStuff(
+ const SourceFile* optional_def_file = nullptr;
+ if (!other_files.empty()) {
+ for (const SourceFile& src_file : other_files) {
+- if (src_file.type() == SourceFile::SOURCE_DEF) {
++ if (GetSourceFileType(src_file) == SOURCE_DEF) {
+ optional_def_file = &src_file;
+ implicit_deps.push_back(
+ OutputFile(settings_->build_settings(), src_file));
+diff --git b/tools/gn/source_file.cc a/tools/gn/source_file.cc
+index 7c860d43..79c6eb03 100644
+--- b/tools/gn/tools/gn/source_file.cc
++++ a/tools/gn/tools/gn/source_file.cc
+@@ -21,48 +21,18 @@ void AssertValueSourceFileString(const std::string& s) {
+ DCHECK(!EndsWithSlash(s)) << s;
+ }
+
+-SourceFile::Type GetSourceFileType(const std::string& file) {
+- base::StringPiece extension = FindExtension(&file);
+- if (extension == "cc" || extension == "cpp" || extension == "cxx")
+- return SourceFile::SOURCE_CPP;
+- if (extension == "h" || extension == "hpp" || extension == "hxx" ||
+- extension == "hh" || extension == "inc")
+- return SourceFile::SOURCE_H;
+- if (extension == "c")
+- return SourceFile::SOURCE_C;
+- if (extension == "m")
+- return SourceFile::SOURCE_M;
+- if (extension == "mm")
+- return SourceFile::SOURCE_MM;
+- if (extension == "rc")
+- return SourceFile::SOURCE_RC;
+- if (extension == "S" || extension == "s" || extension == "asm")
+- return SourceFile::SOURCE_S;
+- if (extension == "o" || extension == "obj")
+- return SourceFile::SOURCE_O;
+- if (extension == "def")
+- return SourceFile::SOURCE_DEF;
+- if (extension == "rs")
+- return SourceFile::SOURCE_RS;
+- if (extension == "go")
+- return SourceFile::SOURCE_GO;
+-
+- return SourceFile::SOURCE_UNKNOWN;
+-}
+-
+ } // namespace
+
+-SourceFile::SourceFile() : type_(SOURCE_UNKNOWN) {}
++SourceFile::SourceFile() = default;
+
+ SourceFile::SourceFile(const base::StringPiece& p)
+- : value_(p.data(), p.size()), type_(GetSourceFileType(value_)) {
++ : value_(p.data(), p.size()) {
+ DCHECK(!value_.empty());
+ AssertValueSourceFileString(value_);
+ NormalizePath(&value_);
+ }
+
+-SourceFile::SourceFile(SwapIn, std::string* value)
+- : type_(GetSourceFileType(*value)) {
++SourceFile::SourceFile(SwapIn, std::string* value) {
+ value_.swap(*value);
+ DCHECK(!value_.empty());
+ AssertValueSourceFileString(value_);
+diff --git b/tools/gn/source_file.h a/tools/gn/source_file.h
+index bcf5f422..f0339875 100644
+--- b/tools/gn/tools/gn/source_file.h
++++ a/tools/gn/tools/gn/source_file.h
+@@ -20,28 +20,6 @@ class SourceDir;
+ // ends in one.
+ class SourceFile {
+ public:
+- // This should be sequential integers starting from 0 so they can be used as
+- // array indices.
+- enum Type {
+- SOURCE_UNKNOWN = 0,
+- SOURCE_ASM,
+- SOURCE_C,
+- SOURCE_CPP,
+- SOURCE_H,
+- SOURCE_M,
+- SOURCE_MM,
+- SOURCE_S,
+- SOURCE_RC,
+- SOURCE_O, // Object files can be inputs, too. Also counts .obj.
+- SOURCE_DEF,
+-
+- SOURCE_RS,
+- SOURCE_GO,
+-
+- // Must be last.
+- SOURCE_NUMTYPES,
+- };
+-
+ enum SwapIn { SWAP_IN };
+
+ SourceFile();
+@@ -58,7 +36,6 @@ class SourceFile {
+
+ bool is_null() const { return value_.empty(); }
+ const std::string& value() const { return value_; }
+- Type type() const { return type_; }
+
+ // Returns everything after the last slash.
+ std::string GetName() const;
+@@ -103,7 +80,6 @@ class SourceFile {
+ friend class SourceDir;
+
+ std::string value_;
+- Type type_;
+
+ // Copy & assign supported.
+ };
+diff --git b/tools/gn/source_file_type.cc a/tools/gn/source_file_type.cc
+new file mode 100644
+index 00000000..fde1ccaf
+--- b/tools/gn/tools/gn/source_file_type.cc
++++ a/tools/gn/tools/gn/source_file_type.cc
+@@ -0,0 +1,37 @@
++// Copyright 2014 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "tools/gn/source_file_type.h"
++
++#include "tools/gn/filesystem_utils.h"
++#include "tools/gn/source_file.h"
++
++SourceFileType GetSourceFileType(const SourceFile& file) {
++ base::StringPiece extension = FindExtension(&file.value());
++ if (extension == "cc" || extension == "cpp" || extension == "cxx")
++ return SOURCE_CPP;
++ if (extension == "h" || extension == "hpp" || extension == "hxx" ||
++ extension == "hh")
++ return SOURCE_H;
++ if (extension == "c")
++ return SOURCE_C;
++ if (extension == "m")
++ return SOURCE_M;
++ if (extension == "mm")
++ return SOURCE_MM;
++ if (extension == "rc")
++ return SOURCE_RC;
++ if (extension == "S" || extension == "s" || extension == "asm")
++ return SOURCE_S;
++ if (extension == "o" || extension == "obj")
++ return SOURCE_O;
++ if (extension == "def")
++ return SOURCE_DEF;
++ if (extension == "rs")
++ return SOURCE_RS;
++ if (extension == "go")
++ return SOURCE_GO;
++
++ return SOURCE_UNKNOWN;
++}
+diff --git b/tools/gn/source_file_type.h a/tools/gn/source_file_type.h
+new file mode 100644
+index 00000000..d4054978
+--- b/tools/gn/tools/gn/source_file_type.h
++++ a/tools/gn/tools/gn/source_file_type.h
+@@ -0,0 +1,34 @@
++// Copyright 2014 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#ifndef TOOLS_GN_SOURCE_FILE_TYPE_H_
++#define TOOLS_GN_SOURCE_FILE_TYPE_H_
++
++class SourceFile;
++
++// This should be sequential integers starting from 0 so they can be used as
++// array indices.
++enum SourceFileType {
++ SOURCE_UNKNOWN = 0,
++ SOURCE_ASM,
++ SOURCE_C,
++ SOURCE_CPP,
++ SOURCE_H,
++ SOURCE_M,
++ SOURCE_MM,
++ SOURCE_S,
++ SOURCE_RC,
++ SOURCE_O, // Object files can be inputs, too. Also counts .obj.
++ SOURCE_DEF,
++
++ SOURCE_RS,
++ SOURCE_GO,
++
++ // Must be last.
++ SOURCE_NUMTYPES,
++};
++
++SourceFileType GetSourceFileType(const SourceFile& file);
++
++#endif // TOOLS_GN_SOURCE_FILE_TYPE_H_
+diff --git b/tools/gn/target.cc a/tools/gn/target.cc
+index 1afd22be..6272b44a 100644
+--- b/tools/gn/tools/gn/target.cc
++++ a/tools/gn/tools/gn/target.cc
+@@ -16,6 +16,7 @@
+ #include "tools/gn/filesystem_utils.h"
+ #include "tools/gn/functions.h"
+ #include "tools/gn/scheduler.h"
++#include "tools/gn/source_file_type.h"
+ #include "tools/gn/substitution_writer.h"
+ #include "tools/gn/tool.h"
+ #include "tools/gn/toolchain.h"
+@@ -486,10 +487,10 @@ bool Target::GetOutputFilesForSource(const SourceFile& source,
+ outputs->clear();
+ *computed_tool_type = Tool::kToolNone;
+
+- SourceFile::Type file_type = source.type();
+- if (file_type == SourceFile::SOURCE_UNKNOWN)
++ SourceFileType file_type = GetSourceFileType(source);
++ if (file_type == SOURCE_UNKNOWN)
+ return false;
+- if (file_type == SourceFile::SOURCE_O) {
++ if (file_type == SOURCE_O) {
+ // Object files just get passed to the output and not compiled.
+ outputs->push_back(OutputFile(settings()->build_settings(), source));
+ return true;
+diff --git b/tools/gn/tool.cc a/tools/gn/tool.cc
+index b040ac20..7a06b032 100644
+--- b/tools/gn/tools/gn/tool.cc
++++ a/tools/gn/tools/gn/tool.cc
+@@ -261,27 +261,27 @@ std::unique_ptr<Tool> Tool::CreateTool(const std::string& name) {
+ }
+
+ // static
+-const char* Tool::GetToolTypeForSourceType(SourceFile::Type type) {
++const char* Tool::GetToolTypeForSourceType(SourceFileType type) {
+ switch (type) {
+- case SourceFile::SOURCE_C:
++ case SOURCE_C:
+ return CTool::kCToolCc;
+- case SourceFile::SOURCE_CPP:
++ case SOURCE_CPP:
+ return CTool::kCToolCxx;
+- case SourceFile::SOURCE_M:
++ case SOURCE_M:
+ return CTool::kCToolObjC;
+- case SourceFile::SOURCE_MM:
++ case SOURCE_MM:
+ return CTool::kCToolObjCxx;
+- case SourceFile::SOURCE_ASM:
+- case SourceFile::SOURCE_S:
++ case SOURCE_ASM:
++ case SOURCE_S:
+ return CTool::kCToolAsm;
+- case SourceFile::SOURCE_RC:
++ case SOURCE_RC:
+ return CTool::kCToolRc;
+- case SourceFile::SOURCE_UNKNOWN:
+- case SourceFile::SOURCE_H:
+- case SourceFile::SOURCE_O:
+- case SourceFile::SOURCE_DEF:
+- case SourceFile::SOURCE_GO:
+- case SourceFile::SOURCE_RS:
++ case SOURCE_UNKNOWN:
++ case SOURCE_H:
++ case SOURCE_O:
++ case SOURCE_DEF:
++ case SOURCE_GO:
++ case SOURCE_RS:
+ return kToolNone;
+ default:
+ NOTREACHED();
+diff --git b/tools/gn/tool.h a/tools/gn/tool.h
+index a6f177d6..ec2eb94c 100644
+--- b/tools/gn/tools/gn/tool.h
++++ a/tools/gn/tools/gn/tool.h
+@@ -12,7 +12,7 @@
+ #include "tools/gn/label.h"
+ #include "tools/gn/label_ptr.h"
+ #include "tools/gn/scope.h"
+-#include "tools/gn/source_file.h"
++#include "tools/gn/source_file_type.h"
+ #include "tools/gn/substitution_list.h"
+ #include "tools/gn/substitution_pattern.h"
+
+@@ -171,7 +171,7 @@ class Tool {
+ Toolchain* toolchain,
+ Err* err);
+
+- static const char* GetToolTypeForSourceType(SourceFile::Type type);
++ static const char* GetToolTypeForSourceType(SourceFileType type);
+ static const char* GetToolTypeForTargetFinalOutput(const Target* target);
+
+ protected:
+diff --git b/tools/gn/toolchain.cc a/tools/gn/toolchain.cc
+index 0d6cbaf4..b718052c 100644
+--- b/tools/gn/tools/gn/toolchain.cc
++++ a/tools/gn/tools/gn/toolchain.cc
+@@ -88,16 +88,16 @@ void Toolchain::ToolchainSetupComplete() {
+ setup_complete_ = true;
+ }
+
+-const Tool* Toolchain::GetToolForSourceType(SourceFile::Type type) const {
++const Tool* Toolchain::GetToolForSourceType(SourceFileType type) const {
+ return GetTool(Tool::GetToolTypeForSourceType(type));
+ }
+
+-const CTool* Toolchain::GetToolForSourceTypeAsC(SourceFile::Type type) const {
++const CTool* Toolchain::GetToolForSourceTypeAsC(SourceFileType type) const {
+ return GetToolAsC(Tool::GetToolTypeForSourceType(type));
+ }
+
+ const GeneralTool* Toolchain::GetToolForSourceTypeAsGeneral(
+- SourceFile::Type type) const {
++ SourceFileType type) const {
+ return GetToolAsGeneral(Tool::GetToolTypeForSourceType(type));
+ }
+
+diff --git b/tools/gn/toolchain.h a/tools/gn/toolchain.h
+index cc93de54..e36475dd 100644
+--- b/tools/gn/tools/gn/toolchain.h
++++ a/tools/gn/tools/gn/toolchain.h
+@@ -12,6 +12,7 @@
+ #include "tools/gn/item.h"
+ #include "tools/gn/label_ptr.h"
+ #include "tools/gn/scope.h"
++#include "tools/gn/source_file_type.h"
+ #include "tools/gn/substitution_type.h"
+ #include "tools/gn/tool.h"
+ #include "tools/gn/value.h"
+@@ -87,9 +88,9 @@ class Toolchain : public Item {
+ }
+
+ // Returns the tool for compiling the given source file type.
+- const Tool* GetToolForSourceType(SourceFile::Type type) const;
+- const CTool* GetToolForSourceTypeAsC(SourceFile::Type type) const;
+- const GeneralTool* GetToolForSourceTypeAsGeneral(SourceFile::Type type) const;
++ const Tool* GetToolForSourceType(SourceFileType type) const;
++ const CTool* GetToolForSourceTypeAsC(SourceFileType type) const;
++ const GeneralTool* GetToolForSourceTypeAsGeneral(SourceFileType type) const;
+
+ // Returns the tool that produces the final output for the given target type.
+ // This isn't necessarily the tool you would expect. For copy target, this
+diff --git b/tools/gn/visual_studio_writer.cc a/tools/gn/visual_studio_writer.cc
+index 9dbd4b35..f804b444 100644
+--- b/tools/gn/tools/gn/visual_studio_writer.cc
++++ a/tools/gn/tools/gn/visual_studio_writer.cc
+@@ -24,6 +24,7 @@
+ #include "tools/gn/label_pattern.h"
+ #include "tools/gn/parse_tree.h"
+ #include "tools/gn/path_output.h"
++#include "tools/gn/source_file_type.h"
+ #include "tools/gn/standard_out.h"
+ #include "tools/gn/target.h"
+ #include "tools/gn/variables.h"
+--
+2.21.0
5 years, 4 months
[chromium-browser-privacy: 53/103] Merge branch 'master' into f30
by qvint
commit a16c57f6bb37b02006a8cf82e43ece979ea4b99e
Merge: 0dc6aab f426b11
Author: Vasiliy Glazov <vascom2(a)gmail.com>
Date: Fri May 24 10:10:05 2019 +0300
Merge branch 'master' into f30
chromium-vaapi.spec | 5 ++++-
sources | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
---
5 years, 4 months
[chromium-browser-privacy: 52/103] Update to 74.0.3729.169.
by qvint
commit f426b11aba381e8ddb68d7a3cf392990f0b097aa
Author: Vasiliy Glazov <vascom2(a)gmail.com>
Date: Fri May 24 10:09:23 2019 +0300
Update to 74.0.3729.169.
chromium-vaapi.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
index e261e36..2204870 100644
--- a/chromium-vaapi.spec
+++ b/chromium-vaapi.spec
@@ -63,7 +63,7 @@
%global ozone 0
##############################Package Definitions######################################
Name: chromium-vaapi
-Version: 74.0.3729.157
+Version: 74.0.3729.169
Release: 1%{?dist}
Summary: A Chromium web browser with video decoding acceleration
License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
@@ -669,6 +669,9 @@ appstream-util validate-relax --nonet "%{buildroot}%{_metainfodir}/%{name}.appda
%{chromiumdir}/locales/*.pak
#########################################changelogs#################################################
%changelog
+* Fri May 24 2019 Vasiliy N. Glazov <vascom2(a)gmail.com> - 74.0.3729.169-1
+- Update to 74.0.3729.169
+
* Thu May 16 2019 Akarshan Biswas <akarshanbiswas(a)fedoraproject.org> - 74.0.3729.157-1
- Update to 74.0.3729.157
5 years, 4 months
[chromium-browser-privacy: 51/103] Update to 74.0.3729.169.
by qvint
commit f98d10745fdd6bdaf1196992c474bbec050303a6
Author: Vasiliy Glazov <vascom2(a)gmail.com>
Date: Fri May 24 10:08:32 2019 +0300
Update to 74.0.3729.169.
sources | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/sources b/sources
index 7f5d742..adb8c64 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ce32bcc07548886a2456217ef3f8af79 chromium-74.0.3729.157.tar.xz
+3e13a4f65b6189e85848586de46cf888 chromium-74.0.3729.169.tar.xz
5 years, 4 months
[chromium-browser-privacy: 50/103] Merge branch 'master' into f30
by qvint
commit 0dc6aab17ac5facc36bb09f0bc5742327354da3f
Merge: b5ae81c f728a8c
Author: Akarshan Biswas <akarshanbiswas(a)fedoraproject.org>
Date: Thu May 16 09:10:47 2019 +0530
Merge branch 'master' into f30
chromium-vaapi.sh | 1 -
chromium-vaapi.spec | 9 ++++-
fixwindowflashm74.patch | 95 +++++++++++++++++++++++++++++++++++++++++++++++++
sources | 2 +-
4 files changed, 104 insertions(+), 3 deletions(-)
---
5 years, 4 months
[chromium-browser-privacy: 49/103] Update to 74.0.3729.157
by qvint
commit f728a8cc75d8697a70a26246f62d45e1cba59e16
Author: Akarshan Biswas <akarshanbiswas(a)fedoraproject.org>
Date: Thu May 16 09:02:28 2019 +0530
Update to 74.0.3729.157
chromium-vaapi.spec | 5 ++++-
sources | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
index a807c6e..e261e36 100644
--- a/chromium-vaapi.spec
+++ b/chromium-vaapi.spec
@@ -63,7 +63,7 @@
%global ozone 0
##############################Package Definitions######################################
Name: chromium-vaapi
-Version: 74.0.3729.131
+Version: 74.0.3729.157
Release: 1%{?dist}
Summary: A Chromium web browser with video decoding acceleration
License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
@@ -669,6 +669,9 @@ appstream-util validate-relax --nonet "%{buildroot}%{_metainfodir}/%{name}.appda
%{chromiumdir}/locales/*.pak
#########################################changelogs#################################################
%changelog
+* Thu May 16 2019 Akarshan Biswas <akarshanbiswas(a)fedoraproject.org> - 74.0.3729.157-1
+- Update to 74.0.3729.157
+
* Sun May 05 2019 Akarshan Biswas <akarshanbiswas(a)fedoraproject.org> - 74.0.3729.131-1
- Update to 74.0.3729.131 and spec cleanup
diff --git a/sources b/sources
index 39fe869..7f5d742 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-d5d3df1b1229191b1b7095863780a83d chromium-74.0.3729.131.tar.xz
+ce32bcc07548886a2456217ef3f8af79 chromium-74.0.3729.157.tar.xz
5 years, 4 months
[chromium-browser-privacy: 48/103] Add a patch from upstream to Fix window flash for some WMs; remove rasterization flag from wrapper d
by qvint
commit 0681269771c424d34670a796d6cd47f43be8cea4
Author: Akarshan Biswas <akarshanbiswas(a)fedoraproject.org>
Date: Wed May 8 14:57:53 2019 +0530
Add a patch from upstream to Fix window flash for some WMs; remove rasterization flag from wrapper due to graphic problems on some GPUs
chromium-vaapi.sh | 1 -
chromium-vaapi.spec | 4 +++
fixwindowflashm74.patch | 95 +++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 99 insertions(+), 1 deletion(-)
---
diff --git a/chromium-vaapi.sh b/chromium-vaapi.sh
index 12770d7..d01dba8 100644
--- a/chromium-vaapi.sh
+++ b/chromium-vaapi.sh
@@ -58,7 +58,6 @@ CHROMIUM_DISTRO_FLAGS+=" --enable-plugins \
--enable-user-scripts \
--enable-features=WebRTCPipeWireCapturer \
--enable-printing \
- --enable-gpu-rasterization \
--enable-sync"
exec -a "$0" "@@CHROMIUMDIR@@/$(basename "$0" | sed 's/\.sh$//')" $CHROMIUM_DISTRO_FLAGS "$@"
diff --git a/chromium-vaapi.spec b/chromium-vaapi.spec
index 1005317..a807c6e 100644
--- a/chromium-vaapi.spec
+++ b/chromium-vaapi.spec
@@ -204,6 +204,9 @@ Patch54: brand.patch
Patch65: chromium-73.0.3683.75-pipewire-cstring-fix.patch
# Update Linux Seccomp syscall restrictions to EPERM posix_spawn/vfork
Patch66: chromium-glibc-2.29.patch
+# Fix some chromium regressions against certain type of window compositors
+# Patch status: backported from https://chromium-review.googlesource.com/c/chromium/src/+/1597388
+Patch67: fixwindowflashm74.patch
%description
chromium-vaapi is an open-source web browser, powered by WebKit (Blink)
@@ -225,6 +228,7 @@ chromium-vaapi is an open-source web browser, powered by WebKit (Blink)
%patch65 -p1 -b .pipewire
%endif
%patch66 -p1 -b .glibc
+%patch67 -p1 -b .fwfm74
%if 0%{?fedora} >= 30
# Add a workaround for a race condition in clang-llvm8+ compiler
diff --git a/fixwindowflashm74.patch b/fixwindowflashm74.patch
new file mode 100644
index 0000000..42076de
--- /dev/null
+++ b/fixwindowflashm74.patch
@@ -0,0 +1,95 @@
+From 90e226ba50c98b5e60f74f9dce998b17117f9051 Mon Sep 17 00:00:00 2001
+From: Peng Huang <penghuang(a)chromium.org>
+Date: Tue, 07 May 2019 13:16:21 +0000
+Subject: [PATCH] Fix window flash for some WMs
+
+Bug: 956061
+Change-Id: I0d8d196395e70006a8fdc770f1e4a5ba6f93dd57
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1597388
+Commit-Queue: Peng Huang <penghuang(a)chromium.org>
+Reviewed-by: Antoine Labour <piman(a)chromium.org>
+Cr-Commit-Position: refs/heads/master@{#657215}
+---
+
+diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn
+index 50df0e4..1753dd48 100644
+--- a/ui/gl/BUILD.gn
++++ b/ui/gl/BUILD.gn
+@@ -274,7 +274,10 @@
+ "//build/config/linux:xext",
+ ]
+
+- deps += [ "//ui/gfx/x" ]
++ deps += [
++ "//ui/base/x",
++ "//ui/gfx/x",
++ ]
+ }
+ if (is_win) {
+ sources += [
+diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
+index f4c13be..777bf76 100644
+--- a/ui/gl/gl_surface_glx.cc
++++ b/ui/gl/gl_surface_glx.cc
+@@ -21,6 +21,7 @@
+ #include "base/time/time.h"
+ #include "base/trace_event/trace_event.h"
+ #include "build/build_config.h"
++#include "ui/base/x/x11_util.h"
+ #include "ui/events/platform/platform_event_source.h"
+ #include "ui/gfx/x/x11.h"
+ #include "ui/gfx/x/x11_connection.h"
+@@ -431,7 +432,9 @@
+ }
+
+ const XVisualInfo& visual_info =
+- gl::GLVisualPickerGLX::GetInstance()->rgba_visual();
++ ui::IsCompositingManagerPresent()
++ ? gl::GLVisualPickerGLX::GetInstance()->rgba_visual()
++ : gl::GLVisualPickerGLX::GetInstance()->system_visual();
+ g_visual = visual_info.visual;
+ g_depth = visual_info.depth;
+ g_colormap =
+@@ -581,18 +584,30 @@
+ }
+ size_ = gfx::Size(attributes.width, attributes.height);
+
+- XSetWindowAttributes swa;
+- memset(&swa, 0, sizeof(swa));
+- swa.background_pixmap = 0;
+- swa.bit_gravity = NorthWestGravity;
+- swa.colormap = g_colormap;
+- swa.background_pixel = 0;
+- swa.border_pixel = 0;
+- window_ = XCreateWindow(
+- gfx::GetXDisplay(), parent_window_, 0 /* x */, 0 /* y */, size_.width(),
+- size_.height(), 0 /* border_width */, g_depth, InputOutput, g_visual,
+- CWBackPixmap | CWBitGravity | CWColormap | CWBackPixel | CWBorderPixel,
+- &swa);
++ XSetWindowAttributes swa = {
++ .background_pixmap = 0,
++ .bit_gravity = NorthWestGravity,
++ .colormap = g_colormap,
++ .background_pixel = 0, // ARGB(0,0,0,0) for compositing WM
++ .border_pixel = 0,
++ };
++ auto value_mask = CWBackPixmap | CWBitGravity | CWColormap | CWBorderPixel;
++ if (ui::IsCompositingManagerPresent() &&
++ XVisualIDFromVisual(attributes.visual) == XVisualIDFromVisual(g_visual)) {
++ // When parent and child are using the same visual, the back buffer will be
++ // shared between parent and child. If WM compositing is enabled, we set
++ // child's background pixel to ARGB(0,0,0,0), so ARGB(0,0,0,0) will be
++ // filled to the shared buffer, when the child window is mapped. It can
++ // avoid an annoying flash when the child window is mapped below.
++ // If WM compositing is disabled, we don't set the background pixel, so
++ // nothing will be draw when the child window is mapped.
++ value_mask |= CWBackPixel;
++ }
++
++ window_ =
++ XCreateWindow(gfx::GetXDisplay(), parent_window_, 0 /* x */, 0 /* y */,
++ size_.width(), size_.height(), 0 /* border_width */,
++ g_depth, InputOutput, g_visual, value_mask, &swa);
+ if (!window_) {
+ LOG(ERROR) << "XCreateWindow failed";
+ return false;
5 years, 4 months