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

Side by Side Diff: content/common/gpu/image_transport_surface_android.cc

Issue 11227033: Move a bunch of code in content\common (as well as a few left in renderer) to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 2 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/logging.h" 7 #include "base/logging.h"
8 #include "content/common/gpu/gpu_surface_lookup.h" 8 #include "content/common/gpu/gpu_surface_lookup.h"
9 #include "content/common/gpu/texture_image_transport_surface.h" 9 #include "content/common/gpu/texture_image_transport_surface.h"
10 #include "ui/gl/gl_surface_egl.h" 10 #include "ui/gl/gl_surface_egl.h"
11 11
12 namespace content {
13
12 // static 14 // static
13 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface( 15 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
14 GpuChannelManager* manager, 16 GpuChannelManager* manager,
15 GpuCommandBufferStub* stub, 17 GpuCommandBufferStub* stub,
16 const gfx::GLSurfaceHandle& handle) { 18 const gfx::GLSurfaceHandle& handle) {
17 scoped_refptr<gfx::GLSurface> surface; 19 scoped_refptr<gfx::GLSurface> surface;
18 if (!handle.handle && handle.transport) { 20 if (!handle.handle && handle.transport) {
19 DCHECK(handle.parent_client_id); 21 DCHECK(handle.parent_client_id);
20 surface = new TextureImageTransportSurface(manager, stub, handle); 22 surface = new TextureImageTransportSurface(manager, stub, handle);
21 } else if (handle.handle == gfx::kDummyPluginWindow && !handle.transport) { 23 } else if (handle.handle == gfx::kDummyPluginWindow && !handle.transport) {
(...skipping 12 matching lines...) Expand all
34 return NULL; 36 return NULL;
35 } 37 }
36 38
37 if (surface->Initialize()) 39 if (surface->Initialize())
38 return surface; 40 return surface;
39 else { 41 else {
40 LOG(ERROR) << "Failed to initialize ImageTransportSurface"; 42 LOG(ERROR) << "Failed to initialize ImageTransportSurface";
41 return NULL; 43 return NULL;
42 } 44 }
43 } 45 }
46
47 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface.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