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

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

Issue 8913015: Win: only use transport surface if EGL_ANGLE_d3d_share_handle_client_buffer is advertised. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years 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
« no previous file with comments | « no previous file | ui/gfx/gl/generate_bindings.py » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "content/common/gpu/image_transport_surface.h" 7 #include "content/common/gpu/image_transport_surface.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 GpuChannelManager* manager, 187 GpuChannelManager* manager,
188 int32 render_view_id, 188 int32 render_view_id,
189 int32 renderer_id, 189 int32 renderer_id,
190 int32 command_buffer_id, 190 int32 command_buffer_id,
191 gfx::PluginWindowHandle handle) { 191 gfx::PluginWindowHandle handle) {
192 scoped_refptr<gfx::GLSurface> surface; 192 scoped_refptr<gfx::GLSurface> surface;
193 193
194 base::win::OSInfo* os_info = base::win::OSInfo::GetInstance(); 194 base::win::OSInfo* os_info = base::win::OSInfo::GetInstance();
195 195
196 if (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2 && 196 if (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2 &&
197 os_info->version() >= base::win::VERSION_VISTA && 197 gfx::g_EGL_ANGLE_query_surface_pointer &&
198 gfx::g_EGL_ANGLE_d3d_share_handle_client_buffer &&
198 !CommandLine::ForCurrentProcess()->HasSwitch( 199 !CommandLine::ForCurrentProcess()->HasSwitch(
199 switches::kDisableImageTransportSurface)) { 200 switches::kDisableImageTransportSurface)) {
200 surface = new PbufferImageTransportSurface(manager, 201 surface = new PbufferImageTransportSurface(manager,
201 render_view_id, 202 render_view_id,
202 renderer_id, 203 renderer_id,
203 command_buffer_id); 204 command_buffer_id);
204 } else { 205 } else {
205 surface = gfx::GLSurface::CreateViewGLSurface(false, handle); 206 surface = gfx::GLSurface::CreateViewGLSurface(false, handle);
206 if (!surface.get()) 207 if (!surface.get())
207 return NULL; 208 return NULL;
208 209
209 surface = new PassThroughImageTransportSurface(manager, 210 surface = new PassThroughImageTransportSurface(manager,
210 render_view_id, 211 render_view_id,
211 renderer_id, 212 renderer_id,
212 command_buffer_id, 213 command_buffer_id,
213 surface.get()); 214 surface.get());
214 } 215 }
215 216
216 if (surface->Initialize()) 217 if (surface->Initialize())
217 return surface; 218 return surface;
218 else 219 else
219 return NULL; 220 return NULL;
220 } 221 }
221 222
222 #endif // ENABLE_GPU 223 #endif // ENABLE_GPU
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/gl/generate_bindings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698