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

Unified Diff: content/renderer/render_widget.cc

Issue 916723002: cc: Add threaded GPU rasterization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update raster skewport setting. Rebase and update test context provider to match latest Skia. Created 5 years, 10 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/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 4ec16f2d177953a9ad1d950384084f77bfbe669a..2cde2d3dff40baf095dc42293fdccd304c7fe060 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -992,6 +992,7 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(bool fallback) {
use_software = true;
scoped_refptr<ContextProviderCommandBuffer> context_provider;
+ scoped_refptr<ContextProviderCommandBuffer> worker_context_provider;
if (!use_software) {
context_provider = ContextProviderCommandBuffer::Create(
CreateGraphicsContext3D(), "RenderCompositor");
@@ -999,22 +1000,29 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(bool fallback) {
// Cause the compositor to wait and try again.
return scoped_ptr<cc::OutputSurface>();
}
+
+ worker_context_provider = ContextProviderCommandBuffer::Create(
+ CreateGraphicsContext3D(), "RenderWorker");
+ if (!worker_context_provider.get()) {
+ // Cause the compositor to wait and try again.
+ return scoped_ptr<cc::OutputSurface>();
+ }
}
uint32 output_surface_id = next_output_surface_id_++;
if (command_line.HasSwitch(switches::kEnableDelegatedRenderer)) {
DCHECK(compositor_deps_->GetCompositorImplThreadTaskRunner());
return scoped_ptr<cc::OutputSurface>(new DelegatedCompositorOutputSurface(
- routing_id(), output_surface_id, context_provider, nullptr,
- frame_swap_message_queue_));
+ routing_id(), output_surface_id, context_provider,
+ worker_context_provider, frame_swap_message_queue_));
}
if (!context_provider.get()) {
scoped_ptr<cc::SoftwareOutputDevice> software_device(
new CompositorSoftwareOutputDevice());
return scoped_ptr<cc::OutputSurface>(new CompositorOutputSurface(
- routing_id(), output_surface_id, nullptr, nullptr,
- software_device.Pass(), frame_swap_message_queue_, true));
+ routing_id(), output_surface_id, NULL, NULL, software_device.Pass(),
vmpstr 2015/02/11 23:53:37 nullptr still, right?
vmiura 2015/02/12 00:12:03 Done.
+ frame_swap_message_queue_, true));
}
if (command_line.HasSwitch(cc::switches::kCompositeToMailbox)) {
@@ -1026,15 +1034,15 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(bool fallback) {
if (base::SysInfo::IsLowEndDevice())
format = cc::RGB_565;
return scoped_ptr<cc::OutputSurface>(new MailboxOutputSurface(
- routing_id(), output_surface_id, context_provider, nullptr,
- scoped_ptr<cc::SoftwareOutputDevice>(), frame_swap_message_queue_,
- format));
+ routing_id(), output_surface_id, context_provider,
+ worker_context_provider, scoped_ptr<cc::SoftwareOutputDevice>(),
+ frame_swap_message_queue_, format));
}
bool use_swap_compositor_frame_message = false;
return scoped_ptr<cc::OutputSurface>(new CompositorOutputSurface(
- routing_id(), output_surface_id, context_provider, nullptr,
- scoped_ptr<cc::SoftwareOutputDevice>(), frame_swap_message_queue_,
- use_swap_compositor_frame_message));
+ routing_id(), output_surface_id, context_provider,
+ worker_context_provider, scoped_ptr<cc::SoftwareOutputDevice>(),
+ frame_swap_message_queue_, use_swap_compositor_frame_message));
}
void RenderWidget::OnSwapBuffersAborted() {
« cc/test/failure_output_surface.cc ('K') | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698