diff options
Diffstat (limited to 'remoting/client/jni')
-rw-r--r-- | remoting/client/jni/jni_frame_consumer.cc | 17 | ||||
-rw-r--r-- | remoting/client/jni/jni_frame_consumer.h | 15 |
2 files changed, 15 insertions, 17 deletions
diff --git a/remoting/client/jni/jni_frame_consumer.cc b/remoting/client/jni/jni_frame_consumer.cc index 3b4e763..8f8cfc6 100644 --- a/remoting/client/jni/jni_frame_consumer.cc +++ b/remoting/client/jni/jni_frame_consumer.cc @@ -10,7 +10,6 @@ #include "remoting/client/frame_producer.h" #include "remoting/client/jni/chromoting_jni_runtime.h" #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" -#include "third_party/webrtc/modules/desktop_capture/desktop_region.h" namespace { @@ -63,10 +62,10 @@ void JniFrameConsumer::set_frame_producer(FrameProducer* producer) { frame_producer_ = producer; } -void JniFrameConsumer::ApplyBuffer(const webrtc::DesktopSize& view_size, - const webrtc::DesktopRect& clip_area, +void JniFrameConsumer::ApplyBuffer(const SkISize& view_size, + const SkIRect& clip_area, webrtc::DesktopFrame* buffer, - const webrtc::DesktopRegion& region) { + const SkRegion& region) { DCHECK(jni_runtime_->display_task_runner()->BelongsToCurrentThread()); scoped_ptr<webrtc::DesktopFrame> buffer_scoped(buffer); @@ -94,14 +93,14 @@ void JniFrameConsumer::ReturnBuffer(webrtc::DesktopFrame* buffer) { delete buffer; } -void JniFrameConsumer::SetSourceSize(const webrtc::DesktopSize& source_size, - const webrtc::DesktopVector& dpi) { +void JniFrameConsumer::SetSourceSize(const SkISize& source_size, + const SkIPoint& dpi) { DCHECK(jni_runtime_->display_task_runner()->BelongsToCurrentThread()); // We currently render the desktop 1:1 and perform pan/zoom scaling // and cropping on the managed canvas. view_size_ = source_size; - clip_area_ = webrtc::DesktopRect::MakeSize(view_size_); + clip_area_ = SkIRect::MakeSize(view_size_); frame_producer_->SetOutputSizeAndClip(view_size_, clip_area_); // Unless being destructed, allocate buffer and start drawing frames onto it. @@ -124,8 +123,8 @@ void JniFrameConsumer::AllocateBuffer() { // Update Java's reference to the buffer and record of its dimensions. jni_runtime_->UpdateImageBuffer(view_size_.width(), - view_size_.height(), - buffer->buffer()); + view_size_.height(), + buffer->buffer()); frame_producer_->DrawBuffer(buffer); } diff --git a/remoting/client/jni/jni_frame_consumer.h b/remoting/client/jni/jni_frame_consumer.h index 14155a1..38ff86c 100644 --- a/remoting/client/jni/jni_frame_consumer.h +++ b/remoting/client/jni/jni_frame_consumer.h @@ -8,7 +8,6 @@ #include "remoting/client/frame_consumer.h" #include "base/compiler_specific.h" -#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" namespace webrtc { class DesktopFrame; @@ -30,13 +29,13 @@ class JniFrameConsumer : public FrameConsumer { void set_frame_producer(FrameProducer* producer); // FrameConsumer implementation. - virtual void ApplyBuffer(const webrtc::DesktopSize& view_size, - const webrtc::DesktopRect& clip_area, + virtual void ApplyBuffer(const SkISize& view_size, + const SkIRect& clip_area, webrtc::DesktopFrame* buffer, - const webrtc::DesktopRegion& region) OVERRIDE; + const SkRegion& region) OVERRIDE; virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) OVERRIDE; - virtual void SetSourceSize(const webrtc::DesktopSize& source_size, - const webrtc::DesktopVector& dpi) OVERRIDE; + virtual void SetSourceSize(const SkISize& source_size, + const SkIPoint& dpi) OVERRIDE; private: // Variables are to be used from the display thread. @@ -49,8 +48,8 @@ class JniFrameConsumer : public FrameConsumer { bool in_dtor_; FrameProducer* frame_producer_; - webrtc::DesktopSize view_size_; - webrtc::DesktopRect clip_area_; + SkISize view_size_; + SkIRect clip_area_; // 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. |