Skip to content

Commit

Permalink
sf: Add dirtyRect information to SF dumpsys
Browse files Browse the repository at this point in the history
Display dirtyRect information generated for each layer in
SurfaceFlinger Dumpsys.

Change-Id: Ie60f4bf67bc28af0fcce006c166d8ae4ed4985e8
  • Loading branch information
Jeykumar Sankaran authored and hyperb1iss committed Jul 14, 2014
1 parent f17754a commit 87ab443
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions services/surfaceflinger/DisplayHardware/HWComposer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1394,11 +1394,10 @@ void HWComposer::dump(String8& result) const {
result.appendFormat(
" numHwLayers=%u, flags=%08x\n",
disp.list->numHwLayers, disp.list->flags);

result.append(
" type | handle | hints | flags | tr | blend | format | source crop | frame name \n"
"------------+----------+----------+----------+----+-------+----------+---------------------------------+--------------------------------\n");
// " __________ | ________ | ________ | ________ | __ | _____ | ________ | [_____._,_____._,_____._,_____._] | [_____,_____,_____,_____]
" type | handle | hints | flags | tr | blend | format | source crop | frame | dirtyRect | name \n"
"------------+----------+----------+----------+----+-------+----------+-----------------------------------+---------------------------+---------------------------+-------\n");
// " __________ | ________ | ________ | ________ | __ | _____ | ________ | [_____._,_____._,_____._,_____._] | [_____,_____,_____,_____] | [_____,_____,_____,_____] |
for (size_t i=0 ; i<disp.list->numHwLayers ; i++) {
const hwc_layer_1_t&l = disp.list->hwLayers[i];
int32_t format = -1;
Expand Down Expand Up @@ -1432,19 +1431,29 @@ void HWComposer::dump(String8& result) const {

if (hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_3)) {
result.appendFormat(
" %10s | %08x | %08x | %08x | %02x | %05x | %08x | [%7.1f,%7.1f,%7.1f,%7.1f] | [%5d,%5d,%5d,%5d] %s\n",
" %10s | %08x | %08x | %08x | %02x | %05x | %08x | [%7.1f,%7.1f,%7.1f,%7.1f] | [%5d,%5d,%5d,%5d] | [%5d,%5d,%5d,%5d] | %s\n",
compositionTypeName[type],
intptr_t(l.handle), l.hints, l.flags, l.transform, l.blending, format,
l.sourceCropf.left, l.sourceCropf.top, l.sourceCropf.right, l.sourceCropf.bottom,
l.displayFrame.left, l.displayFrame.top, l.displayFrame.right, l.displayFrame.bottom,
#ifdef QCOM_BSP
l.dirtyRect.left, l.dirtyRect.top, l.dirtyRect.right, l.dirtyRect.bottom,
#else
0, 0, 0, 0,
#endif
name.string());
} else {
result.appendFormat(
" %10s | %08x | %08x | %08x | %02x | %05x | %08x | [%7d,%7d,%7d,%7d] | [%5d,%5d,%5d,%5d] %s\n",
" %10s | %08x | %08x | %08x | %02x | %05x | %08x | [%7d,%7d,%7d,%7d] | [%5d,%5d,%5d,%5d] | [%5d,%5d,%5d,%5d] | %s\n",
compositionTypeName[type],
intptr_t(l.handle), l.hints, l.flags, l.transform, l.blending, format,
l.sourceCrop.left, l.sourceCrop.top, l.sourceCrop.right, l.sourceCrop.bottom,
l.displayFrame.left, l.displayFrame.top, l.displayFrame.right, l.displayFrame.bottom,
#ifdef QCOM_BSP
l.dirtyRect.left, l.dirtyRect.top, l.dirtyRect.right, l.dirtyRect.bottom,
#else
0, 0, 0, 0,
#endif
name.string());
}
}
Expand Down

0 comments on commit 87ab443

Please sign in to comment.