src/gui/painting/qwindowsurface_s60.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
     9 ** $QT_BEGIN_LICENSE:LGPL$
     9 ** $QT_BEGIN_LICENSE:LGPL$
    10 ** No Commercial Usage
    10 ** No Commercial Usage
    11 ** This file contains pre-release code and may not be distributed.
    11 ** This file contains pre-release code and may not be distributed.
    12 ** You may use this file in accordance with the terms and conditions
    12 ** You may use this file in accordance with the terms and conditions
    66         mode = EColor16MU; // Faster since 16MU -> 16MA is typically accelerated
    66         mode = EColor16MU; // Faster since 16MU -> 16MA is typically accelerated
    67     else if (mode == EColor16MU && !isOpaque)
    67     else if (mode == EColor16MU && !isOpaque)
    68         mode = EColor16MA; // Try for transparency anyway
    68         mode = EColor16MA; // Try for transparency anyway
    69 
    69 
    70     // We create empty CFbsBitmap here -> it will be resized in setGeometry
    70     // We create empty CFbsBitmap here -> it will be resized in setGeometry
    71 	CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap);	// CBase derived object needs check on new
    71     CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap);	// CBase derived object needs check on new
    72     qt_symbian_throwIfError( bitmap->Create( TSize(0, 0), mode ) );
    72     qt_symbian_throwIfError( bitmap->Create( TSize(0, 0), mode ) );
    73 	
    73 	
    74     QS60PixmapData *data = new QS60PixmapData(QPixmapData::PixmapType);
    74     QS60PixmapData *data = new QS60PixmapData(QPixmapData::PixmapType);
    75     data->fromSymbianBitmap(bitmap);
    75     if (data) {
    76     d_ptr->device = QPixmap(data);
    76         data->fromSymbianBitmap(bitmap, true);
       
    77         d_ptr->device = QPixmap(data);
       
    78     }
    77         
    79         
    78     setStaticContentsSupport(true);
    80     setStaticContentsSupport(true);
    79 }
    81 }
    80 QS60WindowSurface::~QS60WindowSurface()
    82 QS60WindowSurface::~QS60WindowSurface()
    81 {
    83 {