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

Unified Diff: webkit/glue/webmediaplayer_impl.h

Issue 5878007: Fix black video frames when seeking (which also fixes flashing poster issue). (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 10 years 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: webkit/glue/webmediaplayer_impl.h
diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h
index 8aa666114a04199de97dc22010363334cc1341e1..8075651126b2768627f689934489916e0ff909d0 100644
--- a/webkit/glue/webmediaplayer_impl.h
+++ b/webkit/glue/webmediaplayer_impl.h
@@ -104,6 +104,10 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
void Paint(skia::PlatformCanvas* canvas, const gfx::Rect& dest_rect);
void SetSize(const gfx::Rect& rect);
void Detach();
+ void CopyBitmapToCanvas(const SkBitmap& bitmap,
+ skia::PlatformCanvas* canvas,
+ const gfx::Rect& dest_rect);
+ void GetCurrentBitmap(SkBitmap* bitmap);
void GetCurrentFrame(scoped_refptr<media::VideoFrame>* frame_out);
void PutCurrentFrame(scoped_refptr<media::VideoFrame> frame);
bool HasSingleOrigin();
@@ -303,6 +307,7 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
// clock can creep forward a little bit while the asynchronous
// SetPlaybackRate(0) is being executed.
bool paused_;
+ bool seeking_;
float playback_rate_;
base::TimeDelta paused_time_;
@@ -317,6 +322,9 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
scoped_ptr<skia::PlatformCanvas> skia_canvas_;
#endif
+ // Used to display the last available frame when seeking.
+ SkBitmap cached_bitmap_;
+
DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
};

Powered by Google App Engine
This is Rietveld 408576698