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

Unified Diff: runtime/embedders/openglui/android/android_graphics_handler.cc

Issue 12186002: Canvas API. There are still a number of things to do: (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 side-by-side diff with in-line comments
Download patch
Index: runtime/embedders/openglui/android/android_graphics_handler.cc
===================================================================
--- runtime/embedders/openglui/android/android_graphics_handler.cc (revision 17737)
+++ runtime/embedders/openglui/android/android_graphics_handler.cc (working copy)
@@ -6,7 +6,7 @@
#include "embedders/openglui/common/log.h"
AndroidGraphicsHandler::AndroidGraphicsHandler(android_app* application)
- : GLGraphicsHandler(),
+ : GraphicsHandler(),
application_(application),
display_(EGL_NO_DISPLAY),
surface_(EGL_NO_SURFACE),
@@ -32,7 +32,7 @@
LOGI("eglChooseConfig");
if (eglChooseConfig(display_, attributes, &config, 1, &numConfigs) &&
numConfigs > 0) {
- LOGI("eglGetConfigAttrib");
+ LOGI("eglGetConfigAttrib returned %d configs\n", numConfigs);
if (eglGetConfigAttrib(display_, config,
EGL_NATIVE_VISUAL_ID, &format)) {
ANativeWindow_setBuffersGeometry(application_->window, 0, 0, format);
@@ -48,8 +48,12 @@
width_ > 0 &&
eglQuerySurface(display_, surface_, EGL_HEIGHT, &height_) &&
height_ > 0) {
+ LOGI("Got dimensions %d x %d\n", width_, height_);
SetViewport(0, 0, width_, height_);
- return 0;
+ LOGI("GL version %s\n", glGetString(GL_VERSION));
+ LOGI("GLSL version: %s\n",
+ glGetString(GL_SHADING_LANGUAGE_VERSION));
+ return GraphicsHandler::Start();
}
}
}
@@ -64,6 +68,7 @@
void AndroidGraphicsHandler::Stop() {
LOGI("Stopping graphics");
+ GraphicsHandler::Stop();
if (display_ != EGL_NO_DISPLAY) {
eglMakeCurrent(display_, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (context_ != EGL_NO_CONTEXT) {
« no previous file with comments | « runtime/embedders/openglui/android/android_graphics_handler.h ('k') | runtime/embedders/openglui/android/eventloop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698