Bug 79871

Summary: [BlackBerry] Upstream LayerWebKitThread and its derived classes
Product: WebKit Reporter: Robin Cao <robin.webkit>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: arvid2.nilsson, charles.wei, leo.yang, rwlbuis, tonikitoo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Other   
Bug Depends on:    
Bug Blocks: 73119    
Attachments:
Description Flags
patch
none
patch v2 none

Description Robin Cao 2012-02-28 22:17:52 PST
LayerWebKitThread is the BlackBerry implementation of PlatformLayer.
Comment 1 Robin Cao 2012-02-29 02:14:29 PST
Created attachment 129422 [details]
patch
Comment 2 Rob Buis 2012-02-29 10:46:47 PST
Comment on attachment 129422 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=129422&action=review

Looks good, still some things to improve.

> Source/WebCore/platform/graphics/blackberry/LayerData.h:156
> +    bool includeVisibility()

Could be made const.

> Source/WebCore/platform/graphics/blackberry/LayerData.h:192
> +    LayerProgramShader m_layerProgramShader;

Could move this one so all the bools can become a bitfield, saving some mem. Not sure how often LayerData is created though.

> Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.cpp:426
> +    return m_superlayer;

Why not inline this one?

> Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.h:47
> +#include <wtf/text/StringHash.h>

Are all of these included needed?

> Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.h:156
> +    bool isDrawable() { return m_isDrawable; }

const

> Source/WebCore/platform/graphics/blackberry/PluginLayerWebKitThread.cpp:79
> +    m_pluginView->updateBuffer(IntRect(IntPoint(0, 0), m_pluginView->size()));

IntPoint::zero

> Source/WebCore/platform/graphics/blackberry/VideoLayerWebKitThread.cpp:58
> +        // clear hole punch rect

Not a sentence.

> Source/WebCore/platform/graphics/blackberry/VideoLayerWebKitThread.cpp:90
> +    setHolePunchRect(IntRect(0, 0, m_bounds.width(), m_bounds.height()));

Probably more efficient to do IntRect(IntPoint::zero(), m_bounds);

> Source/WebCore/platform/graphics/blackberry/VideoLayerWebKitThread.cpp:94
> +    if (frameView)

Can be combined.
Comment 3 Robin Cao 2012-02-29 23:14:27 PST
(In reply to comment #2)
> (From update of attachment 129422 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=129422&action=review
> 
> Looks good, still some things to improve.
> 
> > Source/WebCore/platform/graphics/blackberry/LayerData.h:156
> > +    bool includeVisibility()
> 
> Could be made const.
> 
> > Source/WebCore/platform/graphics/blackberry/LayerData.h:192
> > +    LayerProgramShader m_layerProgramShader;
> 
> Could move this one so all the bools can become a bitfield, saving some mem. Not sure how often LayerData is created though.
> 
> > Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.cpp:426
> > +    return m_superlayer;
> 
> Why not inline this one?
> 
> > Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.h:47
> > +#include <wtf/text/StringHash.h>
> 
> Are all of these included needed?
> 
> > Source/WebCore/platform/graphics/blackberry/LayerWebKitThread.h:156
> > +    bool isDrawable() { return m_isDrawable; }
> 
> const
> 
> > Source/WebCore/platform/graphics/blackberry/PluginLayerWebKitThread.cpp:79
> > +    m_pluginView->updateBuffer(IntRect(IntPoint(0, 0), m_pluginView->size()));
> 
> IntPoint::zero
> 
> > Source/WebCore/platform/graphics/blackberry/VideoLayerWebKitThread.cpp:58
> > +        // clear hole punch rect
> 
> Not a sentence.
> 
> > Source/WebCore/platform/graphics/blackberry/VideoLayerWebKitThread.cpp:90
> > +    setHolePunchRect(IntRect(0, 0, m_bounds.width(), m_bounds.height()));
> 
> Probably more efficient to do IntRect(IntPoint::zero(), m_bounds);
> 
> > Source/WebCore/platform/graphics/blackberry/VideoLayerWebKitThread.cpp:94
> > +    if (frameView)
> 
> Can be combined.

Thanks for the review, I'll address all your comments above in a revised patch.
Comment 4 Robin Cao 2012-02-29 23:25:47 PST
Created attachment 129638 [details]
patch v2
Comment 5 WebKit Review Bot 2012-03-03 19:05:16 PST
Comment on attachment 129638 [details]
patch v2

Clearing flags on attachment: 129638

Committed r109668: <http://trac.webkit.org/changeset/109668>
Comment 6 WebKit Review Bot 2012-03-03 19:05:21 PST
All reviewed patches have been landed.  Closing bug.