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

Unified Diff: content/renderer/render_widget.cc

Issue 2002303002: Consolidate OutputSurface constructors into GL vs Vulkan. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: outputsurface-constructors: rebase-and-fixcrash Created 4 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
« no previous file with comments | « content/renderer/gpu/mailbox_output_surface.cc ('k') | ui/compositor/test/in_process_context_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 157b4e68bcc61099f60ec13dc03a89c65dd6eade..7bed23f5853884f6cfb61ba9f5b355281c6310e2 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -47,7 +47,6 @@
#include "content/renderer/devtools/render_widget_screen_metrics_emulator.h"
#include "content/renderer/external_popup_menu.h"
#include "content/renderer/gpu/compositor_output_surface.h"
-#include "content/renderer/gpu/delegated_compositor_output_surface.h"
#include "content/renderer/gpu/frame_swap_message_queue.h"
#include "content/renderer/gpu/mailbox_output_surface.h"
#include "content/renderer/gpu/queue_message_swap_promise.h"
@@ -726,9 +725,9 @@ std::unique_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(
scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider =
cc::VulkanInProcessContextProvider::Create();
if (vulkan_context_provider) {
- return base::WrapUnique(new DelegatedCompositorOutputSurface(
- routing_id(), output_surface_id, nullptr, nullptr,
- vulkan_context_provider, frame_swap_message_queue_));
+ return base::WrapUnique(new CompositorOutputSurface(
+ routing_id(), output_surface_id, vulkan_context_provider,
+ frame_swap_message_queue_));
}
}
@@ -749,9 +748,9 @@ std::unique_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(
}
if (use_software) {
- return base::WrapUnique(new DelegatedCompositorOutputSurface(
- routing_id(), output_surface_id, nullptr, nullptr, nullptr,
- frame_swap_message_queue_));
+ return base::WrapUnique(
+ new CompositorOutputSurface(routing_id(), output_surface_id, nullptr,
+ nullptr, frame_swap_message_queue_));
}
scoped_refptr<ContextProviderCommandBuffer> worker_context_provider =
@@ -808,15 +807,14 @@ std::unique_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(
// them to draw inside in the renderer to do the readback there. This should
// no longer be the case when crbug.com/311404 is fixed.
if (RenderThreadImpl::current()->layout_test_mode()) {
- return base::WrapUnique(new MailboxOutputSurface(
- routing_id(), output_surface_id, std::move(context_provider),
- std::move(worker_context_provider), frame_swap_message_queue_,
- cc::RGBA_8888));
+ return base::MakeUnique<MailboxOutputSurface>(
+ output_surface_id, std::move(context_provider),
+ std::move(worker_context_provider));
}
- return base::WrapUnique(new DelegatedCompositorOutputSurface(
+ return base::WrapUnique(new CompositorOutputSurface(
routing_id(), output_surface_id, std::move(context_provider),
- std::move(worker_context_provider), nullptr, frame_swap_message_queue_));
+ std::move(worker_context_provider), frame_swap_message_queue_));
}
std::unique_ptr<cc::BeginFrameSource>
« no previous file with comments | « content/renderer/gpu/mailbox_output_surface.cc ('k') | ui/compositor/test/in_process_context_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698