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

Unified Diff: gpu/ipc/service/image_transport_surface_win.cc

Issue 2933453002: Always use DirectCompositionSurfaceWin when using DirectComposition (Closed)
Patch Set: post-review fixes Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/ipc/service/gpu_init.cc ('k') | ui/gl/gl_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/image_transport_surface_win.cc
diff --git a/gpu/ipc/service/image_transport_surface_win.cc b/gpu/ipc/service/image_transport_surface_win.cc
index d4b5f75e6cb3c3e8ef1c0b2d19c7e559f89794a6..faefd5257b6213bf15e813e5eed2b6b4c4d7790d 100644
--- a/gpu/ipc/service/image_transport_surface_win.cc
+++ b/gpu/ipc/service/image_transport_surface_win.cc
@@ -6,9 +6,7 @@
#include <memory>
-#include "base/metrics/histogram_macros.h"
#include "base/win/windows_version.h"
-#include "gpu/ipc/service/child_window_surface_win.h"
#include "gpu/ipc/service/direct_composition_surface_win.h"
#include "gpu/ipc/service/gpu_vsync_provider_win.h"
#include "gpu/ipc/service/pass_through_image_transport_surface.h"
@@ -52,25 +50,12 @@ scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface(
vsync_provider.reset(new gl::VSyncProviderWin(surface_handle));
if (gl::GLSurfaceEGL::IsDirectCompositionSupported()) {
- bool overlays_supported =
- DirectCompositionSurfaceWin::AreOverlaysSupported();
- UMA_HISTOGRAM_BOOLEAN("GPU.DirectComposition.OverlaysSupported",
- overlays_supported);
- if (overlays_supported) {
- scoped_refptr<DirectCompositionSurfaceWin> egl_surface =
- make_scoped_refptr(new DirectCompositionSurfaceWin(
- std::move(vsync_provider), delegate, surface_handle));
- if (!egl_surface->Initialize())
- return nullptr;
- surface = egl_surface;
- } else {
- scoped_refptr<ChildWindowSurfaceWin> egl_surface =
- make_scoped_refptr(new ChildWindowSurfaceWin(
- std::move(vsync_provider), delegate, surface_handle));
- if (!egl_surface->Initialize())
- return nullptr;
- surface = egl_surface;
- }
+ scoped_refptr<DirectCompositionSurfaceWin> egl_surface =
+ make_scoped_refptr(new DirectCompositionSurfaceWin(
+ std::move(vsync_provider), delegate, surface_handle));
+ if (!egl_surface->Initialize())
+ return nullptr;
+ surface = egl_surface;
} else {
surface = gl::init::CreateNativeViewGLSurfaceEGL(
surface_handle, std::move(vsync_provider));
« no previous file with comments | « gpu/ipc/service/gpu_init.cc ('k') | ui/gl/gl_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698