return getLayerIterator(id, numLayers);
}
-void HWComposer::dump(String8& result, char* buffer, size_t SIZE,
- const Vector< sp<LayerBase> >& visibleLayersSortedByZ) const {
+void HWComposer::dump(String8& result, char* buffer, size_t SIZE) const {
if (mHwc) {
result.appendFormat("Hardware Composer state (version %8x):\n", hwcApiVersion(mHwc));
result.appendFormat(" mDebugForceFakeVSync=%d\n", mDebugForceFakeVSync);
for (size_t i=0 ; i<mNumDisplays ; i++) {
const DisplayData& disp(mDisplayData[i]);
+ const Vector< sp<LayerBase> >& visibleLayersSortedByZ =
+ mFlinger->getLayerSortedByZForHwcDisplay(i);
+
if (disp.connected) {
result.appendFormat(
" Display[%d] : %ux%u, xdpi=%f, ydpi=%f, refresh=%lld\n",
const hwc_layer_1_t&l = disp.list->hwLayers[i];
int32_t format = -1;
String8 name("unknown");
+
if (i < visibleLayersSortedByZ.size()) {
const sp<LayerBase>& layer(visibleLayersSortedByZ[i]);
if (layer->getLayer() != NULL) {
friend class VSyncThread;
// for debugging ----------------------------------------------------------
- void dump(String8& out, char* scratch, size_t SIZE,
- const Vector< sp<LayerBase> >& visibleLayersSortedByZ) const;
+ void dump(String8& out, char* scratch, size_t SIZE) const;
private:
void loadHwcModule();
hwc.initCheck()==NO_ERROR ? "present" : "not present",
(mDebugDisableHWC || mDebugRegion) ? "disabled" : "enabled");
result.append(buffer);
- hwc.dump(result, buffer, SIZE, hw->getVisibleLayersSortedByZ());
+ hwc.dump(result, buffer, SIZE);
/*
* Dump gralloc state
alloc.dump(result);
}
+const Vector< sp<LayerBase> >&
+SurfaceFlinger::getLayerSortedByZForHwcDisplay(int disp) {
+ return getDisplayDevice( getBuiltInDisplay(disp) )->getVisibleLayersSortedByZ();
+}
+
bool SurfaceFlinger::startDdmConnection()
{
void* libddmconnection_dso =
// TODO: this should be made accessible only to MessageQueue
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:
friend class Client;
friend class DisplayEventConnection;