aboutsummaryrefslogtreecommitdiffstats
path: root/support/magicleap/Servo2D/code
diff options
context:
space:
mode:
authorAlan Jeffrey <ajeffrey@mozilla.com>2018-10-29 12:13:34 -0500
committerAlan Jeffrey <ajeffrey@mozilla.com>2018-10-29 12:13:34 -0500
commit0124baa82f1bd5119cf6398af2e97b4ddf444e9a (patch)
tree8d02c9af30a2246aa0bee54b5c119fecd40b4bc9 /support/magicleap/Servo2D/code
parent0ec0f705b66f1d527e24ddd5f99bd29e402a6bb0 (diff)
downloadservo-0124baa82f1bd5119cf6398af2e97b4ddf444e9a.tar.gz
servo-0124baa82f1bd5119cf6398af2e97b4ddf444e9a.zip
Reduce the amount of EGL buffer swapping the ML port is doing
Diffstat (limited to 'support/magicleap/Servo2D/code')
-rw-r--r--support/magicleap/Servo2D/code/src/Servo2D.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/support/magicleap/Servo2D/code/src/Servo2D.cpp b/support/magicleap/Servo2D/code/src/Servo2D.cpp
index 3d6c0ca905e..b694bc1680f 100644
--- a/support/magicleap/Servo2D/code/src/Servo2D.cpp
+++ b/support/magicleap/Servo2D/code/src/Servo2D.cpp
@@ -113,8 +113,6 @@ int Servo2D::init() {
EGLContext ctx = plane_->getEGLContext();
EGLSurface surf = plane_->getEGLSurface();
EGLDisplay dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- eglMakeCurrent(dpy, surf, surf, ctx);
- glViewport(0, 0, VIEWPORT_W, VIEWPORT_H);
// Hook into servo
servo_ = init_servo(ctx, surf, dpy, logger, "https://servo.org", VIEWPORT_H, VIEWPORT_W, HIDPI);
@@ -124,9 +122,6 @@ int Servo2D::init() {
return 1;
}
- // Flush GL
- glFlush();
- eglSwapBuffers(dpy, surf);
return 0;
}
@@ -173,20 +168,9 @@ void Servo2D::instanceInitialScenes() {
}
bool Servo2D::updateLoop(float fDelta) {
- // Get the EGL context, surface and display.
- EGLContext ctx = plane_->getEGLContext();
- EGLSurface surf = plane_->getEGLSurface();
- EGLDisplay dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- eglMakeCurrent(dpy, surf, surf, ctx);
- glViewport(0, 0, VIEWPORT_W, VIEWPORT_H);
-
// Hook into servo
heartbeat_servo(servo_);
- // Flush GL
- glFlush();
- eglSwapBuffers(dpy, surf);
-
// Return true for your app to continue running, false to terminate the app.
return true;
}