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
This commit is contained in:
borenet@google.com 2012-09-11 18:35:35 +00:00
parent 9135939581
commit fb3dd3a6f5
2 changed files with 7 additions and 2 deletions

View File

@ -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();

View File

@ -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;
}