Android: Improve Composite-with-no-GPU-channel handling
commita0e92afeb69eb7cca3fddeb86aa1238d51d672b3
authorsievers <sievers@chromium.org>
Fri, 21 Nov 2014 22:12:50 +0000 (21 14:12 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 21 Nov 2014 22:13:12 +0000 (21 22:13 +0000)
tree6eb3453ad937e17a721dc521d89c44d30e6ee837
parent83e8202df486b6064bcfcc45c7083c70a490a635
Android: Improve Composite-with-no-GPU-channel handling

The current code simply bails out of Composite() when the channel
is not established yet (or lost).
This seems to work in practice, but following the code it looks like
we would
- generally still think that the Composite task is pending
- in OnVSync think that we missed the window and post again
- further attempts to schedule, including when the channel eventually
  gets established, will think it's already pending and going to happen
  without the need to post a task
- but it will really only happen if OnVSync gets called again
  (somebody happened to request vsync) and we think we missed the frame
  and schedule again.

Improve this by
- tracking when we deferred Composite because we are waiting
  for the channel
- bail out of PostComposite if we are in this condition
- when established unset and post Composite

Review URL: https://codereview.chromium.org/750643003

Cr-Commit-Position: refs/heads/master@{#305298}
content/browser/renderer_host/compositor_impl_android.cc
content/browser/renderer_host/compositor_impl_android.h