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

Side by Side Diff: content/common/gpu/image_transport_surface.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 16 matching lines...) Expand all
27 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface( 27 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
28 GpuChannelManager* manager, 28 GpuChannelManager* manager,
29 GpuCommandBufferStub* stub, 29 GpuCommandBufferStub* stub,
30 const gfx::GLSurfaceHandle& handle) { 30 const gfx::GLSurfaceHandle& handle) {
31 scoped_refptr<gfx::GLSurface> surface; 31 scoped_refptr<gfx::GLSurface> surface;
32 if (handle.transport_type == gfx::TEXTURE_TRANSPORT) 32 if (handle.transport_type == gfx::TEXTURE_TRANSPORT)
33 surface = new TextureImageTransportSurface(manager, stub, handle); 33 surface = new TextureImageTransportSurface(manager, stub, handle);
34 else 34 else
35 surface = CreateNativeSurface(manager, stub, handle); 35 surface = CreateNativeSurface(manager, stub, handle);
36 36
37 if (!surface || !surface->Initialize()) 37 if (!surface.get() || !surface->Initialize())
38 return NULL; 38 return NULL;
39 return surface; 39 return surface;
40 } 40 }
41 41
42 ImageTransportHelper::ImageTransportHelper(ImageTransportSurface* surface, 42 ImageTransportHelper::ImageTransportHelper(ImageTransportSurface* surface,
43 GpuChannelManager* manager, 43 GpuChannelManager* manager,
44 GpuCommandBufferStub* stub, 44 GpuCommandBufferStub* stub,
45 gfx::PluginWindowHandle handle) 45 gfx::PluginWindowHandle handle)
46 : surface_(surface), 46 : surface_(surface),
47 manager_(manager), 47 manager_(manager),
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 void PassThroughImageTransportSurface::SendVSyncUpdateIfAvailable() { 349 void PassThroughImageTransportSurface::SendVSyncUpdateIfAvailable() {
350 gfx::VSyncProvider* vsync_provider = GetVSyncProvider(); 350 gfx::VSyncProvider* vsync_provider = GetVSyncProvider();
351 if (vsync_provider) { 351 if (vsync_provider) {
352 vsync_provider->GetVSyncParameters( 352 vsync_provider->GetVSyncParameters(
353 base::Bind(&ImageTransportHelper::SendUpdateVSyncParameters, 353 base::Bind(&ImageTransportHelper::SendUpdateVSyncParameters,
354 helper_->AsWeakPtr())); 354 helper_->AsWeakPtr()));
355 } 355 }
356 } 356 }
357 357
358 } // namespace content 358 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_memory_manager_unittest.cc ('k') | content/common/gpu/image_transport_surface_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698