diff options
author | 2017-12-06 15:05:26 -0500 | |
---|---|---|
committer | 2017-12-06 21:25:29 +0000 | |
commit | bbfe51547439fd02265c9775115001033f9312c1 (patch) | |
tree | a12b8de211c48e5a8ccd03774f9bafce063a9c75 /tools/ThermalManager.h | |
parent | 7f4dd6cc079f9a7389a3d962e4588a6e9383cfdd (diff) |
remove ThermalManager
It throttles 1000x more than intended, and I suspect that some of the
trip points it uses to decide when to throttle make no sense. We've
already turned it off on the Nexus 5x.
Change-Id: Idf556a83fe61ccc5f63c7bede3eecbe80087e28b
Reviewed-on: https://skia-review.googlesource.com/81303
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tools/ThermalManager.h')
-rw-r--r-- | tools/ThermalManager.h | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/tools/ThermalManager.h b/tools/ThermalManager.h deleted file mode 100644 index 747cf52691..0000000000 --- a/tools/ThermalManager.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2016 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef ThermalManager_DEFINED -#define ThermalManager_DEFINED - -#include "../private/SkTArray.h" -#include "SkString.h" - -#if defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_UNIX) -# define THERMAL_MANAGER_SUPPORTED -#endif - -#ifdef THERMAL_MANAGER_SUPPORTED - -/* - * This simple class monitors the thermal part of sysfs to ensure we don't trigger thermal events - */ - -class ThermalManager { -public: - ThermalManager(int32_t threshold, uint32_t sleepIntervalMs, uint32_t timeoutMs); - - bool coolOffIfNecessary(); - -private: - static int32_t OpenFileAndReadInt32(const char* path); - - // current temperature can be read from /thermalZonePath/temp - static int32_t GetTemp(SkString thermalZonePath) { - SkString temperatureFilePath(thermalZonePath); - temperatureFilePath.appendf("/temp"); - return OpenFileAndReadInt32(temperatureFilePath.c_str()); - } - - struct TripPoint { - TripPoint(SkString thermalZoneRoot, SkString pointName, int32_t threshold); - - bool willTrip(); - - SkString fThermalZoneRoot; - SkString fPointName; - int32_t fBase; - int32_t fPoint; - int32_t fThreshold; - - // Certain trip points seem to start tripped. For example, I have seen trip points of 0 or - // negative numbers. - bool fDisabled; - }; - - SkTArray<TripPoint> fTripPoints; - uint32_t fSleepIntervalMs; - uint32_t fTimeoutMs; -}; -#endif -#endif |