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

Unified Diff: remoting/codec/video_decoder_vpx.h

Issue 1236663002: Allow shaped-desktop hosts to send shape only when it changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Pepper 2D renderer build Created 5 years, 5 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
« no previous file with comments | « remoting/codec/codec_test.cc ('k') | remoting/codec/video_decoder_vpx.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/codec/video_decoder_vpx.h
diff --git a/remoting/codec/video_decoder_vpx.h b/remoting/codec/video_decoder_vpx.h
index 9c969984dd4eef451d469bd42dc50ae8d09a968a..21a576a8f9ee594594b9f660560803553b8b3b55 100644
--- a/remoting/codec/video_decoder_vpx.h
+++ b/remoting/codec/video_decoder_vpx.h
@@ -12,6 +12,7 @@
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
+typedef const struct vpx_codec_iface vpx_codec_iface_t;
typedef struct vpx_image vpx_image_t;
namespace remoting {
@@ -25,7 +26,7 @@ class VideoDecoderVpx : public VideoDecoder {
~VideoDecoderVpx() override;
// VideoDecoder interface.
- void Initialize(const webrtc::DesktopSize& screen_size) override;
+ void Initialize(const webrtc::DesktopSize& source_size) override;
bool DecodePacket(const VideoPacket& packet) override;
void Invalidate(const webrtc::DesktopSize& view_size,
const webrtc::DesktopRegion& region) override;
@@ -37,29 +38,21 @@ class VideoDecoderVpx : public VideoDecoder {
const webrtc::DesktopRegion* GetImageShape() override;
private:
- explicit VideoDecoderVpx(ScopedVpxCodec codec);
+ explicit VideoDecoderVpx(vpx_codec_iface_t* codec);
- // Calculates the difference between the desktop shape regions in two
- // consecutive frames and updates |updated_region_| and |transparent_region_|
- // accordingly.
- void UpdateImageShapeRegion(webrtc::DesktopRegion* new_desktop_shape);
+ // Returns the dimensions of the most recent frame as a DesktopSize.
+ webrtc::DesktopSize image_size() const;
ScopedVpxCodec codec_;
- // Pointer to the last decoded image.
- vpx_image_t* last_image_;
+ // Pointer to the most recently decoded image.
+ vpx_image_t* image_;
- // The region updated that hasn't been copied to the screen yet.
+ // Area of the source that has changed since the last RenderFrame call.
webrtc::DesktopRegion updated_region_;
- // Output dimensions.
- webrtc::DesktopSize screen_size_;
-
- // The region occupied by the top level windows.
- webrtc::DesktopRegion desktop_shape_;
-
- // The region that should be make transparent.
- webrtc::DesktopRegion transparent_region_;
+ // The shape of the most-recent frame, if any.
+ scoped_ptr<webrtc::DesktopRegion> desktop_shape_;
DISALLOW_COPY_AND_ASSIGN(VideoDecoderVpx);
};
« no previous file with comments | « remoting/codec/codec_test.cc ('k') | remoting/codec/video_decoder_vpx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698