[Webkit-unassigned] [Bug 79867] [BlackBerry] Upstream GraphicsLayerBlackBerry.{h, cpp}

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 5 12:41:37 PST 2012


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


Rob Buis <rwlbuis at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #129652|review?                     |review-
               Flag|                            |




--- Comment #5 from Rob Buis <rwlbuis at gmail.com>  2012-03-05 12:41:37 PST ---
(From update of attachment 129652)
View in context: https://bugs.webkit.org/attachment.cgi?id=129652&action=review

Looks good, can be cleaned up some more.

> Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:54
> +#include "PlatformString.h"

Is PlatformString.h include really needed?

> Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:56
> +using namespace std;

Might not be needed if you use clampTo.

> Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:332
> +    float clampedOpacity = max(min(opacity, 1.0f), 0.0f);

better use clampTo from MathExtras.h to make clear what you are doing here.

> Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:356
> +        m_layer->setNeedsDisplayInRect(rect);

You could look at putting some the one/two liners in the header, but only if you do not need to add another include....

> Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:567
> +}

Above two functions look very similar, can we share code?

> Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:836
> +    m_contentsLayer->setPosition(FloatPoint(m_contentsRect.x(), m_contentsRect.y()));

better use m_contentsLayer->setPosition(m_contentsRect.location());

> Source/WebCore/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:853
> +        m_contentsLayer->setAnchorPoint(FloatPoint(0, 0));

FloatPoint::zero

-- 
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