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

Side by Side Diff: gpu/ipc/service/image_transport_surface_win.cc

Issue 2907753002: Limit D3D V-sync experiment to Win 8.1+ (Closed)
Patch Set: Created 3 years, 7 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 | « content/browser/compositor/gpu_process_transport_factory.cc ('k') | no next file » | 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 "gpu/ipc/service/image_transport_surface.h" 5 #include "gpu/ipc/service/image_transport_surface.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
11 #include "gpu/ipc/service/child_window_surface_win.h" 11 #include "gpu/ipc/service/child_window_surface_win.h"
12 #include "gpu/ipc/service/direct_composition_surface_win.h" 12 #include "gpu/ipc/service/direct_composition_surface_win.h"
13 #include "gpu/ipc/service/gpu_vsync_provider_win.h" 13 #include "gpu/ipc/service/gpu_vsync_provider_win.h"
14 #include "gpu/ipc/service/pass_through_image_transport_surface.h" 14 #include "gpu/ipc/service/pass_through_image_transport_surface.h"
15 #include "gpu/ipc/service/switches.h" 15 #include "gpu/ipc/service/switches.h"
16 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
17 #include "ui/gl/gl_bindings.h" 17 #include "ui/gl/gl_bindings.h"
18 #include "ui/gl/gl_implementation.h" 18 #include "ui/gl/gl_implementation.h"
19 #include "ui/gl/gl_surface_egl.h" 19 #include "ui/gl/gl_surface_egl.h"
20 #include "ui/gl/gl_switches.h" 20 #include "ui/gl/gl_switches.h"
21 #include "ui/gl/init/gl_factory.h" 21 #include "ui/gl/init/gl_factory.h"
22 #include "ui/gl/vsync_provider_win.h" 22 #include "ui/gl/vsync_provider_win.h"
23 23
24 namespace gpu { 24 namespace gpu {
25 25
26 namespace { 26 namespace {
27 bool IsGpuVSyncSignalSupported() { 27 bool IsGpuVSyncSignalSupported() {
28 // TODO(stanisc): http://crbug.com/467617 Limit to Windows 8+ for now because 28 // TODO(stanisc): http://crbug.com/467617 Limit to Windows 8.1+ for now
29 // of locking issue caused by waiting for VSync on Win7. 29 // because of locking issue caused by waiting for VSync on Win7 and Win 8.0.
30 return base::win::GetVersion() >= base::win::VERSION_WIN8 && 30 return base::win::GetVersion() >= base::win::VERSION_WIN8_1 &&
31 base::FeatureList::IsEnabled(features::kD3DVsync); 31 base::FeatureList::IsEnabled(features::kD3DVsync);
32 } 32 }
33 33
34 } // namespace 34 } // namespace
35 35
36 // static 36 // static
37 scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface( 37 scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface(
38 base::WeakPtr<ImageTransportSurfaceDelegate> delegate, 38 base::WeakPtr<ImageTransportSurfaceDelegate> delegate,
39 SurfaceHandle surface_handle, 39 SurfaceHandle surface_handle,
40 gl::GLSurfaceFormat format) { 40 gl::GLSurfaceFormat format) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 surface = gl::init::CreateViewGLSurface(surface_handle); 85 surface = gl::init::CreateViewGLSurface(surface_handle);
86 if (!surface) 86 if (!surface)
87 return nullptr; 87 return nullptr;
88 } 88 }
89 89
90 return scoped_refptr<gl::GLSurface>(new PassThroughImageTransportSurface( 90 return scoped_refptr<gl::GLSurface>(new PassThroughImageTransportSurface(
91 delegate, surface.get(), multi_window_swap_interval)); 91 delegate, surface.get(), multi_window_swap_interval));
92 } 92 }
93 93
94 } // namespace gpu 94 } // namespace gpu
OLDNEW
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698