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

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

Issue 23440046: Remove dependency on Skia from chromoting client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/jni/jni_frame_consumer.h ('k') | remoting/client/plugin/chromoting_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/jni/jni_frame_consumer.cc
diff --git a/remoting/client/jni/jni_frame_consumer.cc b/remoting/client/jni/jni_frame_consumer.cc
index 8f8cfc6e9760d7d7ec1a92094e18b07c1ac43f1c..3b4e763cea2b1e5d424a141f9303ccd4741d6301 100644
--- a/remoting/client/jni/jni_frame_consumer.cc
+++ b/remoting/client/jni/jni_frame_consumer.cc
@@ -10,6 +10,7 @@
#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 {
@@ -62,10 +63,10 @@ void JniFrameConsumer::set_frame_producer(FrameProducer* producer) {
frame_producer_ = producer;
}
-void JniFrameConsumer::ApplyBuffer(const SkISize& view_size,
- const SkIRect& clip_area,
+void JniFrameConsumer::ApplyBuffer(const webrtc::DesktopSize& view_size,
+ const webrtc::DesktopRect& clip_area,
webrtc::DesktopFrame* buffer,
- const SkRegion& region) {
+ const webrtc::DesktopRegion& region) {
DCHECK(jni_runtime_->display_task_runner()->BelongsToCurrentThread());
scoped_ptr<webrtc::DesktopFrame> buffer_scoped(buffer);
@@ -93,14 +94,14 @@ void JniFrameConsumer::ReturnBuffer(webrtc::DesktopFrame* buffer) {
delete buffer;
}
-void JniFrameConsumer::SetSourceSize(const SkISize& source_size,
- const SkIPoint& dpi) {
+void JniFrameConsumer::SetSourceSize(const webrtc::DesktopSize& source_size,
+ const webrtc::DesktopVector& 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_ = SkIRect::MakeSize(view_size_);
+ clip_area_ = webrtc::DesktopRect::MakeSize(view_size_);
frame_producer_->SetOutputSizeAndClip(view_size_, clip_area_);
// Unless being destructed, allocate buffer and start drawing frames onto it.
@@ -123,8 +124,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);
}
« no previous file with comments | « remoting/client/jni/jni_frame_consumer.h ('k') | remoting/client/plugin/chromoting_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698