Closed Bug 1215050 Opened 9 years ago Closed 9 years ago

[LayerScope] Get crash while connecting with layerscope when using HWC

Categories

(Core :: Graphics, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: jerry, Assigned: jerry)

Details

Attachments

(1 file)

If we only have few layer, b2g will try to use hwc for compositing. In this case, we got crash with layerscope tool.
The problem is that we don't handle the effectChain for TiledContentHost with single tile.
Fix the effect problem for "single tile" paintedLayer.
Attachment #8674217 - Flags: review?(matt.woodrow)
Attachment #8674217 - Flags: review?(cku)
Attachment #8674217 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8674217 [details] [diff] [review]
Make layerscope support TiledPaintedLayer when using HWC. v1

Review of attachment 8674217 [details] [diff] [review]:
-----------------------------------------------------------------

In LayerScope::DrawEnd, find a way to skip sending DebugGLDrawData, since you do not setup draw rect in this path.
if (gLayerScopeManager.CurrentSession().mLayerRects.Length() > 0) {
    DrawSession& draws = gLayerScopeManager.CurrentSession();
    gLayerScopeManager.GetSocketManager()->AppendDebugData(
        new DebugGLDrawData(draws.mOffsetX, draws.mOffsetY,
                            draws.mMVMatrix, draws.mRects,
                            draws.mLayerRects,
                            draws.mTextureRects,
                            draws.mTexIDs,
                            aEffectChain.mLayerRef));
}

And, please double confirm visual result on the draw view of layerscope viewer.
Attachment #8674217 - Flags: review?(cku) → review+
(In reply to C.J. Ku[:cjku] from comment #2)
> Comment on attachment 8674217 [details] [diff] [review]
> Make layerscope support TiledPaintedLayer when using HWC. v1
> 
> Review of attachment 8674217 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> In LayerScope::DrawEnd, find a way to skip sending DebugGLDrawData, since
> you do not setup draw rect in this path.
> if (gLayerScopeManager.CurrentSession().mLayerRects.Length() > 0) {
>     DrawSession& draws = gLayerScopeManager.CurrentSession();
>     gLayerScopeManager.GetSocketManager()->AppendDebugData(
>         new DebugGLDrawData(draws.mOffsetX, draws.mOffsetY,
>                             draws.mMVMatrix, draws.mRects,
>                             draws.mLayerRects,
>                             draws.mTextureRects,
>                             draws.mTexIDs,
>                             aEffectChain.mLayerRef));
> }
> 
> And, please double confirm visual result on the draw view of layerscope
> viewer.

Since it's hard to get the right texture rects, I just send the default DrawData. The draw view will not see this hwc layer data. We could handle this problem at another bug.
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/5d0670128cb8
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: