[system] screen rotation with 180 degree will delay

RESOLVED FIXED in 1.1 QE3 (26jun)

Status

defect
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: ghtobz, Assigned: pchang)

Tracking

unspecified
1.1 QE3 (26jun)
Dependency tree / graph

Firefox Tracking Flags

(blocking-b2g:leo+, blocking-basecamp:-, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix, b2g-v1.1hd fixed)

Details

(Whiteboard: [label:system])

Attachments

(2 attachments, 2 obsolete attachments)

Reporter

Description

7 years ago
[GitHub issue by johnshih on 2012-09-25T02:43:36Z, https://github.com/mozilla-b2g/gaia/issues/5118]
## Environment :
Otoro phone, build 2012-09-24
Build info: 
* "gaia" revision= 028b9eb35bc0fbbf2d31a0b766319b94997c8eb1
* "gecko" revision= 7de377e67a367f389b44fd3c0d1d6fd3f08f71f0

## Repro :
1. Launch the app that can rotate the screen (e.g. browser app)
2. turn the phone up-side-down (rotate 180 degree directly)

## Expected:
* The screen will rotate 180 degree

## Actual:
* It will delay for a while

## Note:
* If you touch the screen during the delay, it will rotate immediately
* And there is no problem with rotate 90 degree
Reporter

Comment 1

7 years ago
[GitHub comment by autonome on 2012-09-28T05:39:06Z]
Yep, ~7 seconds. And yep, if you touch the screen it *immediately* rotates 180. Good find John :)

I'm not going to hold the release since the use-case is not really strong and there's a workaround.
Assignee

Updated

7 years ago
Assignee: nobody → pchang
Assignee

Comment 2

7 years ago
Found OnDraw event trigger more times under normal condtion.

[Normal]
nsScreenGonk setRotation 3
BasicShadowLayerManager::BeginTransactionWithTarget 0x44636320 mTargetRotation 0
nsPressShell::Paint aFlags 0x00000081
BasicShadowLayerManager::BeginTransactionWithTarget 0x43aaf660 mTargetRotation 3
nsPressShell::Paint aFlags 0x00000081
BasicShadowLayerManager::BeginTransactionWithTarget 0x43aaf660 mTargetRotation 3
nsPressShell::Paint aFlags 0x00000081
nsPressShell::Paint call updatePaintCountForPaintedPresShells aFlags 0x00000081

[Abnormal]
nsScreenGonk setRotation 3
BasicShadowLayerManager::BeginTransactionWithTarget 0x43aaf660 mTargetRotation 3
nsPressShell::Paint aFlags 0x00000081
nsPressShell::Paint call updatePaintCountForPaintedPresShells aFlags 0x00000081

Checking the difference between above sequences.
Assignee

Updated

7 years ago
Attachment #678246 - Flags: review? → review?(roc)
Assignee

Comment 4

7 years ago
[Root cause]
In above repo steps, the rotation of 180 degree may not cause any new painting events happened but only rotation event happened. In current shadowlayer flow, it will skip screen update if no new painting events.

[Solution]
Added rotation event detection before screen update skip
Comment on attachment 678246 [details] [diff] [review]
patch to fix screen not update when rotate 180 very quickly

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

great!

::: gfx/layers/ipc/ShadowLayers.cpp
@@ +46,5 @@
>    {
>      mOpen = true;
>      mTargetBounds = aTargetBounds;
> +    if (aRotation != mTargetRotation)
> +        mRotationChanged = true;

{}
Attachment #678246 - Flags: review?(roc) → review+
Assignee

Comment 6

7 years ago
version 2 -- add {} in line 49
Assignee

Updated

7 years ago
Attachment #678656 - Attachment description: patch to fix screen not update when rotate 180 very quickly → patch to fix screen not update when rotate 180 very quickly-v2
Assignee

Updated

7 years ago
Attachment #678246 - Attachment is obsolete: true
Assignee

Updated

7 years ago
blocking-basecamp: - → ?
Not bloking for shipping
blocking-basecamp: ? → -
Component: Gaia → Gaia::System
Assignee

Comment 8

7 years ago
Attachment #678656 - Attachment is obsolete: true
Attachment #689536 - Flags: review+
Assignee

Updated

7 years ago
Attachment #689536 - Flags: review+
Assignee

Comment 10

7 years ago
checkin-needed
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/78a9c289f6f1
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED

Updated

6 years ago
Depends on: 843940
Fix has been ready for a while - the bug looks ugly when the rotation time is inconsistent or changes instantly on touch. Noming for leo+.
blocking-b2g: --- → leo?

Updated

6 years ago
Duplicate of this bug: 791193
Triage - leo+ per partner agreement
blocking-b2g: leo? → leo+
Modification for test only.
I also append a property setting "debug.nsWindow.paint" in full_xxx.mk for run-timely verifying the change.
Hi Roc,

I think part of patches in Bug 826817 need to be committed in B2G.

Bug 826817 - Make all platforms always fire WillPaintWindow/DidPaintWindow

I've locally had a experiment. The performance is still poor on B2G unless WillPanitWindow/PanitWindow/DidPanitWindow call flow is applied to nsWindow::DoDraw.

Please check the "git diff" in attachment.
That's the right idea. But you should re-get 'listener' after each call --- otherwise there's no point in checking it in separate if statements.

Updated

6 years ago
blocking-b2g: leo+ → hd?
Leo+ supersedes HD+, this is already landed on hd+

(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #17)
> https://hg.mozilla.org/releases/mozilla-b2g18_v1_1_0_hd/rev/8fee987844f9
blocking-b2g: hd? → leo+

Updated

6 years ago
Blocks: 902821
No longer blocks: 902821
Depends on: 902821
Duplicate of this bug: 901417
You need to log in before you can comment on or make changes to this bug.