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

Unified Diff: remoting/base/decoder_vp8.h

Issue 9277001: Replace RectVectors with SkRegions in Decoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pick nits. Created 8 years, 11 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/base/decoder_row_based.cc ('k') | remoting/base/decoder_vp8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/decoder_vp8.h
diff --git a/remoting/base/decoder_vp8.h b/remoting/base/decoder_vp8.h
index a89991c2fc577a661eb91cc6ab524d18297a26f9..d4221510ec6d641c6f3cddd94aa101ffc266f42a 100644
--- a/remoting/base/decoder_vp8.h
+++ b/remoting/base/decoder_vp8.h
@@ -20,13 +20,13 @@ class DecoderVp8 : public Decoder {
// Decoder implementations.
virtual void Initialize(scoped_refptr<media::VideoFrame> frame) OVERRIDE;
virtual DecodeResult DecodePacket(const VideoPacket* packet) OVERRIDE;
- virtual void GetUpdatedRects(RectVector* rects) OVERRIDE;
+ virtual void GetUpdatedRegion(SkRegion* region) OVERRIDE;
virtual bool IsReadyForData() OVERRIDE;
virtual void Reset() OVERRIDE;
virtual VideoPacketFormat::Encoding Encoding() OVERRIDE;
virtual void SetOutputSize(const SkISize& size) OVERRIDE;
virtual void SetClipRect(const SkIRect& clip_rect) OVERRIDE;
- virtual void RefreshRects(const RectVector& rects) OVERRIDE;
+ virtual void RefreshRegion(const SkRegion& region) OVERRIDE;
private:
enum State {
@@ -38,16 +38,15 @@ class DecoderVp8 : public Decoder {
// Return true if scaling is enabled
bool DoScaling() const;
- // Perform color space conversion on the specified rectangles.
- // Write the updated rectangles to |output_rects|.
- void ConvertRects(const RectVector& rects,
- RectVector* output_rects);
+ // Perform color space conversion on the specified region.
+ // Writes the updated region to |output_region|.
+ void ConvertRegion(const SkRegion& region,
+ SkRegion* output_region);
// Perform scaling and color space conversion on the specified
- // rectangles.
- // Write the updated rectangles to |output_rects|.
- void ScaleAndConvertRects(const RectVector& rects,
- RectVector* output_rects);
+ // region. Writes the updated rectangles to |output_region|.
+ void ScaleAndConvertRegion(const SkRegion& region,
+ SkRegion* output_region);
// The internal state of the decoder.
State state_;
@@ -60,8 +59,8 @@ class DecoderVp8 : public Decoder {
// Pointer to the last decoded image.
vpx_image_t* last_image_;
- // Record the updated rects in the last decode.
- RectVector updated_rects_;
+ // The region updated by the most recent decode.
+ SkRegion updated_region_;
// Clipping rect for the output of the decoder.
SkIRect clip_rect_;
« no previous file with comments | « remoting/base/decoder_row_based.cc ('k') | remoting/base/decoder_vp8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698