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

Unified Diff: webkit/media/webmediaplayer_impl.cc

Issue 10332275: Fix crash in UMA reporting of accelerated compositing in WebGL codepaths. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 8 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/webmediaplayer_impl.cc
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc
index 2fabfd68e45ca9cc1a03c2eb19a60caa3bf22a0f..657d9fff568e34a64b2bf35b8fc488daa4a39815 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -503,8 +503,12 @@ void WebMediaPlayerImpl::paint(WebCanvas* canvas,
if (!accelerated_compositing_reported_) {
accelerated_compositing_reported_ = true;
- DCHECK_EQ(frame_->view()->isAcceleratedCompositingActive(), false);
- UMA_HISTOGRAM_BOOLEAN("Media.AcceleratedCompositingActive", false);
+ // Normally paint() is only called in non-accelerated rendering, but there
+ // are exceptions such as webgl where compositing is used in the WebView but
+ // video frames are still rendered to a canvas.
+ UMA_HISTOGRAM_BOOLEAN(
+ "Media.AcceleratedCompositingActive",
+ frame_->view()->isAcceleratedCompositingActive());
}
proxy_->Paint(canvas, rect, alpha);
@@ -569,7 +573,7 @@ void WebMediaPlayerImpl::putCurrentFrame(
WebKit::WebVideoFrame* web_video_frame) {
if (!accelerated_compositing_reported_) {
accelerated_compositing_reported_ = true;
- DCHECK_EQ(frame_->view()->isAcceleratedCompositingActive(), true);
+ DCHECK(frame_->view()->isAcceleratedCompositingActive());
UMA_HISTOGRAM_BOOLEAN("Media.AcceleratedCompositingActive", true);
}
if (web_video_frame) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698