diff options
author | 2012-09-11 18:35:35 +0000 | |
---|---|---|
committer | 2012-09-11 18:35:35 +0000 | |
commit | fb3dd3a6f57204e9c455cfc65d65dc1a2a1d571c (patch) | |
tree | ffe9f023f5e18a8eb16907cc543ef22c6361b817 | |
parent | 91359395814d4b6a338601630c21518581a824a2 (diff) |
Temporarily add logging to GrContextFactory and SkNativeGLContext_android
Over-the-shoulder review from robertphillips@ and bsalomon@
Will revert soon.
Review URL: https://codereview.appspot.com/6496110
git-svn-id: http://skia.googlecode.com/svn/trunk@5491 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | include/gpu/GrContextFactory.h | 3 | ||||
-rw-r--r-- | src/gpu/android/SkNativeGLContext_android.cpp | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/include/gpu/GrContextFactory.h b/include/gpu/GrContextFactory.h index 600bedae66..57ba428898 100644 --- a/include/gpu/GrContextFactory.h +++ b/include/gpu/GrContextFactory.h @@ -90,15 +90,18 @@ public: } static const int kBogusSize = 1; if (!glCtx.get()) { + printf("GrContextFactory.h: no context\n"); return NULL; } if (!glCtx.get()->init(kBogusSize, kBogusSize)) { + printf("GrContextFactory.h: no init\n"); return NULL; } GrPlatform3DContext p3dctx = reinterpret_cast<GrPlatform3DContext>(glCtx.get()->gl()); grCtx.reset(GrContext::Create(kOpenGL_Shaders_GrEngine, p3dctx)); if (!grCtx.get()) { + printf("GrContextFactory.h: no gr context\n"); return NULL; } GPUContext& ctx = fContexts.push_back(); diff --git a/src/gpu/android/SkNativeGLContext_android.cpp b/src/gpu/android/SkNativeGLContext_android.cpp index f21eed8666..386b8675c7 100644 --- a/src/gpu/android/SkNativeGLContext_android.cpp +++ b/src/gpu/android/SkNativeGLContext_android.cpp @@ -57,7 +57,7 @@ const GrGLInterface* SkNativeGLContext::createGLContext() { EGLint majorVersion; EGLint minorVersion; eglInitialize(fDisplay, &majorVersion, &minorVersion); - + printf ("SkNativeGLContext::createGLContext(): EGL v%i.%i\n", majorVersion, minorVersion); EGLint numConfigs; static const EGLint configAttribs[] = { EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, @@ -72,6 +72,8 @@ const GrGLInterface* SkNativeGLContext::createGLContext() { EGLConfig surfaceConfig; eglChooseConfig(fDisplay, configAttribs, &surfaceConfig, 1, &numConfigs); + printf("SkNativeGLContext::createGLContext(): numConfigs=%i", numConfigs); + static const EGLint contextAttribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE @@ -90,7 +92,7 @@ const GrGLInterface* SkNativeGLContext::createGLContext() { const GrGLInterface* interface = GrGLCreateNativeInterface(); if (!interface) { - SkDebugf("Failed to create gl interface"); + printf("Failed to create gl interface\n"); this->destroyGLContext(); return NULL; } |