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

Side by Side Diff: webkit/media/webmediaplayer_impl.cc

Issue 10387202: Fix reporting of Media.AcceleratedCompositingActive when false. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/media/webmediaplayer_impl.h" 5 #include "webkit/media/webmediaplayer_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 const WebKit::WebRect& rect) { 494 const WebKit::WebRect& rect) {
495 paint(canvas, rect, 0xFF); 495 paint(canvas, rect, 0xFF);
496 } 496 }
497 497
498 void WebMediaPlayerImpl::paint(WebCanvas* canvas, 498 void WebMediaPlayerImpl::paint(WebCanvas* canvas,
499 const WebRect& rect, 499 const WebRect& rect,
500 uint8_t alpha) { 500 uint8_t alpha) {
501 DCHECK_EQ(main_loop_, MessageLoop::current()); 501 DCHECK_EQ(main_loop_, MessageLoop::current());
502 DCHECK(proxy_); 502 DCHECK(proxy_);
503 503
504 if (!accelerated_compositing_reported_) {
505 accelerated_compositing_reported_ = true;
506 UMA_HISTOGRAM_BOOLEAN("Media.AcceleratedCompositingActive",
507 frame_->view()->isAcceleratedCompositingActive());
Ami GONE FROM CHROMIUM 2012/05/19 01:25:32 Could also just use false here (and true at the ot
scherkus (not reviewing) 2012/05/19 02:09:31 report false + comment w/ DCHECK to be safe and ca
Ami GONE FROM CHROMIUM 2012/05/19 02:48:24 Done.
508 }
509
504 proxy_->Paint(canvas, rect, alpha); 510 proxy_->Paint(canvas, rect, alpha);
505 } 511 }
506 512
507 bool WebMediaPlayerImpl::hasSingleSecurityOrigin() const { 513 bool WebMediaPlayerImpl::hasSingleSecurityOrigin() const {
508 if (proxy_) 514 if (proxy_)
509 return proxy_->HasSingleOrigin(); 515 return proxy_->HasSingleOrigin();
510 return true; 516 return true;
511 } 517 }
512 518
513 WebMediaPlayer::MovieLoadType WebMediaPlayerImpl::movieLoadType() const { 519 WebMediaPlayer::MovieLoadType WebMediaPlayerImpl::movieLoadType() const {
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 return audio_source_provider_; 1021 return audio_source_provider_;
1016 } 1022 }
1017 1023
1018 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() { 1024 void WebMediaPlayerImpl::IncrementExternallyAllocatedMemory() {
1019 DCHECK_EQ(main_loop_, MessageLoop::current()); 1025 DCHECK_EQ(main_loop_, MessageLoop::current());
1020 incremented_externally_allocated_memory_ = true; 1026 incremented_externally_allocated_memory_ = true;
1021 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory); 1027 v8::V8::AdjustAmountOfExternalAllocatedMemory(kPlayerExtraMemory);
1022 } 1028 }
1023 1029
1024 } // namespace webkit_media 1030 } // namespace webkit_media
OLDNEW
« 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