| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "embedders/openglui/android/android_graphics_handler.h" | 5 #include "embedders/openglui/android/android_graphics_handler.h" |
| 6 #include "embedders/openglui/common/log.h" | 6 #include "embedders/openglui/common/log.h" |
| 7 | 7 |
| 8 AndroidGraphicsHandler::AndroidGraphicsHandler(android_app* application) | 8 AndroidGraphicsHandler::AndroidGraphicsHandler(android_app* application, |
| 9 : GraphicsHandler(), | 9 const char* resource_path) |
| 10 : GraphicsHandler(resource_path), |
| 10 application_(application), | 11 application_(application), |
| 11 display_(EGL_NO_DISPLAY), | 12 display_(EGL_NO_DISPLAY), |
| 12 surface_(EGL_NO_SURFACE), | 13 surface_(EGL_NO_SURFACE), |
| 13 context_(EGL_NO_CONTEXT) { | 14 context_(EGL_NO_CONTEXT) { |
| 14 } | 15 } |
| 15 | 16 |
| 16 int32_t AndroidGraphicsHandler::Start() { | 17 int32_t AndroidGraphicsHandler::Start() { |
| 17 EGLint format, numConfigs; | 18 EGLint format, numConfigs; |
| 18 EGLConfig config; | 19 EGLConfig config; |
| 19 const EGLint attributes[] = { | 20 const EGLint attributes[] = { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } | 78 } |
| 78 if (surface_ != EGL_NO_SURFACE) { | 79 if (surface_ != EGL_NO_SURFACE) { |
| 79 eglDestroySurface(display_, surface_); | 80 eglDestroySurface(display_, surface_); |
| 80 surface_ = EGL_NO_SURFACE; | 81 surface_ = EGL_NO_SURFACE; |
| 81 } | 82 } |
| 82 eglTerminate(display_); | 83 eglTerminate(display_); |
| 83 display_ = EGL_NO_DISPLAY; | 84 display_ = EGL_NO_DISPLAY; |
| 84 } | 85 } |
| 85 } | 86 } |
| 86 | 87 |
| OLD | NEW |