Check count > 0 not != 0 in Resource acquisition.

On low-resolution Android Emulator AVDs run with -gpu
swiftshader_indirect, it's possible to run fast enough to see count ==
-1 on Resource acquisition. Check for that.

bug: 70950184

Test: API 27 Chrome is usable on a 480x800 or smaller device
Change-Id: I4f4cf9cd0ab1bc2bce846f0af6ffbbe243bc1a96
Reviewed-on: https://swiftshader-review.googlesource.com/15508
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Lingfeng Yang <lfy@google.com>
diff --git a/src/Common/Resource.cpp b/src/Common/Resource.cpp
index e16968a..0e71e05 100644
--- a/src/Common/Resource.cpp
+++ b/src/Common/Resource.cpp
@@ -38,7 +38,7 @@
 	{
 		criticalSection.lock();
 
-		while(count != 0 && accessor != claimer)
+		while(count > 0 && accessor != claimer)
 		{
 			blocked++;
 			criticalSection.unlock();
@@ -84,7 +84,7 @@
 		}
 
 		// Acquire
-		while(count != 0 && accessor != claimer)
+		while(count > 0 && accessor != claimer)
 		{
 			blocked++;
 			criticalSection.unlock();