Changeset 106807 in webkit
- Timestamp:
- Feb 6, 2012 8:10:13 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106806 r106807 1 2012-02-06 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 [Texmap][Qt] Avoid an image copy when uploading textures in WebKit1 4 https://bugs.webkit.org/show_bug.cgi?id=77748 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Use QPixmap::buffer() API to get access to the QPixmap's pixels without implicit copies. 9 10 Instrumentation shows that the deep image copies created from TextureMapperGL are 11 eliminated. 12 13 * platform/graphics/opengl/TextureMapperGL.cpp: 14 (WebCore::BitmapTextureGL::updateContents): 15 1 16 2012-02-06 Allan Sandfeld Jensen <allan.jensen@nokia.com> 2 17 -
trunk/Source/WebCore/platform/graphics/opengl/TextureMapperGL.cpp
r106659 r106807 30 30 #include <wtf/PassRefPtr.h> 31 31 #include <wtf/RefCounted.h> 32 33 #if PLATFORM(QT) && QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) 34 #include <QPlatformPixmap> 35 #endif 32 36 33 37 #if PLATFORM(QT) … … 634 638 635 639 #if PLATFORM(QT) 636 QImage qtImage = frameImage->toImage(); 640 QImage qtImage; 641 642 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) 643 // With QPA, we can avoid a deep copy. 644 qtImage = *frameImage->handle()->buffer(); 645 #else 646 // This might be a deep copy, depending on other references to the pixmap. 647 qtImage = frameImage->toImage(); 648 #endif 649 637 650 if (IntSize(qtImage.size()) != sourceRect.size()) 638 651 qtImage = qtImage.copy(sourceRect);
Note: See TracChangeset
for help on using the changeset viewer.