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

Issue 186733009: Avoid repeated command-line checks for forced DPI scale (Closed)

Created:
6 years, 9 months ago by jdduke (slow)
Modified:
6 years, 9 months ago
Reviewers:
oshima
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Avoid repeated command-line checks for forced DPI scale Every time |Screen.GetPrimaryDisplay()| is accessed on Android, which can be multiple times a frame, we're querying the command-line for kForceDeviceScaleFactor. Instead, cache the result of the query, saving ~8us (50% of the cost) per GetPrimaryDisplay() call on a typical Android device. BUG=341613 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255524

Patch Set 1 #

Patch Set 2 : Name tweak #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -1 line) Patch
M ui/gfx/display.cc View 1 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
jdduke (slow)
oshima@: PTAL. I was slightly surprised at how costly the command-line query was (for comparison, ...
6 years, 9 months ago (2014-03-06 21:04:07 UTC) #1
oshima
lgtm Are we checking this often? I assumed this is called only when some change ...
6 years, 9 months ago (2014-03-06 22:01:06 UTC) #2
jdduke (slow)
On 2014/03/06 22:01:06, oshima wrote: > lgtm > > Are we checking this often? I ...
6 years, 9 months ago (2014-03-06 22:02:33 UTC) #3
oshima
On 2014/03/06 22:02:33, jdduke wrote: > On 2014/03/06 22:01:06, oshima wrote: > > lgtm > ...
6 years, 9 months ago (2014-03-06 22:04:58 UTC) #4
jdduke (slow)
The CQ bit was checked by jdduke@chromium.org
6 years, 9 months ago (2014-03-06 22:26:33 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/186733009/20001
6 years, 9 months ago (2014-03-06 22:33:29 UTC) #6
commit-bot: I haz the power
6 years, 9 months ago (2014-03-07 04:23:47 UTC) #7
Message was sent while issue was closed.
Change committed as 255524

Powered by Google App Engine
This is Rietveld 408576698