Add shape in DesktopFrame.
The shape will be used for Me2App mode in chromoting. R=wez@chromium.org Review URL: https://webrtc-codereview.appspot.com/4369005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5243 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
4acf4507b8
commit
5e13ac967b
@ -14,6 +14,7 @@
|
||||
#include "webrtc/modules/desktop_capture/desktop_geometry.h"
|
||||
#include "webrtc/modules/desktop_capture/desktop_region.h"
|
||||
#include "webrtc/modules/desktop_capture/shared_memory.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -53,6 +54,11 @@ class DesktopFrame {
|
||||
int32_t capture_time_ms() const { return capture_time_ms_; }
|
||||
void set_capture_time_ms(int32_t time_ms) { capture_time_ms_ = time_ms; }
|
||||
|
||||
// Optional shape for the frame. Frames may be shaped e.g. if
|
||||
// capturing the contents of a shaped window.
|
||||
const DesktopRegion* shape() const { return shape_.get(); }
|
||||
void set_shape(DesktopRegion* shape) { shape_.reset(shape); }
|
||||
|
||||
// Copies pixels from a buffer or another frame. |dest_rect| rect must lay
|
||||
// within bounds of this frame.
|
||||
void CopyPixelsFrom(uint8_t* src_buffer, int src_stride,
|
||||
@ -77,9 +83,9 @@ class DesktopFrame {
|
||||
SharedMemory* const shared_memory_;
|
||||
|
||||
DesktopRegion updated_region_;
|
||||
|
||||
DesktopVector dpi_;
|
||||
int32_t capture_time_ms_;
|
||||
scoped_ptr<DesktopRegion> shape_;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(DesktopFrame);
|
||||
|
Loading…
Reference in New Issue
Block a user