Index: content/common/gpu/image_transport_surface_android.cc |
diff --git a/content/common/gpu/image_transport_surface_android.cc b/content/common/gpu/image_transport_surface_android.cc |
index f476f7554c472a8589fe08616dfd27da0ee4d72c..c5ab374fce7db5e187022138265280731dac4140 100644 |
--- a/content/common/gpu/image_transport_surface_android.cc |
+++ b/content/common/gpu/image_transport_surface_android.cc |
@@ -23,9 +23,8 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface( |
DCHECK(GpuSurfaceLookup::GetInstance()); |
ANativeWindow* window = GpuSurfaceLookup::GetInstance()->GetNativeWidget( |
stub->surface_id()); |
- DCHECK(window); |
surface = new gfx::NativeViewGLSurfaceEGL(false, window); |
- if (!surface.get() || !surface->Initialize()) |
+ if (!surface->Initialize()) |
boliu
2013/01/26 01:18:00
I moved the DCHECK into Initialize() to make it re
|
return NULL; |
surface = new PassThroughImageTransportSurface( |
@@ -35,9 +34,9 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface( |
return NULL; |
} |
- if (surface->Initialize()) |
+ if (surface->Initialize()) { |
return surface; |
- else { |
+ } else { |
LOG(ERROR) << "Failed to initialize ImageTransportSurface"; |
return NULL; |
} |