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

Unified Diff: content/renderer/gpu/compositor_output_surface.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: . 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
Index: content/renderer/gpu/compositor_output_surface.cc
diff --git a/content/renderer/gpu/compositor_output_surface.cc b/content/renderer/gpu/compositor_output_surface.cc
index 1284fe47d65d0f76fbd1c345be89bc0c69787577..a212f803dd7723fec4815e299dcb8177db75026e 100644
--- a/content/renderer/gpu/compositor_output_surface.cc
+++ b/content/renderer/gpu/compositor_output_surface.cc
@@ -30,31 +30,47 @@ namespace content {
CompositorOutputSurface::CompositorOutputSurface(
int32_t routing_id,
uint32_t output_surface_id,
- const scoped_refptr<ContextProviderCommandBuffer>& context_provider,
- const scoped_refptr<ContextProviderCommandBuffer>& worker_context_provider,
- const scoped_refptr<cc::VulkanContextProvider>& vulkan_context_provider,
- std::unique_ptr<cc::SoftwareOutputDevice> software_device,
- scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue,
- bool use_swap_compositor_frame_message)
- : OutputSurface(context_provider,
- worker_context_provider,
- vulkan_context_provider,
- std::move(software_device)),
+ scoped_refptr<cc::ContextProvider> context_provider,
+ scoped_refptr<cc::ContextProvider> worker_context_provider,
+ scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue)
+ : OutputSurface(std::move(context_provider),
+ std::move(worker_context_provider),
+ nullptr),
output_surface_id_(output_surface_id),
- use_swap_compositor_frame_message_(use_swap_compositor_frame_message),
output_surface_filter_(
RenderThreadImpl::current()->compositor_message_filter()),
+ message_sender_(RenderThreadImpl::current()->sync_message_filter()),
frame_swap_message_queue_(swap_frame_message_queue),
routing_id_(routing_id),
layout_test_mode_(RenderThreadImpl::current()->layout_test_mode()),
weak_ptrs_(this) {
- DCHECK(output_surface_filter_.get());
- DCHECK(frame_swap_message_queue_.get());
- message_sender_ = RenderThreadImpl::current()->sync_message_filter();
- DCHECK(message_sender_.get());
+ DCHECK(output_surface_filter_);
+ DCHECK(frame_swap_message_queue_);
+ DCHECK(message_sender_);
+ capabilities_.delegated_rendering = true;
danakj 2016/05/23 21:14:28 Oh. Mailbox output surface :/ I can't do this.
danakj 2016/05/23 21:31:26 I'm going to try split Mailbox from Compositor out
}
-CompositorOutputSurface::~CompositorOutputSurface() {}
+CompositorOutputSurface::CompositorOutputSurface(
+ int32_t routing_id,
+ uint32_t output_surface_id,
+ scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider,
+ scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue)
+ : OutputSurface(std::move(vulkan_context_provider), nullptr),
+ output_surface_id_(output_surface_id),
+ output_surface_filter_(
+ RenderThreadImpl::current()->compositor_message_filter()),
+ message_sender_(RenderThreadImpl::current()->sync_message_filter()),
+ frame_swap_message_queue_(swap_frame_message_queue),
+ routing_id_(routing_id),
+ layout_test_mode_(RenderThreadImpl::current()->layout_test_mode()),
+ weak_ptrs_(this) {
+ DCHECK(output_surface_filter_);
+ DCHECK(frame_swap_message_queue_);
+ DCHECK(message_sender_);
+ capabilities_.delegated_rendering = true;
+}
+
+CompositorOutputSurface::~CompositorOutputSurface() = default;
bool CompositorOutputSurface::BindToClient(
cc::OutputSurfaceClient* client) {
@@ -105,7 +121,6 @@ void CompositorOutputSurface::ShortcutSwapAck(
}
void CompositorOutputSurface::SwapBuffers(cc::CompositorFrame* frame) {
- DCHECK(use_swap_compositor_frame_message_);
if (layout_test_mode_) {
// This code path is here to support layout tests that are currently
// doing a readback in the renderer instead of the browser. So they

Powered by Google App Engine
This is Rietveld 408576698