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(
"paint"));
// Consider the various reasons not to initiate a capture.
if (should_capture && !output_buffer) {
if (should_capture && !output_buffer.get()) {
TRACE_EVENT_INSTANT1("mirroring",
"PipelineLimited",
TRACE_EVENT_SCOPE_THREAD,
"trigger",
event_name);
return false;
} else if (!should_capture && output_buffer) {
} else if (!should_capture && output_buffer.get()) {
if (content_is_dirty) {
// 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
......@@ -106,7 +106,7 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
"trigger", event_name);
}
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
// to because no output buffer was available.
TRACE_EVENT_INSTANT1("mirroring", "NearlyPipelineLimited",
......@@ -334,7 +334,7 @@ void ContentVideoCaptureDeviceCore::Error(const std::string& reason) {
if (state_ == kIdle)
return;
if (oracle_proxy_)
if (oracle_proxy_.get())
oracle_proxy_->ReportError(reason);
StopAndDeAllocate();
......
......@@ -47,7 +47,7 @@ void RenderCursorOnVideoFrame(
const scoped_refptr<media::VideoFrame>& target,
const SkBitmap& cursor_bitmap,
const gfx::Point& cursor_position) {
DCHECK(target);
DCHECK(target.get());
DCHECK(!cursor_bitmap.isNull());
gfx::Rect rect = gfx::IntersectRects(
......@@ -253,7 +253,7 @@ void DesktopVideoCaptureMachine::Stop(const base::Closure& callback) {
void DesktopVideoCaptureMachine::UpdateCaptureSize() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (oracle_proxy_ && desktop_window_) {
if (oracle_proxy_.get() && desktop_window_) {
ui::Layer* layer = desktop_window_->layer();
gfx::Size capture_size =
ui::ConvertSizeToPixel(layer, layer->bounds().size());
......@@ -354,7 +354,7 @@ bool DesktopVideoCaptureMachine::ProcessCopyOutputResponse(
if (capture_params_.requested_format.pixel_format ==
media::PIXEL_FORMAT_TEXTURE) {
DCHECK(!video_frame);
DCHECK(!video_frame.get());
cc::TextureMailbox texture_mailbox;
scoped_ptr<cc::SingleReleaseCallback> release_callback;
result->TakeTexture(&texture_mailbox, &release_callback);
......
......@@ -93,7 +93,8 @@ class WebRtcGetUserMediaBrowserTest: public WebRtcContentBrowserTest {
}
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();
message_loop_runner_ = new MessageLoopRunner;
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