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

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

Issue 11824040: Enables compositing support for webview. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed build error on mac and win, nits Created 7 years, 11 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
« no previous file with comments | « cc/resource_provider.cc ('k') | content/common/gpu/image_transport_surface_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/common/gpu/texture_image_transport_surface.h" 7 #include "content/common/gpu/texture_image_transport_surface.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 // static 11 // static
12 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface( 12 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
13 GpuChannelManager* manager, 13 GpuChannelManager* manager,
14 GpuCommandBufferStub* stub, 14 GpuCommandBufferStub* stub,
15 const gfx::GLSurfaceHandle& handle) { 15 const gfx::GLSurfaceHandle& handle) {
16 scoped_refptr<gfx::GLSurface> surface; 16 scoped_refptr<gfx::GLSurface> surface;
17 if (!handle.handle) { 17 if (!handle.handle) {
18 DCHECK(handle.transport); 18 DCHECK(handle.transport);
19 DCHECK(handle.parent_client_id);
20 surface = new TextureImageTransportSurface(manager, stub, handle); 19 surface = new TextureImageTransportSurface(manager, stub, handle);
21 } else { 20 } else {
22 surface = gfx::GLSurface::CreateViewGLSurface(false, handle.handle); 21 surface = gfx::GLSurface::CreateViewGLSurface(false, handle.handle);
23 if (!surface.get()) 22 if (!surface.get())
24 return NULL; 23 return NULL;
25 surface = new PassThroughImageTransportSurface(manager, 24 surface = new PassThroughImageTransportSurface(manager,
26 stub, 25 stub,
27 surface.get(), 26 surface.get(),
28 handle.transport); 27 handle.transport);
29 } 28 }
30 29
31 if (surface->Initialize()) 30 if (surface->Initialize())
32 return surface; 31 return surface;
33 else 32 else
34 return NULL; 33 return NULL;
35 } 34 }
36 35
37 } // namespace content 36 } // namespace content
OLDNEW
« no previous file with comments | « cc/resource_provider.cc ('k') | content/common/gpu/image_transport_surface_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698