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

Unified Diff: remoting/client/frame_consumer.h

Issue 23677011: Byte-swap the video frame pixels before passing them to Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add PixelFormat to FrameConsumer interface 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: remoting/client/frame_consumer.h
diff --git a/remoting/client/frame_consumer.h b/remoting/client/frame_consumer.h
index b5f937ca5acd07db7098115fcc83eca38d2c2eee..f11541fb91fcd7d9fc8ba0b651697987757204bc 100644
--- a/remoting/client/frame_consumer.h
+++ b/remoting/client/frame_consumer.h
@@ -18,6 +18,13 @@ namespace remoting {
class FrameConsumer {
public:
+
+ // List of supported pixel formats needed by various platforms.
+ enum PixelFormat {
+ FORMAT_BGRA, // Used by the Pepper plugin.
+ FORMAT_RGBA, // Used for Android's Bitmap class.
+ };
+
// Accepts a buffer to be painted to the screen. The buffer's dimensions and
// relative position within the frame are specified by |clip_area|. Only
// pixels falling within |region| and the current clipping area are painted.
@@ -40,6 +47,10 @@ class FrameConsumer {
virtual void SetSourceSize(const SkISize& source_size,
const SkIPoint& dpi) = 0;
+ // Returns the preferred pixel encoding for the platform. This may be called
+ // from any thread.
Sergey Ulanov 2013/09/27 21:51:13 Don't need the threading comment. This interface i
Lambros 2013/09/28 00:22:18 Done.
+ virtual PixelFormat GetPixelFormat() = 0;
+
protected:
FrameConsumer() {}
virtual ~FrameConsumer() {}

Powered by Google App Engine
This is Rietveld 408576698