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

Unified Diff: remoting/client/image_buffer.h

Issue 18233015: Abstract PPAPI's ImageData behind webrtc::DesktopFrame interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/image_buffer.h
diff --git a/remoting/client/image_buffer.h b/remoting/client/image_buffer.h
new file mode 100644
index 0000000000000000000000000000000000000000..c06b4bcbf87ea53950a9e40cc723250edbc722e0
--- /dev/null
+++ b/remoting/client/image_buffer.h
@@ -0,0 +1,30 @@
+#ifndef REMOTING_CLIENT_IMAGE_BUFFER_H_
+#define REMOTING_CLIENT_IMAGE_BUFFER_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+
+namespace remoting {
+
+// Interface that abstracts the allocation and storage of raw image data.
+class ImageBuffer {
+ public:
+ // Returns true if the instance is uninitialized or otherwise not ready.
+ virtual bool is_null() = 0;
+
+ // Provides access to the memory block of image data.
+ virtual uint8* data() = 0;
+
+ // The width of the image that can be stored in this buffer, in pixels/ints.
+ virtual int width() = 0;
+
+ // The height of the image that can be stored in this buffer, in pixels/ints.
+ virtual int height() = 0;
+
+ // The (contiguous) space allocated for each row of the image, in bytes.
+ virtual int32 stride() = 0;
+};
+
+} // namespace remoting
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698