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

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

Issue 19967007: Various improvements to the Chromoting Android app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
Index: remoting/client/jni/jni_frame_consumer.h
diff --git a/remoting/client/jni/jni_frame_consumer.h b/remoting/client/jni/jni_frame_consumer.h
index b74681f66ec6b1baa240ec5e6d345e5a856327b4..a260ac55f27449ba0195ba4f1cd41c7efe5ff04c 100644
--- a/remoting/client/jni/jni_frame_consumer.h
+++ b/remoting/client/jni/jni_frame_consumer.h
@@ -20,7 +20,7 @@ class FrameProducer;
// FrameConsumer implementation that draws onto a JNI direct byte buffer.
class JniFrameConsumer : public FrameConsumer {
public:
- JniFrameConsumer();
+ JniFrameConsumer(ChromotingJni* jni_environment);
virtual ~JniFrameConsumer();
// This must be called once before the producer's source size is set.
@@ -38,13 +38,14 @@ class JniFrameConsumer : public FrameConsumer {
private:
// Variables are to be used from the display thread.
- // Whether to allocate/provide the producer with a buffer when able. This
- // goes to false during destruction so that we don't leak memory.
- bool provide_buffer_;
+ // Whether we're currently in the constructor, and should deallocate the
+ // buffer instead of passing it back to the producer.
+ bool in_dtor_;
FrameProducer* frame_producer_;
SkISize view_size_;
SkIRect clip_area_;
+ ChromotingJni* jni_environment_;
Wez 2013/07/23 03:53:06 nit: Suggest java_interface_ or jni_interface_
solb 2013/07/23 19:01:10 I'm renaming ChromotingJni to ChromotingJniRuntime
// If |provide_buffer_|, allocates a new buffer of |view_size_|, informs
// Java about it, and tells the producer to draw onto it. Otherwise, no-op.

Powered by Google App Engine
This is Rietveld 408576698