Remove minLayer and maxLayer from screenshot code.

When taking a full display screenshot, there's no longer a need for min
and max layer. Instead, the entire display will be screenshotted. If
only some layers should be screenshotted, then use the captureLayers method
instead. This was already the case for real code, but required some
clean up in Transaction_test

Test: Transaction_test
Change-Id: I774357b284ca9e026097f79fb7146e4931fa629a
diff --git a/services/surfaceflinger/tests/unittests/CompositionTest.cpp b/services/surfaceflinger/tests/unittests/CompositionTest.cpp
index 5aa6e27..d52f0d8 100644
--- a/services/surfaceflinger/tests/unittests/CompositionTest.cpp
+++ b/services/surfaceflinger/tests/unittests/CompositionTest.cpp
@@ -185,8 +185,6 @@
     LayerCase::setupForScreenCapture(this);
 
     const Rect sourceCrop(0, 0, DEFAULT_DISPLAY_WIDTH, DEFAULT_DISPLAY_HEIGHT);
-    constexpr int32_t minLayerZ = -1;
-    constexpr int32_t maxLayerZ = 1000;
     constexpr bool useIdentityTransform = true;
     constexpr bool forSystem = true;
 
@@ -194,7 +192,7 @@
                                  DEFAULT_DISPLAY_HEIGHT, ui::Transform::ROT_0);
 
     auto traverseLayers = [this](const LayerVector::Visitor& visitor) {
-        return mFlinger.traverseLayersInDisplay(mDisplay, minLayerZ, maxLayerZ, visitor);
+        return mFlinger.traverseLayersInDisplay(mDisplay, visitor);
     };
 
     // TODO: Eliminate expensive/real allocation if possible.