OSDN Git Service

Fix the cursor assignment with the layer size of 2
authorPallavi G <pallavi.g@intel.com>
Thu, 22 Jun 2017 10:21:28 +0000 (15:51 +0530)
committerPallavi G <pallavi.g@intel.com>
Fri, 23 Jun 2017 03:06:12 +0000 (08:36 +0530)
when the total no of input layers is 2 we end up assigning the cursor
to the overlay plane and fixed that corner case also to assign the
cursor layer to the cursor plane

Jira: IAHWC-74
Test: Tested on Android now no blank image behind the cursor in the fullscreen Video or Image

Signed-off-by: Pallavi G <pallavi.g@intel.com>
common/display/displayplanemanager.cpp

index 6cfd1a4..88b42f4 100644 (file)
@@ -145,7 +145,7 @@ std::tuple<bool, DisplayPlaneStateList> DisplayPlaneManager::ValidateLayers(
 
   // Retrieve cursor layer data.
   DisplayPlane *cursor_plane = NULL;
-  for (auto j = layer_end - 1; j != layer_begin; j--) {
+  for (auto j = layer_end - 1; j >= layer_begin; j--) {
     if (j->GetBuffer()->GetUsage() & kLayerCursor) {
       cursor_layer = &(*(j));
       // Handle Cursor layer.