Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Issue 1205783002: CompositorOutputSurface should change thread priority on the target thread (Closed)

Created:
5 years, 6 months ago by Takashi Toyoshima
Modified:
5 years, 5 months ago
Reviewers:
enne (OOO)
CC:
chromium-reviews, darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CompositorOutputSurface 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -43 lines) Patch
M content/renderer/gpu/compositor_output_surface.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M content/renderer/gpu/compositor_output_surface.cc View 1 3 chunks +21 lines, -42 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 10 (2 generated)
Takashi Toyoshima
enne, PTAL. Here are some additional notes for my changes. https://codereview.chromium.org/1205783002/diff/1/content/renderer/gpu/compositor_output_surface.cc File content/renderer/gpu/compositor_output_surface.cc (left): https://codereview.chromium.org/1205783002/diff/1/content/renderer/gpu/compositor_output_surface.cc#oldcode238 ...
5 years, 6 months ago (2015-06-24 02:24:00 UTC) #2
enne (OOO)
https://codereview.chromium.org/1205783002/diff/1/content/renderer/gpu/compositor_output_surface.h File content/renderer/gpu/compositor_output_surface.h (right): https://codereview.chromium.org/1205783002/diff/1/content/renderer/gpu/compositor_output_surface.h#newcode57 content/renderer/gpu/compositor_output_surface.h:57: #if defined(OS_ANDROID) Style bikeshed: I don't really like #ifdefs ...
5 years, 6 months ago (2015-06-24 18:21:58 UTC) #3
Takashi Toyoshima
Here is a background of this patch to understand the change description. SetThreadPriority() does not ...
5 years, 6 months ago (2015-06-25 00:37:16 UTC) #4
Takashi Toyoshima
I also updated the change description to understand why Android code path needs this fix. ...
5 years, 6 months ago (2015-06-25 00:55:52 UTC) #5
enne (OOO)
lgtm
5 years, 5 months ago (2015-06-25 17:06:28 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1205783002/20001
5 years, 5 months ago (2015-06-25 23:30:47 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 5 months ago (2015-06-26 00:02:20 UTC) #9
commit-bot: I haz the power
5 years, 5 months ago (2015-06-26 00:03:18 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/a281547280197998ca669bbd4a107fca1d6e1ed5
Cr-Commit-Position: refs/heads/master@{#336298}

Powered by Google App Engine
This is Rietveld 408576698