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

Unified Diff: remoting/client/plugin/pepper_desktop_frame.cc

Issue 18233015: Abstract PPAPI's ImageData behind webrtc::DesktopFrame interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify PepperDesktopFrame implementation Created 7 years, 6 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/plugin/pepper_desktop_frame.cc
diff --git a/remoting/client/plugin/pepper_desktop_frame.cc b/remoting/client/plugin/pepper_desktop_frame.cc
new file mode 100644
index 0000000000000000000000000000000000000000..60ac99823fb7a5712706b27eb3595d903787cb27
--- /dev/null
+++ b/remoting/client/plugin/pepper_desktop_frame.cc
@@ -0,0 +1,25 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "remoting/client/plugin/pepper_desktop_frame.h"
+
+#include "ppapi/cpp/image_data.h"
+
+using pp::ImageData;
+using webrtc::DesktopSize;
+
+namespace remoting {
+
+PepperDesktopFrame::PepperDesktopFrame(ImageData* buffer)
+ : DesktopFrame(DesktopSize(buffer->size().width(), buffer->size().height()),
+ buffer->stride(),
+ reinterpret_cast<uint8_t*>(buffer->data()),
+ NULL),
+ buffer_(buffer) {}
+
+ImageData& PepperDesktopFrame::data_object() {
+ return *buffer_;
+}
+
+} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698