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

Unified Diff: content/browser/renderer_host/compositing_iosurface_layer_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_layer_mac.mm
diff --git a/content/browser/renderer_host/compositing_iosurface_layer_mac.mm b/content/browser/renderer_host/compositing_iosurface_layer_mac.mm
index a787de08fa69102ac47c32f59adc52b80276436b..10b0727e2e3b50456e160e92ea7bc724891d4249 100644
--- a/content/browser/renderer_host/compositing_iosurface_layer_mac.mm
+++ b/content/browser/renderer_host/compositing_iosurface_layer_mac.mm
@@ -35,7 +35,7 @@
}
- (BOOL)ensureContext {
- if (context_)
+ if (context_.get())
return YES;
if (!renderWidgetHostView_)
@@ -46,12 +46,12 @@
[context_->nsgl_context() clearDrawable];
}
- if (!context_) {
+ if (!context_.get()) {
context_ = content::CompositingIOSurfaceContext::Get(
renderWidgetHostView_->window_number());
}
- return context_ ? YES : NO;
+ return context_.get() ? YES : NO;
}
- (void)updateScaleFactor {
@@ -89,7 +89,7 @@
}
- (void)releaseCGLContext:(CGLContextObj)glContext {
- if (!context_)
+ if (!context_.get())
return;
DCHECK(glContext == context_->cgl_context());
@@ -100,7 +100,7 @@
pixelFormat:(CGLPixelFormatObj)pixelFormat
forLayerTime:(CFTimeInterval)timeInterval
displayTime:(const CVTimeStamp*)timeStamp {
- if (!context_ || !renderWidgetHostView_ ||
+ if (!context_.get() || !renderWidgetHostView_ ||
!renderWidgetHostView_->compositing_iosurface_) {
glClearColor(1, 1, 1, 1);
glClear(GL_COLOR_BUFFER_BIT);

Powered by Google App Engine
This is Rietveld 408576698