• Jia's avatar
    [On-device adaptive brightness] Consolidate sequence task runners. · 5f08ba57
    Jia authored
    All jobs will run on the main UI thread except the blocking ones that will run
    on a blocking task runner (created by the relevant object).
    
    The following tasks will run on a blocking task runner:
    
    1. AlsReaderImpl
    (i). Running cmd to
    - Check if Als is enabled.
    - Get Als config.
    - Get path to Als file from which we'll read Als values.
    (ii). Reading Als values.
    
    2. ModellerImpl
    (i). Load curve from disk and save curve to disk.
    (ii). Call trainer to
    - Set its initial curves.
    - Train a model.
    Hence trainer needs to be associated with the blocking
    task runner via base::OnTaskRunnerDeleter.
    
    Bug: 881215
    Change-Id: Iecb5805304c5aa6e0a1b194e136b81ed97534d7b
    Reviewed-on: https://chromium-review.googlesource.com/c/1321655Reviewed-by: default avatarAndrew Moylan <amoylan@chromium.org>
    Commit-Queue: Jia Meng <jiameng@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#606743}
    5f08ba57
adapter.cc 11.5 KB