Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(526)

Side by Side Diff: talk/app/webrtc/java/jni/surfacetexturehelper_jni.cc

Issue 1370013002: Fix the C++ SurfaceTextureHolder (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « talk/app/webrtc/java/jni/classreferenceholder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 private: 57 private:
58 NativeHandleImpl native_handle_; 58 NativeHandleImpl native_handle_;
59 const rtc::scoped_refptr<SurfaceTextureHelper> pool_; 59 const rtc::scoped_refptr<SurfaceTextureHelper> pool_;
60 }; 60 };
61 61
62 SurfaceTextureHelper::SurfaceTextureHelper(JNIEnv* jni, 62 SurfaceTextureHelper::SurfaceTextureHelper(JNIEnv* jni,
63 jobject egl_shared_context) 63 jobject egl_shared_context)
64 : j_surface_texture_helper_class_( 64 : j_surface_texture_helper_class_(
65 jni, 65 jni,
66 jni->FindClass("org/webrtc/SurfaceTextureHelper")), 66 FindClass(jni, "org/webrtc/SurfaceTextureHelper")),
67 j_surface_texture_helper_( 67 j_surface_texture_helper_(
68 jni, 68 jni,
69 jni->NewObject(*j_surface_texture_helper_class_, 69 jni->NewObject(*j_surface_texture_helper_class_,
70 GetMethodID(jni, 70 GetMethodID(jni,
71 *j_surface_texture_helper_class_, 71 *j_surface_texture_helper_class_,
72 "<init>", 72 "<init>",
73 "(Landroid/opengl/EGLContext;)V"), 73 "(Landroid/opengl/EGLContext;)V"),
74 egl_shared_context)), 74 egl_shared_context)),
75 j_return_texture_method_( 75 j_return_texture_method_(
76 GetMethodID(jni, 76 GetMethodID(jni,
(...skipping 15 matching lines...) Expand all
92 } 92 }
93 93
94 rtc::scoped_refptr<webrtc::VideoFrameBuffer> 94 rtc::scoped_refptr<webrtc::VideoFrameBuffer>
95 SurfaceTextureHelper::CreateTextureFrame(int width, int height, 95 SurfaceTextureHelper::CreateTextureFrame(int width, int height,
96 const NativeHandleImpl& native_handle) { 96 const NativeHandleImpl& native_handle) {
97 return new rtc::RefCountedObject<TextureBuffer>( 97 return new rtc::RefCountedObject<TextureBuffer>(
98 width, height, this, native_handle); 98 width, height, this, native_handle);
99 } 99 }
100 100
101 } // namespace webrtc_jni 101 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « talk/app/webrtc/java/jni/classreferenceholder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698