diff options
author | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-21 22:54:32 +0000 |
---|---|---|
committer | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-21 22:54:32 +0000 |
commit | 3dc8f1b1cfb7c919d78a2325d72571176c2096b9 (patch) | |
tree | c9eef7b9e5bbb340cbd7ccacf0774d538cdb200d /webkit/media/webmediaplayer_impl.cc | |
parent | bb4c5fb067dcc8b62557293eb0dc4bab0384230a (diff) | |
download | chromium_src-3dc8f1b1cfb7c919d78a2325d72571176c2096b9.zip chromium_src-3dc8f1b1cfb7c919d78a2325d72571176c2096b9.tar.gz chromium_src-3dc8f1b1cfb7c919d78a2325d72571176c2096b9.tar.bz2 |
Fix crash in UMA reporting of accelerated compositing in WebGL codepaths.
BUG=129030
TEST=fast/canvas/webgl/ layouttests all pass
Review URL: https://chromiumcodereview.appspot.com/10332275
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138160 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media/webmediaplayer_impl.cc')
-rw-r--r-- | webkit/media/webmediaplayer_impl.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc index 2fabfd6..657d9ff 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) { |