Commit 91af9a88 authored by tiago.vignatti's avatar tiago.vignatti Committed by Commit bot

Fix more uses of T* conversion operator from scoped_refptr<T> which is now removed

Fix more uses of T* conversion operator from scoped_refptr<T> which is now removed.

Please see https://codereview.chromium.org/510323002 for reference.

TEST=ozone_demo and content_shell under Ozone-GBM
BUG=none
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#294172}
parent 2c53e25a
......@@ -86,14 +86,14 @@ class DemoWindow : public ui::PlatformWindowDelegate {
private:
bool InitializeGLSurface() {
surface_ = gfx::GLSurface::CreateViewGLSurface(GetAcceleratedWidget());
if (!surface_) {
if (!surface_.get()) {
LOG(ERROR) << "Failed to create GL surface";
return false;
}
context_ = gfx::GLContext::CreateGLContext(
NULL, surface_.get(), gfx::PreferIntegratedGpu);
if (!context_) {
if (!context_.get()) {
LOG(ERROR) << "Failed to create GL context";
surface_ = NULL;
return false;
......
......@@ -135,9 +135,9 @@ bool GbmSurface::OnSwapBuffers() {
gbm_bo* pending_buffer = gbm_surface_lock_front_buffer(native_surface_);
scoped_refptr<GbmSurfaceBuffer> primary =
GbmSurfaceBuffer::GetBuffer(pending_buffer);
if (!primary) {
if (!primary.get()) {
primary = GbmSurfaceBuffer::CreateBuffer(dri_, pending_buffer);
if (!primary) {
if (!primary.get()) {
LOG(ERROR) << "Failed to associate the buffer with the controller";
return false;
}
......
......@@ -174,7 +174,7 @@ scoped_refptr<ui::NativePixmap> GbmSurfaceFactory::CreateNativePixmap(
BufferFormat format) {
scoped_refptr<GbmBuffer> buffer = GbmBuffer::CreateBuffer(
drm_, device_, format, size, true);
if (!buffer)
if (!buffer.get())
return NULL;
return scoped_refptr<GbmPixmap>(new GbmPixmap(buffer));
......@@ -196,7 +196,7 @@ bool GbmSurfaceFactory::ScheduleOverlayPlane(
const gfx::Rect& display_bounds,
const gfx::RectF& crop_rect) {
scoped_refptr<GbmPixmap> pixmap = static_cast<GbmPixmap*>(buffer.get());
if (!pixmap) {
if (!pixmap.get()) {
LOG(ERROR) << "ScheduleOverlayPlane passed NULL buffer.";
return false;
}
......
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