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

Side by Side 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: Created 7 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_CLIENT_JNI_CHROMOTING_JNI_RUNTIME_H_ 5 #ifndef REMOTING_CLIENT_JNI_CHROMOTING_JNI_RUNTIME_H_
6 #define REMOTING_CLIENT_JNI_CHROMOTING_JNI_RUNTIME_H_ 6 #define REMOTING_CLIENT_JNI_CHROMOTING_JNI_RUNTIME_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 protocol::ErrorCode error); 72 protocol::ErrorCode error);
73 73
74 // Pops up a dialog box asking the user to enter a PIN. Call on UI thread. 74 // Pops up a dialog box asking the user to enter a PIN. Call on UI thread.
75 void DisplayAuthenticationPrompt(bool pairing_supported); 75 void DisplayAuthenticationPrompt(bool pairing_supported);
76 76
77 // Saves new pairing credentials to permanent storage. Call on UI thread. 77 // Saves new pairing credentials to permanent storage. Call on UI thread.
78 void CommitPairingCredentials(const std::string& host, 78 void CommitPairingCredentials(const std::string& host,
79 const std::string& id, 79 const std::string& id,
80 const std::string& secret); 80 const std::string& secret);
81 81
82 // Updates image dimensions and canvas memory space. Call on display thread. 82 // Updates the video image buffer, copying pixels from |buffer| into a Java
83 void UpdateImageBuffer(int width, int height, jobject buffer); 83 // Bitmap object. |buffer| is owned by the caller, and may be freed after this
84 // function returns. Call on the display thread.
85 void UpdateImageBuffer(int width, int height, uint8* buffer);
Sergey Ulanov 2013/09/25 23:32:08 Pass the frame as webrtc::DesktopFrame reference.
84 86
85 // Updates cursor shape. Call on display thread. 87 // Updates cursor shape. Call on display thread.
86 void UpdateCursorShape(const protocol::CursorShapeInfo& cursor_shape); 88 void UpdateCursorShape(const protocol::CursorShapeInfo& cursor_shape);
87 89
88 // Draws the latest image buffer onto the canvas. Call on the display thread. 90 // Draws the latest image buffer onto the canvas. Call on the display thread.
89 void RedrawCanvas(); 91 void RedrawCanvas();
90 92
91 private: 93 private:
92 ChromotingJniRuntime(); 94 ChromotingJniRuntime();
93 95
(...skipping 28 matching lines...) Expand all
122 scoped_refptr<ChromotingJniInstance> session_; 124 scoped_refptr<ChromotingJniInstance> session_;
123 125
124 friend struct DefaultSingletonTraits<ChromotingJniRuntime>; 126 friend struct DefaultSingletonTraits<ChromotingJniRuntime>;
125 127
126 DISALLOW_COPY_AND_ASSIGN(ChromotingJniRuntime); 128 DISALLOW_COPY_AND_ASSIGN(ChromotingJniRuntime);
127 }; 129 };
128 130
129 } // namespace remoting 131 } // namespace remoting
130 132
131 #endif 133 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698