am cb55857b
: fix dumpsys Layer name when using multiple displays
* commit 'cb55857bbde34a06c19dde3db5064d1717a0173e': fix dumpsys Layer name when using multiple displays
This commit is contained in:
commit
1a003e4aec
@ -901,14 +901,16 @@ HWComposer::LayerListIterator HWComposer::end(int32_t id) {
|
|||||||
return getLayerIterator(id, numLayers);
|
return getLayerIterator(id, numLayers);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HWComposer::dump(String8& result, char* buffer, size_t SIZE,
|
void HWComposer::dump(String8& result, char* buffer, size_t SIZE) const {
|
||||||
const Vector< sp<LayerBase> >& visibleLayersSortedByZ) const {
|
|
||||||
if (mHwc) {
|
if (mHwc) {
|
||||||
result.appendFormat("Hardware Composer state (version %8x):\n", hwcApiVersion(mHwc));
|
result.appendFormat("Hardware Composer state (version %8x):\n", hwcApiVersion(mHwc));
|
||||||
result.appendFormat(" mDebugForceFakeVSync=%d\n", mDebugForceFakeVSync);
|
result.appendFormat(" mDebugForceFakeVSync=%d\n", mDebugForceFakeVSync);
|
||||||
for (size_t i=0 ; i<mNumDisplays ; i++) {
|
for (size_t i=0 ; i<mNumDisplays ; i++) {
|
||||||
const DisplayData& disp(mDisplayData[i]);
|
const DisplayData& disp(mDisplayData[i]);
|
||||||
|
|
||||||
|
const Vector< sp<LayerBase> >& visibleLayersSortedByZ =
|
||||||
|
mFlinger->getLayerSortedByZForHwcDisplay(i);
|
||||||
|
|
||||||
if (disp.connected) {
|
if (disp.connected) {
|
||||||
result.appendFormat(
|
result.appendFormat(
|
||||||
" Display[%d] : %ux%u, xdpi=%f, ydpi=%f, refresh=%lld\n",
|
" Display[%d] : %ux%u, xdpi=%f, ydpi=%f, refresh=%lld\n",
|
||||||
@ -928,6 +930,7 @@ void HWComposer::dump(String8& result, char* buffer, size_t SIZE,
|
|||||||
const hwc_layer_1_t&l = disp.list->hwLayers[i];
|
const hwc_layer_1_t&l = disp.list->hwLayers[i];
|
||||||
int32_t format = -1;
|
int32_t format = -1;
|
||||||
String8 name("unknown");
|
String8 name("unknown");
|
||||||
|
|
||||||
if (i < visibleLayersSortedByZ.size()) {
|
if (i < visibleLayersSortedByZ.size()) {
|
||||||
const sp<LayerBase>& layer(visibleLayersSortedByZ[i]);
|
const sp<LayerBase>& layer(visibleLayersSortedByZ[i]);
|
||||||
if (layer->getLayer() != NULL) {
|
if (layer->getLayer() != NULL) {
|
||||||
|
@ -258,8 +258,7 @@ public:
|
|||||||
friend class VSyncThread;
|
friend class VSyncThread;
|
||||||
|
|
||||||
// for debugging ----------------------------------------------------------
|
// for debugging ----------------------------------------------------------
|
||||||
void dump(String8& out, char* scratch, size_t SIZE,
|
void dump(String8& out, char* scratch, size_t SIZE) const;
|
||||||
const Vector< sp<LayerBase> >& visibleLayersSortedByZ) const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void loadHwcModule();
|
void loadHwcModule();
|
||||||
|
@ -2333,7 +2333,7 @@ void SurfaceFlinger::dumpAllLocked(
|
|||||||
hwc.initCheck()==NO_ERROR ? "present" : "not present",
|
hwc.initCheck()==NO_ERROR ? "present" : "not present",
|
||||||
(mDebugDisableHWC || mDebugRegion) ? "disabled" : "enabled");
|
(mDebugDisableHWC || mDebugRegion) ? "disabled" : "enabled");
|
||||||
result.append(buffer);
|
result.append(buffer);
|
||||||
hwc.dump(result, buffer, SIZE, hw->getVisibleLayersSortedByZ());
|
hwc.dump(result, buffer, SIZE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Dump gralloc state
|
* Dump gralloc state
|
||||||
@ -2342,6 +2342,11 @@ void SurfaceFlinger::dumpAllLocked(
|
|||||||
alloc.dump(result);
|
alloc.dump(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Vector< sp<LayerBase> >&
|
||||||
|
SurfaceFlinger::getLayerSortedByZForHwcDisplay(int disp) {
|
||||||
|
return getDisplayDevice( getBuiltInDisplay(disp) )->getVisibleLayersSortedByZ();
|
||||||
|
}
|
||||||
|
|
||||||
bool SurfaceFlinger::startDdmConnection()
|
bool SurfaceFlinger::startDdmConnection()
|
||||||
{
|
{
|
||||||
void* libddmconnection_dso =
|
void* libddmconnection_dso =
|
||||||
|
@ -130,6 +130,10 @@ public:
|
|||||||
// TODO: this should be made accessible only to MessageQueue
|
// TODO: this should be made accessible only to MessageQueue
|
||||||
void onMessageReceived(int32_t what);
|
void onMessageReceived(int32_t what);
|
||||||
|
|
||||||
|
// for debugging only
|
||||||
|
// TODO: this should be made accessible only to HWComposer
|
||||||
|
const Vector< sp<LayerBase> >& getLayerSortedByZForHwcDisplay(int disp);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class Client;
|
friend class Client;
|
||||||
friend class DisplayEventConnection;
|
friend class DisplayEventConnection;
|
||||||
|
Loading…
Reference in New Issue
Block a user