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

Unified Diff: content/renderer/media/webmediaplayer_ms.cc

Issue 1895233003: Bug Fix: Resize Event Trigger (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unittest Created 4 years, 8 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 | « content/renderer/media/webmediaplayer_ms.h ('k') | content/renderer/media/webmediaplayer_ms_compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webmediaplayer_ms.cc
diff --git a/content/renderer/media/webmediaplayer_ms.cc b/content/renderer/media/webmediaplayer_ms.cc
index c7d09e7d9a3294ef538b4e5ba37c1f82a9338d79..1122903e467b9b51b0503035b9b103fff6798a07 100644
--- a/content/renderer/media/webmediaplayer_ms.cc
+++ b/content/renderer/media/webmediaplayer_ms.cc
@@ -496,15 +496,7 @@ void WebMediaPlayerMS::OnFrameAvailable(
}
}
- // As EnqueueFrame can potentially change |current_frame_|, we need to do
- // the size change check before it. Otherwise, we are running the risk of not
- // detecting a size change event.
- const bool size_changed =
- compositor_->GetCurrentSize() != frame->natural_size();
-
compositor_->EnqueueFrame(frame);
- if (size_changed)
- get_client()->sizeChanged();
}
void WebMediaPlayerMS::RepaintInternal() {
@@ -542,4 +534,8 @@ void WebMediaPlayerMS::ResetCanvasCache() {
video_renderer_.ResetCache();
}
+void WebMediaPlayerMS::TriggerResize() {
+ get_client()->sizeChanged();
+}
+
} // namespace content
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.h ('k') | content/renderer/media/webmediaplayer_ms_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698