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

Unified Diff: remoting/client/jni/chromoting_jni_runtime.h

Issue 24072012: Hold video frame in Bitmap instead of keeping a ByteBuffer reference. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep track of buffers in JniFrameConsumer Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/jni/DEPS ('k') | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/jni/chromoting_jni_runtime.h
diff --git a/remoting/client/jni/chromoting_jni_runtime.h b/remoting/client/jni/chromoting_jni_runtime.h
index bfe85492a6b62e995f80d418d9523ebde6d1bb17..93d77bdae69c081f27cc825f289546c9ae24853e 100644
--- a/remoting/client/jni/chromoting_jni_runtime.h
+++ b/remoting/client/jni/chromoting_jni_runtime.h
@@ -8,6 +8,7 @@
#include <jni.h>
#include <string>
+#include "base/android/scoped_java_ref.h"
#include "base/at_exit.h"
#include "net/url_request/url_request_context_getter.h"
#include "remoting/base/auto_thread.h"
@@ -79,8 +80,13 @@ class ChromotingJniRuntime {
const std::string& id,
const std::string& secret);
- // Updates image dimensions and canvas memory space. Call on display thread.
- void UpdateImageBuffer(int width, int height, jobject buffer);
+ // Creates a new Bitmap object to store a video frame.
+ base::android::ScopedJavaLocalRef<jobject> NewBitmap(
+ webrtc::DesktopSize size);
+
+ // Updates video frame bitmap. |bitmap| must be an instance of
+ // android.graphics.Bitmap. Call on the display thread.
+ void UpdateFrameBitmap(jobject bitmap);
// Updates cursor shape. Call on display thread.
void UpdateCursorShape(const protocol::CursorShapeInfo& cursor_shape);
« no previous file with comments | « remoting/client/jni/DEPS ('k') | remoting/client/jni/chromoting_jni_runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698