Skip to content

Instantly share code, notes, and snippets.

@mntmn
Created March 6, 2018 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mntmn/2cb40b1bf27fb721bf7577ef229658d8 to your computer and use it in GitHub Desktop.
Save mntmn/2cb40b1bf27fb721bf7577ef229658d8 to your computer and use it in GitHub Desktop.
mntmn's igalia chromium for wayland patches to work around 2 startup crashes.
platform:
- Linux irata-debian 4.15.0-1-amd64 #1 SMP Debian 4.15.4-1 (2018-02-18) x86_64 GNU/Linux
- vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i7-3540M CPU @ 3.00GHz
- Extended renderer info (GLX_MESA_query_renderer):
Vendor: Intel Open Source Technology Center (0x8086)
Device: Mesa DRI Intel(R) Ivybridge Mobile (0x166)
Version: 18.0.0
Accelerated: yes
Video memory: 1536MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.2
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
- 00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
Subsystem: Apple Inc. 3rd Gen Core processor Graphics Controller
Flags: bus master, fast devsel, latency 0, IRQ 33
...
Kernel driver in use: i915
Kernel modules: i915
- weston 3.0.0
- launched with ./chrome --mus --ozone-backend=wayland --user-data-dir=/tmp/foo --no-sandbox
patches (manual notation, sorry, forgot to setup a git in the extracted snapshot):
1. ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
bool XkbKeyboardLayoutEngine::SetCurrentLayoutByName(
const std::string& layout_name) {
#if defined(OS_CHROMEOS)
current_layout_name_ = layout_name;
for (const auto& entry : xkb_keymaps_) {
if (entry.layout_name == layout_name) {
SetKeymap(entry.keymap);
return true;
}
}
LoadKeymapCallback reply_callback = base::Bind(
&XkbKeyboardLayoutEngine::OnKeymapLoaded, weak_ptr_factory_.GetWeakPtr());
base::PostTaskWithTraits(
FROM_HERE,
{base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
base::Bind(&LoadKeymap, layout_name, base::ThreadTaskRunnerHandle::Get(),
reply_callback));
#else
- NOTIMPLEMENTED();
+ // NOTIMPLEMENTED();
#endif // defined(OS_CHROMEOS)
return true;
}
2. ui/gl/gl_context.cc
#if DCHECK_IS_ON()
GLenum error = glGetError();
// Accepting a context loss error here enables using debug mode to work on
// context loss handling in virtual context mode.
// There should be no other errors from the previous context leaking into
// the new context.
- DCHECK(error == GL_NO_ERROR || error == GL_CONTEXT_LOST_KHR) <<
- "GL error was: " << error;
+ if (error != GL_NO_ERROR) {
+ LOG(ERROR) << error << "\n";
+ }
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment