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

Unified Diff: content/browser/renderer_host/compositing_iosurface_mac.mm

Issue 18346006: Update OS X 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, 6 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/compositing_iosurface_mac.mm
diff --git a/content/browser/renderer_host/compositing_iosurface_mac.mm b/content/browser/renderer_host/compositing_iosurface_mac.mm
index b64152e143342895c727524b319ede4a976b5eee..03e235e4db7713d34a89862cce454405755733f2 100644
--- a/content/browser/renderer_host/compositing_iosurface_mac.mm
+++ b/content/browser/renderer_host/compositing_iosurface_mac.mm
@@ -124,7 +124,7 @@ bool MapBufferToVideoFrame(
// letterboxing/pillarboxing). Only do this once, since this is performed on
// all planes in the VideoFrame here.
if (plane == 0)
- media::LetterboxYUV(target, region_in_frame);
+ media::LetterboxYUV(target.get(), region_in_frame);
if (buf) {
int packed_width = region_in_frame.width();
@@ -248,7 +248,7 @@ CompositingIOSurfaceMac* CompositingIOSurfaceMac::Create(int window_number) {
scoped_refptr<CompositingIOSurfaceContext> context =
CompositingIOSurfaceContext::Get(window_number);
- if (!context) {
+ if (!context.get()) {
LOG(ERROR) << "Failed to create context for IOSurface";
return NULL;
}
@@ -347,7 +347,7 @@ void CompositingIOSurfaceMac::SwitchToContextOnNewWindow(NSView* view,
scoped_refptr<CompositingIOSurfaceContext> new_context =
CompositingIOSurfaceContext::Get(window_number);
- if (!new_context)
+ if (!new_context.get())
return;
// Having two NSOpenGLContexts bound to an NSView concurrently will cause
@@ -821,7 +821,7 @@ base::Closure CompositingIOSurfaceMac::CopyToSelectedOutputWithinContext(
const SkBitmap* bitmap_output,
const scoped_refptr<media::VideoFrame>& video_frame_output,
const base::Callback<void(bool)>& done_callback) {
- DCHECK_NE(bitmap_output != NULL, video_frame_output != NULL);
+ DCHECK_NE(bitmap_output != NULL, video_frame_output.get() != NULL);
DCHECK(!done_callback.is_null());
const bool async_copy = IsAsynchronousReadbackSupported();
@@ -1063,10 +1063,10 @@ bool CompositingIOSurfaceMac::SynchronousReadbackForCopy(
copy_context->output_texture_sizes[i].height(),
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
buf); CHECK_AND_SAVE_GL_ERROR();
- if (video_frame_output) {
+ if (video_frame_output.get()) {
if (!temp_readback_buffer) {
// Apply letterbox black-out around view region.
- media::LetterboxYUV(video_frame_output, dst_pixel_rect);
+ media::LetterboxYUV(video_frame_output.get(), dst_pixel_rect);
} else {
// Copy from temporary buffer and fully render the VideoFrame.
success &= MapBufferToVideoFrame(video_frame_output, dst_pixel_rect,

Powered by Google App Engine
This is Rietveld 408576698