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

Side by Side Diff: runtime/embedders/openglui/android/android_graphics_handler.cc

Issue 12340036: Android improvements: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698