diff options
author | Carl Zhang <carl.zhang@intel.com> | 2020-06-05 11:14:25 -0400 |
---|---|---|
committer | XinfengZhang <carl.zhang@intel.com> | 2020-06-17 13:40:07 +0800 |
commit | 0f837674355c27fec587555fafb3a1db05bbf646 (patch) | |
tree | d2d093d1f1e88661c96ba4cea7e5736a758d0a74 | |
parent | 7fde4631acae3ea053fd1eab17150deb1f556d0e (diff) | |
download | libva-0f837674355c27fec587555fafb3a1db05bbf646.tar.gz |
trace: divide va_TraceEndPicture to two seperate function
seperate the log and dump
Signed-off-by: Carl Zhang <carl.zhang@intel.com>
-rw-r--r-- | va/va.c | 7 | ||||
-rw-r--r-- | va/va_trace.c | 15 | ||||
-rw-r--r-- | va/va_trace.h | 7 |
3 files changed, 21 insertions, 8 deletions
@@ -1612,12 +1612,11 @@ VAStatus vaEndPicture ( ctx = CTX(dpy); VA_FOOL_FUNC(va_FoolCheckContinuity, dpy); - + VA_TRACE_ALL(va_TraceEndPicture, dpy, context, 0); va_status = ctx->vtable->vaEndPicture( ctx, context ); - - /* dump surface content */ - VA_TRACE_ALL(va_TraceEndPicture, dpy, context, 1); VA_TRACE_RET(dpy, va_status); + /* dump surface content */ + VA_TRACE_ALL(va_TraceEndPictureExt, dpy, context, 1); return va_status; } diff --git a/va/va_trace.c b/va/va_trace.c index 8010e6b..eb95728 100644 --- a/va/va_trace.c +++ b/va/va_trace.c @@ -5405,14 +5405,23 @@ void va_TraceEndPicture( int endpic_done ) { - int encode, decode, jpeg; DPY2TRACECTX(dpy, context, VA_INVALID_ID); TRACE_FUNCNAME(idx); va_TraceMsg(trace_ctx, "\tcontext = 0x%08x\n", context); va_TraceMsg(trace_ctx, "\trender_targets = 0x%08x\n", trace_ctx->trace_rendertarget); + va_TraceMsg(trace_ctx, NULL); +} +void va_TraceEndPictureExt( + VADisplay dpy, + VAContextID context, + int endpic_done +) +{ + int encode, decode, jpeg; + DPY2TRACECTX(dpy, context, VA_INVALID_ID); /* avoid to create so many empty files */ encode = (trace_ctx->trace_entrypoint == VAEntrypointEncSlice); decode = (trace_ctx->trace_entrypoint == VAEntrypointVLD); @@ -5428,9 +5437,7 @@ void va_TraceEndPicture( vaSyncSurface(dpy, trace_ctx->trace_rendertarget); va_TraceSurface(dpy, context); } - - va_TraceMsg(trace_ctx, NULL); -} + } void va_TraceSyncSurface( diff --git a/va/va_trace.h b/va/va_trace.h index 4c67472..3e919b2 100644 --- a/va/va_trace.h +++ b/va/va_trace.h @@ -200,6 +200,13 @@ void va_TraceEndPicture( ); DLL_HIDDEN +void va_TraceEndPictureExt( + VADisplay dpy, + VAContextID context, + int endpic_done +); + +DLL_HIDDEN void va_TraceSyncSurface( VADisplay dpy, VASurfaceID render_target |