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

Side by Side Diff: runtime/embedders/android/graphics.cc

Issue 11467028: Migrate files to embedder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review fixes Created 7 years, 11 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
« no previous file with comments | « runtime/embedders/android/graphics.h ('k') | runtime/embedders/android/input_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "jni/graphics.h" 5 #include "embedders/android/graphics.h"
6 6
7 #include <GLES2/gl2.h> 7 #include <GLES2/gl2.h>
8 #include <GLES2/gl2ext.h> 8 #include <GLES2/gl2ext.h>
9 9
10 #include "jni/log.h" 10 #include "embedders/android/log.h"
11 11
12 Graphics::Graphics(android_app* application, Timer* timer) 12 Graphics::Graphics(android_app* application, Timer* timer)
13 : application_(application), 13 : application_(application),
14 timer_(timer), 14 timer_(timer),
15 width_(0), 15 width_(0),
16 height_(0), 16 height_(0),
17 display_(EGL_NO_DISPLAY), 17 display_(EGL_NO_DISPLAY),
18 surface_(EGL_NO_SURFACE), 18 surface_(EGL_NO_SURFACE),
19 context_(EGL_NO_CONTEXT) { 19 context_(EGL_NO_CONTEXT) {
20 } 20 }
21 21
22 const int32_t& Graphics::height() { 22 const int32_t& Graphics::height() {
23 return height_; 23 return height_;
24 } 24 }
25 25
26 const int32_t& Graphics::width() { 26 const int32_t& Graphics::width() {
27 return width_; 27 return width_;
28 } 28 }
29 29
30 int32_t Graphics::Start() { 30 int32_t Graphics::Start() {
31 EGLint format, numConfigs, errorResult; 31 EGLint format, numConfigs;
32 EGLConfig config; 32 EGLConfig config;
33 const EGLint attributes[] = { 33 const EGLint attributes[] = {
34 EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, 34 EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
35 EGL_NONE 35 EGL_NONE
36 }; 36 };
37 static const EGLint ctx_attribs[] = { 37 static const EGLint ctx_attribs[] = {
38 EGL_CONTEXT_CLIENT_VERSION, 2, 38 EGL_CONTEXT_CLIENT_VERSION, 2,
39 EGL_NONE 39 EGL_NONE
40 }; 40 };
41 41
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 surface_ = EGL_NO_SURFACE; 89 surface_ = EGL_NO_SURFACE;
90 } 90 }
91 eglTerminate(display_); 91 eglTerminate(display_);
92 display_ = EGL_NO_DISPLAY; 92 display_ = EGL_NO_DISPLAY;
93 } 93 }
94 } 94 }
95 95
96 int32_t Graphics::Update() { 96 int32_t Graphics::Update() {
97 return 0; 97 return 0;
98 } 98 }
OLDNEW
« no previous file with comments | « runtime/embedders/android/graphics.h ('k') | runtime/embedders/android/input_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698