Bug 1288616 - Part 1. Remove unused AcquireNativeWindowFromSurfaceTexture / ReleaseNativeWindowForSurfaceTexture. r=snorp
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 22 Jul 2016 14:39:09 +0900
changeset 306464 448de0cf041ee444c483277bd60d710258809bdc
parent 306463 07322a610cf811ce8b9a6b76f8b731af1f30d9d7
child 306465 93d4bd8a4ad33d4202c8705e1a4e4fe716843614
push id20102
push usercbook@mozilla.com
push dateMon, 25 Jul 2016 14:17:39 +0000
treeherderfx-team@66498480fe65 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1288616
milestone50.0a1
Bug 1288616 - Part 1. Remove unused AcquireNativeWindowFromSurfaceTexture / ReleaseNativeWindowForSurfaceTexture. r=snorp MozReview-Commit-ID: 15SfycJX9Wn
widget/android/AndroidBridge.cpp
widget/android/AndroidBridge.h
--- a/widget/android/AndroidBridge.cpp
+++ b/widget/android/AndroidBridge.cpp
@@ -1293,41 +1293,16 @@ AndroidBridge::GetNativeWindowSize(void*
 {
   if (!window || !ANativeWindow_getWidth || !ANativeWindow_getHeight) {
     return IntSize(0, 0);
   }
 
   return IntSize(ANativeWindow_getWidth(window), ANativeWindow_getHeight(window));
 }
 
-void*
-AndroidBridge::AcquireNativeWindowFromSurfaceTexture(JNIEnv* aEnv, jobject aSurfaceTexture)
-{
-    OpenGraphicsLibraries();
-
-    if (mHasNativeWindowAccess && ANativeWindow_fromSurfaceTexture)
-        return ANativeWindow_fromSurfaceTexture(aEnv, aSurfaceTexture);
-
-    if (mHasNativeWindowAccess && android_SurfaceTexture_getNativeWindow) {
-        android::sp<AndroidRefable> window = android_SurfaceTexture_getNativeWindow(aEnv, aSurfaceTexture);
-        return window.get();
-    }
-
-    return nullptr;
-}
-
-void
-AndroidBridge::ReleaseNativeWindowForSurfaceTexture(void *window)
-{
-    if (!window)
-        return;
-
-    // FIXME: we don't ref the pointer we get, so nothing to do currently. We should ref it.
-}
-
 jobject
 AndroidBridge::GetGlobalContextRef() {
     if (sGlobalContext) {
         return sGlobalContext;
     }
 
     JNIEnv* const env = GetEnvForThread();
     AutoLocalJNIFrame jniFrame(env, 4);
--- a/widget/android/AndroidBridge.h
+++ b/widget/android/AndroidBridge.h
@@ -227,19 +227,16 @@ public:
     };
 
     bool HasNativeWindowAccess();
 
     void *AcquireNativeWindow(JNIEnv* aEnv, jobject aSurface);
     void ReleaseNativeWindow(void *window);
     mozilla::gfx::IntSize GetNativeWindowSize(void* window);
 
-    void *AcquireNativeWindowFromSurfaceTexture(JNIEnv* aEnv, jobject aSurface);
-    void ReleaseNativeWindowForSurfaceTexture(void *window);
-
     void HandleGeckoMessage(JSContext* cx, JS::HandleObject message);
 
     bool InitCamera(const nsCString& contentType, uint32_t camera, uint32_t *width, uint32_t *height, uint32_t *fps);
 
     void GetCurrentBatteryInformation(hal::BatteryInformation* aBatteryInfo);
 
     nsresult GetSegmentInfoForText(const nsAString& aText,
                                    nsIMobileMessageCallback* aRequest);