Lines Matching refs:fb
113 FrameBuffer *fb = new FrameBuffer(width, height);
114 if (!fb) {
115 ERR("Failed to create fb\n");
124 fb->m_caps.hasGL2 = false;
127 fb->m_caps.hasGL2 = s_gl2_enabled;
130 fb->m_caps.hasGL2 = false;
136 fb->m_eglDisplay = s_egl.eglGetDisplay(EGL_DEFAULT_DISPLAY);
137 if (fb->m_eglDisplay == EGL_NO_DISPLAY) {
139 delete fb;
143 if (!s_egl.eglInitialize(fb->m_eglDisplay, &fb->m_caps.eglMajor, &fb->m_caps.eglMinor)) {
145 delete fb;
149 DBG("egl: %d %d\n", fb->m_caps.eglMajor, fb->m_caps.eglMinor);
158 if (fb->m_caps.hasGL2) {
159 gl2Extensions = getGLES2ExtensionString(fb->m_eglDisplay);
162 fb->m_caps.hasGL2 = false;
187 if (!s_egl.eglChooseConfig(fb->m_eglDisplay, configAttribs,
188 &fb->m_eglConfig, 1, &n)) {
190 delete fb;
199 fb->m_eglContext = s_egl.eglCreateContext(fb->m_eglDisplay, fb->m_eglConfig,
202 if (fb->m_eglContext == EGL_NO_CONTEXT) {
204 delete fb;
216 fb->m_pbufContext = s_egl.eglCreateContext(fb->m_eglDisplay, fb->m_eglConfig,
217 fb->m_eglContext,
219 if (fb->m_pbufContext == EGL_NO_CONTEXT) {
221 delete fb;
227 // the FB context.
228 // The FB output will go to a subwindow, if one exist.
236 fb->m_pbufSurface = s_egl.eglCreatePbufferSurface(fb->m_eglDisplay,
237 fb->m_eglConfig,
239 if (fb->m_pbufSurface == EGL_NO_SURFACE) {
240 printf("Failed to create pbuf surface for FB 0x%x\n", s_egl.eglGetError());
241 delete fb;
246 if (!fb->bind_locked()) {
248 delete fb;
261 if (fb->m_caps.hasGL2 && has_gl_oes_image) {
265 const char *eglExtensions = s_egl.eglQueryString(fb->m_eglDisplay,
269 fb->m_caps.has_eglimage_texture_2d =
271 fb->m_caps.has_eglimage_renderbuffer =
275 fb->m_caps.has_eglimage_texture_2d = false;
276 fb->m_caps.has_eglimage_renderbuffer = false;
285 if (!fb->m_caps.has_eglimage_texture_2d) {
287 delete fb;
294 InitConfigStatus configStatus = FBConfig::initConfigList(fb);
297 delete fb;
321 delete fb;
329 fb->m_caps.hasGL2 = false;
335 fb->initGLState();
337 // release the FB context
338 fb->unbind_locked();
343 s_theFrameBuffer = fb;
380 FrameBuffer *fb = s_theFrameBuffer;
381 if (!fb->m_subWin) {
383 // create native subwindow for FB display output
384 fb->m_subWin = createSubWindow(p_window,
385 &fb->m_subWinDisplay,
387 if (fb->m_subWin) {
388 fb->m_nativeWindow = p_window;
391 fb->m_eglSurface = s_egl.eglCreateWindowSurface(fb->m_eglDisplay,
392 fb->m_eglConfig,
393 fb->m_subWin,
396 if (fb->m_eglSurface == EGL_NO_SURFACE) {
398 destroySubWindow(fb->m_subWinDisplay, fb->m_subWin);
399 fb->m_subWin = NULL;
401 else if (fb->bindSubwin_locked()) {
406 fb->m_zRot = zRot;
407 fb->post( fb->m_lastPostedColorBuffer, false );
408 fb->unbind_locked();
776 // no subwindow created for the FB output