Chromium Code Reviews| Index: remoting/base/decoder_vp8.h |
| diff --git a/remoting/base/decoder_vp8.h b/remoting/base/decoder_vp8.h |
| index 76fd5472b798497c7093d69ec41cc16a7b23108b..d0406990c17938ad3e83c1102b98670705c8f26c 100644 |
| --- a/remoting/base/decoder_vp8.h |
| +++ b/remoting/base/decoder_vp8.h |
| @@ -18,15 +18,17 @@ class DecoderVp8 : public Decoder { |
| virtual ~DecoderVp8(); |
| // Decoder implementations. |
| - virtual void Initialize(scoped_refptr<media::VideoFrame> frame) OVERRIDE; |
| + virtual void Initialize(const SkISize& screen_size) OVERRIDE; |
| virtual DecodeResult DecodePacket(const VideoPacket* packet) 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 RefreshRegion(const SkRegion& region) OVERRIDE; |
| + virtual void UpdateRegion(const SkRegion& region) OVERRIDE; |
| + virtual void Draw(const SkISize& view_size, |
| + const SkIRect& clip_area, |
| + uint8* image_buffer, |
| + int image_stride, |
| + SkRegion* output_region) OVERRIDE; |
| private: |
| enum State { |
| @@ -35,38 +37,19 @@ class DecoderVp8 : public Decoder { |
| kError, |
| }; |
| - // Return true if scaling is enabled |
| - bool DoScaling() const; |
| - |
| - // 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 |
| - // region. Writes the updated rectangles to |output_region|. |
| - void ScaleAndConvertRegion(const SkRegion& region, |
| - SkRegion* output_region); |
| - |
| // The internal state of the decoder. |
| State state_; |
| - // The video frame to write to. |
| - scoped_refptr<media::VideoFrame> frame_; |
| - |
| vpx_codec_ctx_t* codec_; |
| // Pointer to the last decoded image. |
| vpx_image_t* last_image_; |
| - // The region updated by the most recent decode. |
| + // The region updated that hasn't been copied to the screen yet. |
| SkRegion updated_region_; |
|
Wez
2012/02/07 01:56:31
I think this needs renaming, and the semantics cla
alexeypa (please no reviews)
2012/02/15 23:06:22
Now we validate only the painted area.
|
| - // Clipping rect for the output of the decoder. |
| - SkIRect clip_rect_; |
| - |
| // Output dimensions. |
| - SkISize output_size_; |
| + SkISize screen_size_; |
| DISALLOW_COPY_AND_ASSIGN(DecoderVp8); |
| }; |