summaryrefslogtreecommitdiffstats
path: root/remoting/client/jni
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-19 21:24:28 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-19 21:24:28 +0000
commitb4e50594c117da39d9d65beed489acc3ce4cd35e (patch)
treeeb321c268adbabfc85ad3dae6931be64c2f92150 /remoting/client/jni
parentc45d12c0186dbf6a1ffdbb7cb45a15c2366d9dcf (diff)
downloadchromium_src-b4e50594c117da39d9d65beed489acc3ce4cd35e.zip
chromium_src-b4e50594c117da39d9d65beed489acc3ce4cd35e.tar.gz
chromium_src-b4e50594c117da39d9d65beed489acc3ce4cd35e.tar.bz2
Revert 224101 "Remove dependency on Skia from chromoting client."
> Remove dependency on Skia from chromoting client. > > Now DesktopRegion, DesktopRect and DesktopSize are used instead of > corresponding skia types. > > TBR=reed@google.com (for _moved_ skia dependency) > > Review URL: https://chromiumcodereview.appspot.com/23440046 TBR=sergeyu@chromium.org Review URL: https://codereview.chromium.org/24217003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224205 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/jni')
-rw-r--r--remoting/client/jni/jni_frame_consumer.cc17
-rw-r--r--remoting/client/jni/jni_frame_consumer.h15
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.