Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/egl/qegl_symbian.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    4343#include <QtGui/qpixmap.h>
    4444#include <QtGui/qwidget.h>
     45
    4546#include "qegl_p.h"
     47
    4648
    4749#include <coecntrl.h>
     
    4951QT_BEGIN_NAMESPACE
    5052
    51 EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
     53EGL)
    5254{
    53     // Create the native drawable for the paint device.
    54     int devType = device->devType();
    55     EGLNativePixmapType pixmapDrawable = 0;
    56     EGLNativeWindowType windowDrawable = 0;
    57     bool ok;
    58     if (devType == QInternal::Pixmap) {
    59         pixmapDrawable = 0;
    60         ok = (pixmapDrawable != 0);
    61     } else if (devType == QInternal::Widget) {
    62         QWidget *w = static_cast<QWidget *>(device);
    63         windowDrawable = (EGLNativeWindowType)(w->winId()->DrawableWindow());
    64         ok = (windowDrawable != 0);
    65     } else {
    66         ok = false;
    67     }
    68     if (!ok) {
    69         qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable");
    70         return EGL_NO_SURFACE;
    71     }
     55    return EGL_DEFAULT_DISPLAY;
     56}
    7257
    73     // Create the EGL surface to draw into, based on the native drawable.
    74     const int *props;
    75     if (properties)
    76         props = properties->properties();
    77     else
    78         props = 0;
    79     EGLSurface surf;
    80     if (devType == QInternal::Widget)
    81         surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, props);
    82     else
    83         surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, props);
    84     if (surf == EGL_NO_SURFACE)
    85         qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError());
    86     return surf;
     58EGLNativeWindowType QEgl::nativeWindow(QWidget* widget)
     59{
     60    return (EGLNativeWindowType)(widget->winId()->DrawableWindow());
     61}
     62
     63EGLNativePixmapType QEgl::nativePixmap(QPixmap*)
     64{
     65    qWarning("QEgl: EGL pixmap surfaces not implemented yet on Symbian");
     66    return (EGLNativePixmapType)0;
    8767}
    8868
Note: See TracChangeset for help on using the changeset viewer.