DescriptionCompositorOutputSurface should change thread priority on the target thread
On some platforms, e.g. Linux, it isn't permitted to change other
thread's priority. To avoid confusion, I'm removing the base/threading
interface that changes the other thread's priority.
CompositorOutputSurface is the last use case to change other threads'
priorities. So as a preparation to replace SetThreadPriority() with
SetCurrentThreadPriority(), I remove the case so that the next coming
patch can be trivial.
In this patch, I apply following changes.
- Modifies to change the thread priority on the target thread via PostTask.
I confirmed that it was called when a user started and stopped page
scrolling via touch. It does not happen frequently, and changing it on
the target thread does not affect performance.
- Stop g_prefer_smoothness_count counting. The logic looks wrong, and
UpdateSmoothnessTakesPriority() isn't called with balanced true and
false. When scrolling starts, it is called with true, and until the
scrolling stops, it is called periodically. Then, when the scrolling
stops, it is called with false finally. So, counting does not make
sense.
- Removes a wrong thread check in UpdateSmoothnessTakesPriority().
This could be useful, but I'd remove it for now because the check is
wrong. It just checked current thread is current thread.
BUG=468793
Committed: https://crrev.com/a281547280197998ca669bbd4a107fca1d6e1ed5
Cr-Commit-Position: refs/heads/master@{#336298}
Patch Set 1 #
Total comments: 4
Patch Set 2 : review #3 and git cl format #
Dependent Patchsets: Messages
Total messages: 10 (2 generated)
|