Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45f7c446 authored by Simon Wilson's avatar Simon Wilson Committed by Android (Google) Code Review
Browse files

Merge "Use ATRACE macros instead of Tracer statics"

parents 737f28f2 2d590964
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -425,11 +425,11 @@ bool FastMixer::threadLoop()
            //       but this code should be modified to handle both non-blocking and blocking sinks
            dumpState->mWriteSequence++;
#if defined(ATRACE_TAG) && (ATRACE_TAG != ATRACE_TAG_NEVER)
            Tracer::traceBegin(ATRACE_TAG, "write");
            ATRACE_BEGIN("write");
#endif
            ssize_t framesWritten = outputSink->write(mixBuffer, frameCount);
#if defined(ATRACE_TAG) && (ATRACE_TAG != ATRACE_TAG_NEVER)
            Tracer::traceEnd(ATRACE_TAG);
            ATRACE_END();
#endif
            dumpState->mWriteSequence++;
            if (framesWritten >= 0) {
+2 −2
Original line number Diff line number Diff line
@@ -1653,7 +1653,7 @@ void AudioFlinger::PlaybackThread::threadLoop_write()
#define mBitShift 2 // FIXME
        size_t count = mixBufferSize >> mBitShift;
#if defined(ATRACE_TAG) && (ATRACE_TAG != ATRACE_TAG_NEVER)
        Tracer::traceBegin(ATRACE_TAG, "write");
        ATRACE_BEGIN("write");
#endif
        // update the setpoint when AudioFlinger::mScreenState changes
        uint32_t screenState = AudioFlinger::mScreenState;
@@ -1667,7 +1667,7 @@ void AudioFlinger::PlaybackThread::threadLoop_write()
        }
        ssize_t framesWritten = mNormalSink->write(mMixBuffer, count);
#if defined(ATRACE_TAG) && (ATRACE_TAG != ATRACE_TAG_NEVER)
        Tracer::traceEnd(ATRACE_TAG);
        ATRACE_END();
#endif
        if (framesWritten > 0) {
            bytesWritten = framesWritten << mBitShift;