summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/DisplayDevice.cpp
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2024-06-27 23:38:43 +0000
committer Vishnu Nair <vishnun@google.com> 2024-06-28 19:20:08 +0000
commitbe0ad90f195063f8a846b15cb435d71544e5db1f (patch)
tree31427d8262ad439780e1e9ca18d9c4c1a7c919e7 /services/surfaceflinger/DisplayDevice.cpp
parent20f86107d6bab7cc810700550b779bf5734b332f (diff)
Create a wrapper for atrace macros
Create a SF specific macro to call into atrace. This will make the switch to perfetto for capturing atrace tags easier. Flag: EXEMPT refactor Bug: 349905670 Test: perfetto Change-Id: I4d046d837f52ef78b08e3c97556f2eddb06232dd
Diffstat (limited to 'services/surfaceflinger/DisplayDevice.cpp')
-rw-r--r--services/surfaceflinger/DisplayDevice.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index 27ea4a9865..8288b99864 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -24,6 +24,7 @@
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
+#include <common/trace.h>
#include <compositionengine/CompositionEngine.h>
#include <compositionengine/Display.h>
#include <compositionengine/DisplayColorProfile.h>
@@ -398,7 +399,7 @@ void DisplayDevice::enableHdrSdrRatioOverlay(bool enable) {
}
void DisplayDevice::updateHdrSdrRatioOverlayRatio(float currentHdrSdrRatio) {
- ATRACE_CALL();
+ SFTRACE_CALL();
mHdrSdrRatio = currentHdrSdrRatio;
if (mHdrSdrRatioOverlay) {
mHdrSdrRatioOverlay->changeHdrSdrRatio(currentHdrSdrRatio);
@@ -440,7 +441,7 @@ void DisplayDevice::enableRefreshRateOverlay(bool enable, bool setByHwc, Fps ref
}
void DisplayDevice::updateRefreshRateOverlayRate(Fps refreshRate, Fps renderFps, bool setByHwc) {
- ATRACE_CALL();
+ SFTRACE_CALL();
if (mRefreshRateOverlay) {
if (!mRefreshRateOverlay->isSetByHwc() || setByHwc) {
if (mRefreshRateSelector->isVrrDevice() && !mRefreshRateOverlay->isSetByHwc()) {