Force PreviewView to use TextureView if extension effect is enabled and there is CaptureProcessor set for Preview

In ProcessingSurface, the pixel format of the output surface is hard-coded as PixelFormat.RGBA_8888. Therefore, ImplementationMode.COMPATIBLE mode should be used to provide a TextureView surface when extension effect is enabled and there is CaptureProcessor set for Preview.

Relnote:"Forced PreviewView to use TextureView if extension effect is enabled and the vendor library implementation needs to do a special process on the output surface."

Bug: 165188770
Test: ./gradlew bOS
Change-Id: I0c3cc867847ec0f350119a8d05ace41c631d04de
diff --git a/camera/camera-testing/build.gradle b/camera/camera-testing/build.gradle
index 3a1620a..b9f6fbc 100644
--- a/camera/camera-testing/build.gradle
+++ b/camera/camera-testing/build.gradle
@@ -48,10 +48,28 @@
 android {
     defaultConfig {
         minSdkVersion 21
+
+        externalNativeBuild {
+            cmake {
+                cppFlags "-std=c++17"
+                arguments "-DCMAKE_VERBOSE_MAKEFILE=ON"
+            }
+        }
     }
 
     // Use Robolectric 4.+
     testOptions.unitTests.includeAndroidResources = true
+
+    externalNativeBuild {
+        cmake {
+            // AGP doesn't allow us to use project.buildDir (or subdirs) for CMake's generated
+            // build files (ninja build files, CMakeCache.txt, etc.). Use a staging directory that
+            // lives alongside the project's buildDir.
+            buildStagingDirectory "${project.buildDir}/../nativeBuildStaging"
+            path "src/main/cpp/CMakeLists.txt"
+            version "3.10.2"
+        }
+    }
 }
 
 androidx {