Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1792)

Unified Diff: mojo/public/platform/native/mgl_thunks.h

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/platform/native/mgl_thunks.h
diff --git a/mojo/public/platform/native/mgl_thunks.h b/mojo/public/platform/native/mgl_thunks.h
deleted file mode 100644
index ad815ed701c2307f5bb124aee22226b259605934..0000000000000000000000000000000000000000
--- a/mojo/public/platform/native/mgl_thunks.h
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2015 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.
-
-#ifndef MOJO_PUBLIC_PLATFORM_NATIVE_MGL_THUNKS_H_
-#define MOJO_PUBLIC_PLATFORM_NATIVE_MGL_THUNKS_H_
-
-#include <MGL/mgl.h>
-#include <stddef.h>
-
-// Structure used to bind the interface which manipulates MGL contexts to a
-// DSO to theose of the embedder.
-//
-// This is the ABI between the embedder and the DSO. It can only have new
-// functions added to the end. No other changes are supported.
-#pragma pack(push, 8)
-struct MGLThunks {
- size_t size; // Should be set to sizeof(MGLThunks).
-
- MGLContext (*MGLCreateContext)(MGLOpenGLAPIVersion version,
- MojoHandle command_buffer_handle,
- MGLContext share_group,
- MGLContextLostCallback lost_callback,
- void* lost_callback_closure,
- const struct MojoAsyncWaiter* async_waiter);
- void (*MGLDestroyContext)(MGLContext context);
- void (*MGLMakeCurrent)(MGLContext context);
- MGLContext (*MGLGetCurrentContext)(void);
- MGLMustCastToProperFunctionPointerType (*MGLGetProcAddress)(const char* name);
-};
-#pragma pack(pop)
-
-// Intended to be called from the embedder. Returns an object initialized to
-// contain pointers to each of the embedder's MGLThunks functions.
-inline struct MGLThunks MojoMakeMGLThunks() {
- struct MGLThunks mgl_thunks = {
- sizeof(struct MGLThunks),
- MGLCreateContext,
- MGLDestroyContext,
- MGLMakeCurrent,
- MGLGetCurrentContext,
- MGLGetProcAddress,
- };
-
- return mgl_thunks;
-}
-
-// Use this type for the function found by dynamically discovering it in
-// a DSO linked with mojo_system. For example:
-// MojoSetMGLThunksFn mojo_set_gles2_thunks_fn =
-// reinterpret_cast<MojoSetMGLThunksFn>(
-// app_library.GetFunctionPointer("MojoSetMGLThunks"));
-// The expected size of |mgl_thunks| is returned.
-// The contents of |mgl_thunks| are copied.
-typedef size_t (*MojoSetMGLThunksFn)(const struct MGLThunks* mgl_thunks);
-
-#endif // MOJO_PUBLIC_PLATFORM_NATIVE_MGL_THUNKS_H_
« no previous file with comments | « mojo/public/platform/native/mgl_signal_sync_point_thunks.c ('k') | mojo/public/platform/native/mgl_thunks.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698