Commit 380aafbf authored by fwang's avatar fwang Committed by Commit bot

Ozone caca: Fix segfault during GPU initialization

After https://codereview.chromium.org/2270463002,
gl::init::GetAllowedGLImplementations assumes GetSurfaceFactoryOzone to
be non-null on the GPU side. The remaining Ozone platform violating
this assumption is addressed in this CL.

BUG=640613
R=rjkroege@chromium.org

Review-Url: https://codereview.chromium.org/2346433002
Cr-Commit-Position: refs/heads/master@{#418781}
parent 81e77929
......@@ -73,6 +73,12 @@ class OzonePlatformCaca : public OzonePlatform {
}
void InitializeGPU() override {
if (!window_manager_) {
// The return value of GetSurfaceFactoryOzone() must be non-null so a
// dummy instance of CacaWindowManager is needed to make the GPU
// initialization gracefully fail.
window_manager_.reset(new CacaWindowManager);
}
}
private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment