Commit c8434652 authored by Brian Salomon's avatar Brian Salomon Committed by Commit Bot

Use newer GrGLFunction based on templated function types rather than pointers.

Allows https://skia-review.googlesource.com/c/skia/+/154501 to land.

Bug: skia:8262
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ic1a9a6753814a5e6dbdfd057f6a96dbcb152e3b6
Reviewed-on: https://chromium-review.googlesource.com/1224660Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Cr-Commit-Position: refs/heads/master@{#594810}
parent 611030c8
......@@ -26,7 +26,8 @@ class ScopedCallingGLFromSkia {
};
template <typename R, typename... Args>
GrGLFunction<R (*)(Args...)> gles_bind(R (GLES2Interface::*func)(Args...),
GrGLFunction<R GR_GL_FUNCTION_TYPE(Args...)> gles_bind(
R (GLES2Interface::*func)(Args...),
GLES2Interface* gles2_interface,
ContextSupport* context_support) {
if (context_support->HasGrContextSupport()) {
......
......@@ -12,7 +12,7 @@ namespace init {
namespace {
template <typename R, typename... Args>
GrGLFunction<R (*)(Args...)> bind(R (gl::GLApi::*func)(Args...),
GrGLFunction<R GR_GL_FUNCTION_TYPE(Args...)> bind(R (gl::GLApi::*func)(Args...),
gl::GLApi* api) {
return [func, api](Args... args) { return (api->*func)(args...); };
}
......@@ -63,7 +63,7 @@ sk_sp<GrGLInterface> CreateGrGLInterface(
// by the bindings (GL 4.1 or ES 3.0), and blacklist extensions that skia
// handles but bindings don't.
// TODO(piman): add bindings for missing entrypoints.
GrGLFunction<GrGLGetStringProc> get_string;
GrGLFunction<GrGLGetStringFn> get_string;
const bool apply_version_override = use_version_es2 ||
version_info.IsAtLeastGL(4, 2) ||
version_info.IsAtLeastGLES(3, 1);
......
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