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

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

Issue 24217003: Revert 224101 "Remove dependency on Skia from chromoting client." (Closed) Base URL: svn://svn.chromium.org/chrome/
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
Index: trunk/src/remoting/client/jni/jni_frame_consumer.cc
===================================================================
--- trunk/src/remoting/client/jni/jni_frame_consumer.cc (revision 224204)
+++ trunk/src/remoting/client/jni/jni_frame_consumer.cc (working copy)
@@ -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 @@
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 @@
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 @@
// 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 | « trunk/src/remoting/client/jni/jni_frame_consumer.h ('k') | trunk/src/remoting/client/plugin/chromoting_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698