New issue
Advanced search Search tips

Issue 627058 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

Dinosaur game is not rendered correctly before game start

Project Member Reported by gambard@chromium.org, Jul 11 2016

Issue description

App Version: 51.0.2704.104
iOS Version: 9.0, 9.3.2
Device: iPad Air 1, iPhone6s
URL: any

Precondition: Turn on Airplane mode

Steps to reproduce:
  1. Launch Google Chrome
  2. Goto Google.com (or any url)
  3. The dinosaur and the horizon (ground) should be displayed.

Observed results: First frames rendering does not display correctly: you have to wait for the dinosaur to blink before having anything (only the dinosaur) displayed.

Expected results: The dinosaur and the ground should be displayed.


Number of times you were able to reproduce: 5/5
Bug reproducible after clean install: Yes
Bug reproducible after clearing cache and cookies: Yes
Bug reproducible on Chrome Mobile on Android: No
Bug reproducible on Safari/Firefox: Firefox: NA, Safari: NA
Bug reproducible on current stable build (App Version, iOS Version): M51 YES
Bug reproducible on the current beta channel build (App Version, iOS Version): M53 YES

 
The current workflow is the following:
- Add the canvas
- Draw the T.rex
- Draw the horizon (including ground)
- Start the requestAnimationFrame loop
- This loop only do: draw the dinosaur when it blinks (draw it eyes closed, draw it eyes opened the next frame, do nothing until next blink).

I think it is something like: as the canvas is added programmatically, maybe it is not rendered before the first drawing. The first drawing is lost and the drawing of the first iteration of the requestAnimationFrame loop is kept just because enough time have passed.
I think the problem is that the images sprite is not loaded when we try to render the game. It is loaded after a slight delay.
Cc: kkhorimoto@chromium.org
Status: Fixed (was: Assigned)

Sign in to add a comment