Merge "EVS patches from AOSP" into pi-dev
am: 98563bff3e
Change-Id: Iafa0f550f34fdb4e436597f04e552ff53ae9fb57
diff --git a/evs/app/RenderDirectView.cpp b/evs/app/RenderDirectView.cpp
index 45dfa78..d7267cf 100644
--- a/evs/app/RenderDirectView.cpp
+++ b/evs/app/RenderDirectView.cpp
@@ -133,6 +133,9 @@
glDisableVertexAttribArray(1);
+ // Now that everything is submitted, release our hold on the texture resource
+ detachRenderTarget();
+
// Wait for the rendering to finish
glFinish();
detachRenderTarget();
diff --git a/evs/app/RenderTopView.cpp b/evs/app/RenderTopView.cpp
index 5bc943c..f09e76f 100644
--- a/evs/app/RenderTopView.cpp
+++ b/evs/app/RenderTopView.cpp
@@ -212,6 +212,9 @@
// Draw the car image
renderCarTopView();
+ // Now that everythign is submitted, release our hold on the texture resource
+ detachRenderTarget();
+
// Wait for the rendering to finish
glFinish();
detachRenderTarget();
diff --git a/evs/sampleDriver/GlWrapper.cpp b/evs/sampleDriver/GlWrapper.cpp
index 3055ba0..fbd36a2 100644
--- a/evs/sampleDriver/GlWrapper.cpp
+++ b/evs/sampleDriver/GlWrapper.cpp
@@ -308,6 +308,11 @@
return false;
}
+ // Turn off mip-mapping for the created texture surface
+ // (the inbound camera imagery doesn't have MIPs)
+ glBindTexture(GL_TEXTURE_2D, mTextureMap);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glBindTexture(GL_TEXTURE_2D, 0);
return true;
}
diff --git a/evs/sampleDriver/ServiceNames.h b/evs/sampleDriver/ServiceNames.h
index 1178da5..6458b1b 100644
--- a/evs/sampleDriver/ServiceNames.h
+++ b/evs/sampleDriver/ServiceNames.h
@@ -13,5 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#ifndef ANDROID_HARDWARE_AUTOMOTIVE_EVS_V1_0_SERVICENAMES_H
+#define ANDROID_HARDWARE_AUTOMOTIVE_EVS_V1_0_SERVICENAMES_H
const static char kEnumeratorServiceName[] = "EvsEnumeratorHw";
+
+#endif // ANDROID_HARDWARE_AUTOMOTIVE_EVS_V1_0_SERVICENAMES_H
diff --git a/evs/sampleDriver/VideoCapture.h b/evs/sampleDriver/VideoCapture.h
index f2d1175..63305b9 100644
--- a/evs/sampleDriver/VideoCapture.h
+++ b/evs/sampleDriver/VideoCapture.h
@@ -13,6 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#ifndef ANDROID_HARDWARE_AUTOMOTIVE_EVS_V1_0_VIDEOCAPTURE_H
+#define ANDROID_HARDWARE_AUTOMOTIVE_EVS_V1_0_VIDEOCAPTURE_H
+
#include <atomic>
#include <thread>
#include <functional>
@@ -73,3 +76,4 @@
};
};
+#endif // ANDROID_HARDWARE_AUTOMOTIVE_EVS_V1_0_VIDEOCAPTURE_