Changeset 88797 in webkit
- Timestamp:
- Jun 14, 2011 6:54:29 AM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r88735 r88797 1 2011-06-14 Noam Rosenthal <noam.rosenthal@nokia.com> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Implement accelerated compositing on WK2 Qt port 6 https://bugs.webkit.org/show_bug.cgi?id=56935 7 8 Add a createImage() function to ShareableBitmap, for now ifdef'ed to Qt only. 9 This allows us to support directly composited images across the WebKit2 processes. 10 11 Together with Viatcheslav Ostapenko. 12 13 * Shared/ShareableBitmap.h: 14 * Shared/qt/ShareableBitmapQt.cpp: 15 (WebKit::ShareableBitmap::createQImage): 16 (WebKit::ShareableBitmap::createImage): 17 1 18 2011-06-13 Anders Carlsson <andersca@apple.com> 2 19 -
trunk/Source/WebKit2/Shared/ShareableBitmap.h
r87160 r88797 28 28 29 29 #include "SharedMemory.h" 30 #include <WebCore/Image.h> 30 31 #include <WebCore/IntRect.h> 31 32 #include <wtf/PassOwnPtr.h> … … 122 123 // This is only safe to use when we know that the contents of the shareable bitmap won't change. 123 124 QImage createQImage(); 125 PassRefPtr<WebCore::Image> createImage(); 124 126 #endif 125 127 -
trunk/Source/WebKit2/Shared/qt/ShareableBitmapQt.cpp
r87160 r88797 29 29 #include <QImage> 30 30 #include <QPainter> 31 #include <WebCore/BitmapImage.h> 31 32 #include <WebCore/GraphicsContext.h> 32 33 … … 37 38 QImage ShareableBitmap::createQImage() 38 39 { 39 return QImage(reinterpret_cast<uchar*>(data()), m_size.width(), m_size.height(), m_size.width() * 4, QImage::Format_RGB32); 40 return QImage(reinterpret_cast<uchar*>(data()), m_size.width(), m_size.height(), m_size.width() * 4, 41 m_flags & SupportsAlpha ? QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB32); 40 42 } 43 44 #if PLATFORM(QT) 45 PassRefPtr<Image> ShareableBitmap::createImage() 46 { 47 QPixmap* pixmap = new QPixmap(QPixmap::fromImage(createQImage())); 48 return BitmapImage::create(pixmap); 49 } 50 #endif 41 51 42 52 PassOwnPtr<GraphicsContext> ShareableBitmap::createGraphicsContext()
Note: See TracChangeset
for help on using the changeset viewer.