
Bug: 1129754 Change-Id: I6e9c50880541095008f8b71d25455e9a59128f77 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2397669 Reviewed-by: Mike West <mkwst@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Gary Kacmarcik <garykac@chromium.org> Reviewed-by: Chih-Yu Huang <akahuang@chromium.org> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chunbo Hua <chunbo.hua@intel.com> Cr-Commit-Position: refs/heads/master@{#811248}
34 lines
1015 B
C++
34 lines
1015 B
C++
// Copyright 2019 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 "content/gpu/browser_exposed_gpu_interfaces.h"
|
|
|
|
#include "content/public/common/content_client.h"
|
|
#include "content/public/gpu/content_gpu_client.h"
|
|
#include "mojo/public/cpp/bindings/binder_map.h"
|
|
|
|
#if defined(USE_OZONE)
|
|
#include "ui/base/ui_base_features.h"
|
|
#include "ui/ozone/public/ozone_platform.h"
|
|
#endif
|
|
|
|
namespace content {
|
|
|
|
void ExposeGpuInterfacesToBrowser(
|
|
const gpu::GpuPreferences& gpu_preferences,
|
|
const gpu::GpuDriverBugWorkarounds& gpu_workarounds,
|
|
mojo::BinderMap* binders) {
|
|
if (GetContentClient()->gpu()) { // May be null in tests.
|
|
GetContentClient()->gpu()->ExposeInterfacesToBrowser(
|
|
gpu_preferences, gpu_workarounds, binders);
|
|
}
|
|
|
|
#if defined(USE_OZONE)
|
|
if (features::IsUsingOzonePlatform())
|
|
ui::OzonePlatform::GetInstance()->AddInterfaces(binders);
|
|
#endif
|
|
}
|
|
|
|
} // namespace content
|