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

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

Issue 569283005: Unify checking of --use-surfaces flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « content/browser/compositor/delegated_frame_host.cc ('k') | content/browser/gpu/compositor_util.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 fe90a7c50fcdb613433eca2ee65401bf75b6e231..07256d48fc2a41d15eb03afb68f7e70b4b374985 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -23,6 +23,7 @@
#include "content/browser/compositor/software_browser_compositor_output_surface.h"
#include "content/browser/compositor/surface_display_output_surface.h"
#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
+#include "content/browser/gpu/compositor_util.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_surface_tracker.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
@@ -81,10 +82,8 @@ GpuProcessTransportFactory::GpuProcessTransportFactory()
compositor_thread_.reset(new base::Thread("Browser Compositor"));
compositor_thread_->Start();
}
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kUseSurfaces)) {
+ if (UseSurfacesEnabled())
surface_manager_ = make_scoped_ptr(new cc::SurfaceManager);
- }
}
GpuProcessTransportFactory::~GpuProcessTransportFactory() {
@@ -174,8 +173,7 @@ scoped_ptr<cc::OutputSurface> GpuProcessTransportFactory::CreateOutputSurface(
compositor_thread_task_runner.get());
}
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kUseSurfaces)) {
+ if (UseSurfacesEnabled()) {
// This gets a bit confusing. Here we have a ContextProvider configured to
// render directly to this widget. We need to make an OnscreenDisplayClient
// associated with this context, then return a SurfaceDisplayOutputSurface
« no previous file with comments | « content/browser/compositor/delegated_frame_host.cc ('k') | content/browser/gpu/compositor_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698