OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |