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

Unified Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 1243263002: content: Pass surfacelessness of GL context from GPU to browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | gpu/command_buffer/common/capabilities.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/gpu_process_transport_factory.cc
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index f50ee9a23b3d68263ac96514c8f921d56b7d90ac..441671ad1d1b11f2fb451250656f2485063b7b17 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -273,23 +273,19 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
compositor->vsync_manager()));
} else {
DCHECK(context_provider);
+ ContextProvider::Capabilities capabilities =
+ context_provider->ContextCapabilities();
if (!data->surface_id) {
surface = make_scoped_ptr(new OffscreenBrowserCompositorOutputSurface(
context_provider, compositor->vsync_manager(),
scoped_ptr<BrowserCompositorOverlayCandidateValidator>()));
- } else
-#if defined(USE_OZONE)
- if (ui::OzonePlatform::GetInstance()
- ->GetOverlayManager()
- ->CanShowPrimaryPlaneAsOverlay()) {
+ } else if (capabilities.gpu.surfaceless) {
surface =
make_scoped_ptr(new GpuSurfacelessBrowserCompositorOutputSurface(
context_provider, data->surface_id, compositor->vsync_manager(),
CreateOverlayCandidateValidator(compositor->widget()), GL_RGB,
BrowserGpuMemoryBufferManager::current()));
- } else
-#endif
- {
+ } else {
surface = make_scoped_ptr(new GpuBrowserCompositorOutputSurface(
context_provider, compositor->vsync_manager(),
CreateOverlayCandidateValidator(compositor->widget())));
« no previous file with comments | « no previous file | gpu/command_buffer/common/capabilities.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698