Commit 7707e972 authored by dcheng's avatar dcheng Committed by Commit bot

Remove implicit conversions from scoped_refptr to T* in content/browser/media/

This patch was generated by running the rewrite_scoped_refptr clang tool
on a Linux build.

BUG=110610

Review URL: https://codereview.chromium.org/506903003

Cr-Commit-Position: refs/heads/master@{#291965}
parent 3c331bb5
...@@ -89,14 +89,14 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture( ...@@ -89,14 +89,14 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
"paint")); "paint"));
// Consider the various reasons not to initiate a capture. // Consider the various reasons not to initiate a capture.
if (should_capture && !output_buffer) { if (should_capture && !output_buffer.get()) {
TRACE_EVENT_INSTANT1("mirroring", TRACE_EVENT_INSTANT1("mirroring",
"PipelineLimited", "PipelineLimited",
TRACE_EVENT_SCOPE_THREAD, TRACE_EVENT_SCOPE_THREAD,
"trigger", "trigger",
event_name); event_name);
return false; return false;
} else if (!should_capture && output_buffer) { } else if (!should_capture && output_buffer.get()) {
if (content_is_dirty) { if (content_is_dirty) {
// This is a normal and acceptable way to drop a frame. We've hit our // This is a normal and acceptable way to drop a frame. We've hit our
// capture rate limit: for example, the content is animating at 60fps but // capture rate limit: for example, the content is animating at 60fps but
...@@ -106,7 +106,7 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture( ...@@ -106,7 +106,7 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
"trigger", event_name); "trigger", event_name);
} }
return false; return false;
} else if (!should_capture && !output_buffer) { } else if (!should_capture && !output_buffer.get()) {
// We decided not to capture, but we wouldn't have been able to if we wanted // We decided not to capture, but we wouldn't have been able to if we wanted
// to because no output buffer was available. // to because no output buffer was available.
TRACE_EVENT_INSTANT1("mirroring", "NearlyPipelineLimited", TRACE_EVENT_INSTANT1("mirroring", "NearlyPipelineLimited",
...@@ -334,7 +334,7 @@ void ContentVideoCaptureDeviceCore::Error(const std::string& reason) { ...@@ -334,7 +334,7 @@ void ContentVideoCaptureDeviceCore::Error(const std::string& reason) {
if (state_ == kIdle) if (state_ == kIdle)
return; return;
if (oracle_proxy_) if (oracle_proxy_.get())
oracle_proxy_->ReportError(reason); oracle_proxy_->ReportError(reason);
StopAndDeAllocate(); StopAndDeAllocate();
......
...@@ -47,7 +47,7 @@ void RenderCursorOnVideoFrame( ...@@ -47,7 +47,7 @@ void RenderCursorOnVideoFrame(
const scoped_refptr<media::VideoFrame>& target, const scoped_refptr<media::VideoFrame>& target,
const SkBitmap& cursor_bitmap, const SkBitmap& cursor_bitmap,
const gfx::Point& cursor_position) { const gfx::Point& cursor_position) {
DCHECK(target); DCHECK(target.get());
DCHECK(!cursor_bitmap.isNull()); DCHECK(!cursor_bitmap.isNull());
gfx::Rect rect = gfx::IntersectRects( gfx::Rect rect = gfx::IntersectRects(
...@@ -253,7 +253,7 @@ void DesktopVideoCaptureMachine::Stop(const base::Closure& callback) { ...@@ -253,7 +253,7 @@ void DesktopVideoCaptureMachine::Stop(const base::Closure& callback) {
void DesktopVideoCaptureMachine::UpdateCaptureSize() { void DesktopVideoCaptureMachine::UpdateCaptureSize() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (oracle_proxy_ && desktop_window_) { if (oracle_proxy_.get() && desktop_window_) {
ui::Layer* layer = desktop_window_->layer(); ui::Layer* layer = desktop_window_->layer();
gfx::Size capture_size = gfx::Size capture_size =
ui::ConvertSizeToPixel(layer, layer->bounds().size()); ui::ConvertSizeToPixel(layer, layer->bounds().size());
...@@ -354,7 +354,7 @@ bool DesktopVideoCaptureMachine::ProcessCopyOutputResponse( ...@@ -354,7 +354,7 @@ bool DesktopVideoCaptureMachine::ProcessCopyOutputResponse(
if (capture_params_.requested_format.pixel_format == if (capture_params_.requested_format.pixel_format ==
media::PIXEL_FORMAT_TEXTURE) { media::PIXEL_FORMAT_TEXTURE) {
DCHECK(!video_frame); DCHECK(!video_frame.get());
cc::TextureMailbox texture_mailbox; cc::TextureMailbox texture_mailbox;
scoped_ptr<cc::SingleReleaseCallback> release_callback; scoped_ptr<cc::SingleReleaseCallback> release_callback;
result->TakeTexture(&texture_mailbox, &release_callback); result->TakeTexture(&texture_mailbox, &release_callback);
......
...@@ -93,7 +93,8 @@ class WebRtcGetUserMediaBrowserTest: public WebRtcContentBrowserTest { ...@@ -93,7 +93,8 @@ class WebRtcGetUserMediaBrowserTest: public WebRtcContentBrowserTest {
} }
void StopTracing() { void StopTracing() {
CHECK(message_loop_runner_ == NULL) << "Calling StopTracing more than once"; CHECK(message_loop_runner_.get() == NULL)
<< "Calling StopTracing more than once";
trace_log_->SetDisabled(); trace_log_->SetDisabled();
message_loop_runner_ = new MessageLoopRunner; message_loop_runner_ = new MessageLoopRunner;
trace_log_->Flush(base::Bind( trace_log_->Flush(base::Bind(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment