Skip to content

Commit 077f29f

Browse files
committed
improve SF dumpsys
1 parent fe00528 commit 077f29f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

services/surfaceflinger/LayerBase.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,16 +458,21 @@ void LayerBase::drawWithOpenGL(const Region& clip) const
458458
void LayerBase::dump(String8& result, char* buffer, size_t SIZE) const
459459
{
460460
const Layer::State& s(drawingState());
461+
462+
snprintf(buffer, SIZE,
463+
"+ %s %p (%s)\n",
464+
getTypeId(), this, getName().string());
465+
result.append(buffer);
466+
461467
s.transparentRegion.dump(result, "transparentRegion");
462468
transparentRegionScreen.dump(result, "transparentRegionScreen");
463469
visibleRegionScreen.dump(result, "visibleRegionScreen");
470+
464471
snprintf(buffer, SIZE,
465-
"+ %s %p (%s)\n"
466472
" "
467473
"z=%9d, pos=(%g,%g), size=(%4d,%4d), "
468474
"isOpaque=%1d, needsDithering=%1d, invalidate=%1d, "
469475
"alpha=0x%02x, flags=0x%08x, tr=[%.2f, %.2f][%.2f, %.2f]\n",
470-
getTypeId(), this, getName().string(),
471476
s.z, s.transform.tx(), s.transform.ty(), s.w, s.h,
472477
isOpaque(), needsDithering(), contentDirty,
473478
s.alpha, s.flags,

services/surfaceflinger/SurfaceFlinger.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,11 +1650,13 @@ void SurfaceFlinger::dumpAllLocked(
16501650
snprintf(buffer, SIZE,
16511651
" last eglSwapBuffers() time: %f us\n"
16521652
" last transaction time : %f us\n"
1653+
" transaction-flags : %08x\n"
16531654
" refresh-rate : %f fps\n"
16541655
" x-dpi : %f\n"
16551656
" y-dpi : %f\n",
16561657
mLastSwapBufferTime/1000.0,
16571658
mLastTransactionTime/1000.0,
1659+
mTransactionFlags,
16581660
hw.getRefreshRate(),
16591661
hw.getDpiX(),
16601662
hw.getDpiY());

0 commit comments

Comments
 (0)