Commit bed0c3d5 authored by Hal Canary's avatar Hal Canary Committed by Commit Bot

cleanup GrGLCreateNativeInterface

Motivation: It is odd to define a Gr- prefixed function outside of
third_party/skia.  GrGLCreateNativeInterface exists in third_party/skia, and is
deprecated.

Change-Id: Icb20c390926c063c57d3cd84a9f1a4bfda2e171b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1982620
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Reviewed-by: default avatarMichael Spang <spang@chromium.org>
Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
Auto-Submit: Hal Canary <halcanary@google.com>
Cr-Commit-Position: refs/heads/master@{#728638}
parent e6cc5f3f
......@@ -165,12 +165,6 @@ wl_registry_listener g_registry_listener = {RegistryHandler, RegistryRemover};
wl_buffer_listener g_buffer_listener = {BufferRelease};
#if defined(USE_GBM)
const GrGLInterface* GrGLCreateNativeInterface() {
return GrGLAssembleInterface(nullptr, [](void* ctx, const char name[]) {
return eglGetProcAddress(name);
});
}
#if defined(USE_VULKAN)
uint32_t VulkanChooseGraphicsQueueFamily(VkPhysicalDevice device) {
uint32_t properties_number = 0;
......@@ -446,7 +440,6 @@ bool ClientBase::Init(const InitParams& params) {
}
#if defined(USE_GBM)
sk_sp<const GrGLInterface> native_interface;
if (params.use_drm) {
// Number of files to look for when discovering DRM devices.
const uint32_t kDrmMaxMinor = 15;
......@@ -504,7 +497,9 @@ bool ClientBase::Init(const InitParams& params) {
egl_sync_type_ = EGL_SYNC_NATIVE_FENCE_ANDROID;
}
native_interface = sk_sp<const GrGLInterface>(GrGLCreateNativeInterface());
sk_sp<const GrGLInterface> native_interface = GrGLMakeAssembledInterface(
nullptr,
[](void* ctx, const char name[]) { return eglGetProcAddress(name); });
DCHECK(native_interface);
gr_context_ = GrContext::MakeGL(std::move(native_interface));
DCHECK(gr_context_);
......
......@@ -30,12 +30,6 @@ namespace ui {
namespace {
const GrGLInterface* GrGLCreateNativeInterface() {
return GrGLAssembleInterface(nullptr, [](void* ctx, const char name[]) {
return gl::GetGLProcAddress(name);
});
}
const char kUseDDL[] = "use-ddl";
} // namespace
......@@ -71,8 +65,9 @@ bool SkiaGlRenderer::Initialize() {
return false;
}
auto native_interface =
sk_sp<const GrGLInterface>(GrGLCreateNativeInterface());
sk_sp<const GrGLInterface> native_interface = GrGLMakeAssembledInterface(
nullptr,
[](void* ctx, const char name[]) { return gl::GetGLProcAddress(name); });
DCHECK(native_interface);
GrContextOptions options;
// TODO(csmartdalton): enable internal multisampling after the related Skia
......
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