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

Unified Diff: remoting/codec/video_decoder_vp8.h

Issue 17511004: Added the desktop shape fields to VideoPacket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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/codec/video_decoder_vp8.h
diff --git a/remoting/codec/video_decoder_vp8.h b/remoting/codec/video_decoder_vp8.h
index 53a720ba9b6711448e78cb52fa72b324012e7c3d..e837d5a2b49ae928e3b0b90eb71125f62530cfd0 100644
--- a/remoting/codec/video_decoder_vp8.h
+++ b/remoting/codec/video_decoder_vp8.h
@@ -30,6 +30,7 @@ class VideoDecoderVp8 : public VideoDecoder {
uint8* image_buffer,
int image_stride,
SkRegion* output_region) OVERRIDE;
+ virtual const SkRegion* GetImageShape() OVERRIDE;
private:
enum State {
@@ -38,6 +39,14 @@ class VideoDecoderVp8 : public VideoDecoder {
kError,
};
+ // Fills the rectangle |rect| with the given ARGB color |color| in |buffer|.
+ void FillRect(uint8* buffer, int stride, const SkIRect& rect, uint32 color);
+
+ // Calculates the difference between the desktop shape regions in two
+ // consecutive frames and updates |updated_region_| and |transparent_region_|
+ // accordingly.
+ void UpdateDesktopShapeRegion(SkRegion* new_desktop_shape_region);
+
// The internal state of the decoder.
State state_;
@@ -52,6 +61,12 @@ class VideoDecoderVp8 : public VideoDecoder {
// Output dimensions.
SkISize screen_size_;
+ // The region occupied by the top level windows.
+ SkRegion desktop_shape_region_;
+
+ // The region that should be make transparent.
+ SkRegion transparent_region_;
+
DISALLOW_COPY_AND_ASSIGN(VideoDecoderVp8);
};

Powered by Google App Engine
This is Rietveld 408576698