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/opengl/qgl_qws.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])
     
    118118    else
    119119        return false;
    120 }
    121 
    122 void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device)
    123 {
    124     // Find the QGLScreen for this paint device.
    125     QGLScreen *glScreen = glScreenForDevice(device);
    126     if (!glScreen) {
    127         qWarning("QGLContext::chooseContext(): The screen is not a QGLScreen");
    128         return;
    129     }
    130     int devType = device->devType();
    131     if (devType == QInternal::Image)
    132         props.setPixelFormat(static_cast<QImage *>(device)->format());
    133     else
    134         props.setPixelFormat(glScreen->pixelFormat());
    135120}
    136121
     
    198183    // Get the display and initialize it.
    199184    d->eglContext = new QEglContext();
     185
    200186    d->eglContext->setApi(QEgl::OpenGL);
    201187
    202188    // Construct the configuration we need for this surface.
    203189    QEglProperties configProps;
    204     qt_egl_add_platform_config(configProps, device());
    205     qt_egl_set_format(configProps, devType, d->glFormat);
     190    qt_eglproperties_set_glformat(configProps, d->glFormat);
     191    configProps.setDeviceType(devType);
     192    configProps.setPaintDeviceFormat(device());
    206193    configProps.setRenderableType(QEgl::OpenGL);
    207194
     
    215202
    216203    // Inform the higher layers about the actual format properties.
    217     qt_egl_update_format(*(d->eglContext), d->glFormat);
     204    qt_);
    218205
    219206    // Create a new context for the configuration.
Note: See TracChangeset for help on using the changeset viewer.