<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>29438</bug_id>
          
          <creation_ts>2009-09-18 07:48:34 -0700</creation_ts>
          <short_desc>[Qt] NPAPI: HBITMAP to QPixmap conversion is slow</short_desc>
          <delta_ts>2014-01-28 20:30:06 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Plug-ins</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Performance, Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>35962</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Tor Arne Vestbø">vestbo</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andersca</cc>
    
    <cc>davidtlwong</cc>
    
    <cc>kenneth</cc>
    
    <cc>tonikitoo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>148144</commentid>
    <comment_count>0</comment_count>
    <who name="Tor Arne Vestbø">vestbo</who>
    <bug_when>2009-09-18 07:48:34 -0700</bug_when>
    <thetext>banner uses more CPU time than normal browser.

This bug report originated from issue QTBUG-4251
&lt;http://bugreports.qt.nokia.com/browse/QTBUG-4251&gt;

--- Description ---

Simple test application (source attached) shows webpage with flash 
banner. Unfortunately it uses much more CPU time than normal browser 
which shows same page (Internet Explorer, Mozilla Firefox, Safari).

We analysed application using DevPartner profiler and it shows that 
problem is with QT and WebKit integration.

Application spend lot of time in function QPixmap::fromWinHBITMAP() in 
GraphicsContext::releaseWindowsContext() 
(C:\Qt\4.5.2\src\3rdparty\webkit\WebCore\platform\graphics\GraphicsContext.cpp). 
We analysed releaseWindowsContext() function and think that translation 
from HDC to QPixmap is not optimal solution. Source code below:

GraphicsContext::releaseWindowsContext()
...
  HBITMAP bitmap = static_cast&lt;HBITMAP&gt;(GetCurrentObject(hdc, OBJ_BITMAP));
  BITMAP info;
  GetObject(bitmap, sizeof(info), &amp;info);
  ASSERT(info.bmBitsPixel == 32);

  QPixmap pixmap = QPixmap::fromWinHBITMAP(bitmap, supportAlphaBlend ? 
QPixmap::PremultipliedAlpha : QPixmap::NoAlpha);
  m_data-&gt;p()-&gt;drawPixmap(dstRect, pixmap);

We think that it will be better to draw HDC directly on the screen 
without translation to QPixmap.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>155472</commentid>
    <comment_count>1</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2009-10-18 08:33:46 -0700</bug_when>
    <thetext>This seems Windows related, I&apos;m changing platform to Windows from Mac OS X</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>182687</commentid>
    <comment_count>2</comment_count>
    <who name="David T. L. Wong">davidtlwong</who>
    <bug_when>2010-01-20 02:40:51 -0800</bug_when>
    <thetext>Is it similar problem of https://bugs.webkit.org/show_bug.cgi?id=24913#c1
?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>