Code example for SurfaceHolder

Methods: getSurfaceFrame

0
            } 
        } 
        //! 描画先サーフェイスを作成する 
        { 
            //! SurfaceHolderに結びつける 
            eglSurface = egl.eglCreateWindowSurface(eglDisplay, eglConfig, holder, null);
 
            if (eglSurface == EGL10.EGL_NO_SURFACE) {
                log("glSurface == EGL10.EGL_NO_SURFACE"); 
                return; 
            } 
        } 
 
        //! GLESインターフェース取得 
        { 
            gl10 = (GL10) eglContext.getGL();
        } 
 
        //! サーフェイスとコンテキストを結びつける 
        { 
            if (!egl.eglMakeCurrent(eglDisplay, eglSurface, eglSurface, eglContext)) {
                log("!eglMakeCurrent"); 
                return; 
            } 
        } 
 
        { 
            windowWidth = holder.getSurfaceFrame().width();
            windowHeight = holder.getSurfaceFrame().height();
 
            gl10.glViewport(0, 0, windowWidth, windowHeight);
        } 
    } 
 
Contextual code suggestions in your IDE  Get Codota for Java