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

Side by Side Diff: content/common/gpu/image_transport_surface_linux.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, 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/gpu/image_transport_surface.h" 5 #include "content/common/gpu/image_transport_surface.h"
6 6
7 namespace content { 7 namespace content {
8 8
9 // static 9 // static
10 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( 10 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface(
11 GpuChannelManager* manager, 11 GpuChannelManager* manager,
12 GpuCommandBufferStub* stub, 12 GpuCommandBufferStub* stub,
13 const gfx::GLSurfaceHandle& handle) { 13 const gfx::GLSurfaceHandle& handle) {
14 DCHECK(handle.handle); 14 DCHECK(handle.handle);
15 DCHECK(handle.transport_type == gfx::NATIVE_DIRECT || 15 DCHECK(handle.transport_type == gfx::NATIVE_DIRECT ||
16 handle.transport_type == gfx::NATIVE_TRANSPORT); 16 handle.transport_type == gfx::NATIVE_TRANSPORT);
17 scoped_refptr<gfx::GLSurface> surface = 17 scoped_refptr<gfx::GLSurface> surface =
18 gfx::GLSurface::CreateViewGLSurface(false, handle.handle); 18 gfx::GLSurface::CreateViewGLSurface(false, handle.handle);
19 if (!surface) 19 if (!surface.get())
20 return surface; 20 return surface;
21 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( 21 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface(
22 manager, stub, surface.get(), handle.is_transport())); 22 manager, stub, surface.get(), handle.is_transport()));
23 } 23 }
24 24
25 } // namespace content 25 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface.cc ('k') | content/common/gpu/texture_image_transport_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698