[Webkit-unassigned] [Bug 27349] [WINCE] Add GraphicsContextWince implementation for WinCE.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 20 07:52:12 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27349





--- Comment #14 from Yong Li <yong.li at torchmobile.com>  2009-07-20 07:52:12 PDT ---
(In reply to comment #9)
> (In reply to comment #6)


> > > > +    PassRefPtr<SharedBitmap> getTransparentLayerBitmap(IntRect& origRect, bool uses16bit, RECT& bmpRect, bool checkClipBox, bool force)
> > > 
> > > It seems strange to use a mix of IntRect and RECT in this declaration. (applies
> > > elsewhere)
> > 
> > To avoid converting IntRect and RECT too frequently.
> 
> Have you noticed IntRect <-> RECT conversions showing up on performance
> profiles? It seems like it would be dwarfed by the actual painting calls. But I
> don't know the performance characteristics of your platform(s).
> 

IntRect contains x, y, width and height, where RECT contains top, left, right,
bottom. Obviously every conversion involves "+" or "-" operations.

> > > > +                    *dest++ = source[srcY * paddedSourceW + srcX] | 0xFF000000;
> > > > +                else
> > > > +                    *dest++ |= 0xFF;
> > > > +            }
> > > > +            dest += padding;
> > > > +        }
> > > > +    }
> > > > +}
> > > 
> > > It would be nice to have a little less duplication in this function.
> > 
> > Performance vs code size... that's a fight.
> 
> Would an inline function really affect performance?

Those 2 blocks are not exactly same. If I want to make them share one piece of
code, I have to introduce some Boolean variables and check them in every cycle
(for every pixel). This has nothing to do with inline.

> 
> > > > +        : m_data(data)
> > > > +        , m_origRect(origRect)
> > > > +        , m_oldOpacity(data->m_opacity)
> > > 
> > > It seems error-prone to leave m_key1 and m_key2 uninitialized here.
> > 
> > m_key1 and m_key2 will be set up by ->getDC(). In many cases, they are not used
> > at all. Performance consideration.
> 
> I saw that they get initialized in getDC. My concern was if someone were to add
> code to use these members elsewhere, and didn't realize they don't get
> initialized by the constructor. Have you seen evidence that initializing these
> members affects performance? It would surprise me if so, but again I don't know
> the details of your platform(s).
> 

They are supposed to be used only in special cases. I'll add some comments for
that.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list