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

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

Issue 1132133004: Share backing canvases between browser compositors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
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 151ba009b06a47e5803aad4baa342618a7672dd1..4abccc1a4f815d6be83df789cacc728c746f909a 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -108,6 +108,9 @@ GpuProcessTransportFactory::GpuProcessTransportFactory()
raster_thread_.reset(new RasterThread(task_graph_runner_.get()));
raster_thread_->Start();
}
+#if defined(OS_WIN)
+ software_backing_.reset(new OutputDeviceBacking);
+#endif
}
GpuProcessTransportFactory::~GpuProcessTransportFactory() {
@@ -130,11 +133,12 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() {
return CreateContextCommon(gpu_channel_host, 0);
}
-scoped_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice(
+scoped_ptr<cc::SoftwareOutputDevice>
+GpuProcessTransportFactory::CreateSoftwareOutputDevice(
ui::Compositor* compositor) {
#if defined(OS_WIN)
- return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceWin(
- compositor));
+ return scoped_ptr<cc::SoftwareOutputDevice>(
+ new SoftwareOutputDeviceWin(software_backing_.get(), compositor));
#elif defined(USE_OZONE)
return scoped_ptr<cc::SoftwareOutputDevice>(new SoftwareOutputDeviceOzone(
compositor));
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.h ('k') | content/browser/compositor/software_output_device_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698