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

Unified Diff: content/browser/renderer_host/media/web_contents_video_capture_device.cc

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/web_contents_video_capture_device.cc
diff --git a/content/browser/renderer_host/media/web_contents_video_capture_device.cc b/content/browser/renderer_host/media/web_contents_video_capture_device.cc
index 0ec99a6db77430fbf1e2e60c8fe9f1b251d068ab..9fcd0ed33711a461866916dd1b3a699e9993a3a3 100644
--- a/content/browser/renderer_host/media/web_contents_video_capture_device.cc
+++ b/content/browser/renderer_host/media/web_contents_video_capture_device.cc
@@ -438,12 +438,14 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
"paint"));
// Consider the various reasons not to initiate a capture.
- if (should_capture && !output_buffer) {
- TRACE_EVENT_INSTANT1("mirroring", "EncodeLimited",
+ if (should_capture && !output_buffer.get()) {
+ TRACE_EVENT_INSTANT1("mirroring",
+ "EncodeLimited",
TRACE_EVENT_SCOPE_THREAD,
- "trigger", event_name);
+ "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
@@ -453,7 +455,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", "NearlyEncodeLimited",
@@ -686,7 +688,7 @@ void RenderVideoFrame(const SkBitmap& input,
reinterpret_cast<uint8*>(scaled_bitmap.getPixels()),
scaled_bitmap.rowBytes(),
region_in_frame,
- output);
+ output.get());
}
// The result is now ready.
@@ -740,8 +742,8 @@ scoped_ptr<CaptureMachine> CaptureMachine::Create(
const scoped_refptr<base::SequencedTaskRunner>& render_task_runner,
const scoped_refptr<ThreadSafeCaptureOracle>& oracle_proxy) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(render_task_runner);
- DCHECK(oracle_proxy);
+ DCHECK(render_task_runner.get());
+ DCHECK(oracle_proxy.get());
scoped_ptr<CaptureMachine> machine(
new CaptureMachine(render_task_runner, oracle_proxy));

Powered by Google App Engine
This is Rietveld 408576698