Changeset 561 for trunk/src/gui/painting/qmemrotate.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/gui/painting/qmemrotate.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtGui module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 529 529 } 530 530 531 #define QT_IMPL_SIMPLE_MEMROTATE(srctype, desttype) \ 532 void qt_memrotate90(const srctype *src, int w, int h, int sstride, \ 533 desttype *dest, int dstride) \ 534 { \ 535 qt_memrotate90_tiled_unpacked<desttype,srctype>(src, w, h, sstride, dest, dstride); \ 536 } \ 537 void qt_memrotate180(const srctype *src, int w, int h, int sstride, \ 538 desttype *dest, int dstride) \ 539 { \ 540 qt_memrotate180_template(src, w, h, sstride, dest, dstride); \ 541 } \ 542 void qt_memrotate270(const srctype *src, int w, int h, int sstride, \ 543 desttype *dest, int dstride) \ 544 { \ 545 qt_memrotate270_tiled_unpacked<desttype,srctype>(src, w, h, sstride, dest, dstride); \ 546 } 547 548 549 550 531 551 QT_IMPL_MEMROTATE(quint32, quint32) 532 552 QT_IMPL_MEMROTATE(quint32, quint16) … … 538 558 QT_IMPL_MEMROTATE(quint32, quint8) 539 559 QT_IMPL_MEMROTATE(quint16, quint8) 560 QT_IMPL_MEMROTATE(qrgb444, quint8) 540 561 QT_IMPL_MEMROTATE(quint8, quint8) 562 563 #if defined(QT_QWS_ROTATE_BGR) 564 QT_IMPL_SIMPLE_MEMROTATE(quint16, qbgr565) 565 QT_IMPL_SIMPLE_MEMROTATE(quint32, qbgr565) 566 QT_IMPL_SIMPLE_MEMROTATE(qrgb555, qbgr555) 567 QT_IMPL_SIMPLE_MEMROTATE(quint32, qbgr555) 568 #endif 569 541 570 #ifdef QT_QWS_DEPTH_GENERIC 542 571 QT_IMPL_MEMROTATE(quint32, qrgb_generic16) … … 544 573 #endif 545 574 575 struct qrgb_gl_rgba 576 { 577 public: 578 inline qrgb_gl_rgba(quint32 v) { 579 if (QSysInfo::ByteOrder == QSysInfo::LittleEndian) 580 data = ((v << 16) & 0xff0000) | ((v >> 16) & 0xff) | (v & 0xff00ff00); 581 else 582 data = (v << 8) | ((v >> 24) & 0xff); 583 } 584 585 inline operator quint32() const { return data; } 586 587 private: 588 quint32 data; 589 } Q_PACKED; 590 591 void Q_GUI_EXPORT qt_memrotate90_gl(const quint32 *src, int srcWidth, int srcHeight, int srcStride, 592 quint32 *dest, int dstStride) 593 { 594 qt_memrotate90_template(src, srcWidth, srcHeight, srcStride, reinterpret_cast<qrgb_gl_rgba *>(dest), dstStride); 595 } 546 596 547 597 QT_END_NAMESPACE
Note:
See TracChangeset
for help on using the changeset viewer.