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

Commit 0c113a57 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add ImageReader callback traces" into main

parents c5a67e9c 302fce3a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.ParcelFileDescriptor;
import android.os.Trace;
import android.view.Surface;

import dalvik.system.VMRuntime;
@@ -925,6 +926,7 @@ public class ImageReader implements AutoCloseable {
        if (ir == null) {
            return;
        }
        Trace.beginSection("android.media.ImageReader#postEventFromNative");

        final Executor executor;
        final OnImageAvailableListener listener;
@@ -948,6 +950,7 @@ public class ImageReader implements AutoCloseable {
                }
            });
        }
        Trace.endSection();
    }

    /**
+3 −0
Original line number Diff line number Diff line
@@ -16,11 +16,13 @@

//#define LOG_NDEBUG 0
#define LOG_TAG "ImageReader_JNI"
#define ATRACE_TAG ATRACE_TAG_CAMERA
#include "android_media_Utils.h"
#include <cutils/atomic.h>
#include <utils/Log.h>
#include <utils/misc.h>
#include <utils/List.h>
#include <utils/Trace.h>
#include <utils/String8.h>

#include <cstdio>
@@ -223,6 +225,7 @@ JNIImageReaderContext::~JNIImageReaderContext() {

void JNIImageReaderContext::onFrameAvailable(const BufferItem& /*item*/)
{
    ATRACE_CALL();
    ALOGV("%s: frame available", __FUNCTION__);
    bool needsDetach = false;
    JNIEnv* env = getJNIEnv(&needsDetach);