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

Unified Diff: content/renderer/gpu/compositor_output_surface.h

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
Index: content/renderer/gpu/compositor_output_surface.h
diff --git a/content/renderer/gpu/compositor_output_surface.h b/content/renderer/gpu/compositor_output_surface.h
index fc311698e983bb0476b22b3217fa55380ee3f6af..a7b3273f2d93d9598ef7a96a477a549ba5c22c3b 100644
--- a/content/renderer/gpu/compositor_output_surface.h
+++ b/content/renderer/gpu/compositor_output_surface.h
@@ -29,15 +29,14 @@ class Message;
namespace cc {
class CompositorFrame;
class CompositorFrameAck;
-class GLFrameData;
+class ContextProvider;
}
namespace content {
-class ContextProviderCommandBuffer;
class FrameSwapMessageQueue;
// This class can be created only on the main thread, but then becomes pinned
-// to a fixed thread when bindToClient is called.
+// to a fixed thread when BindToClient is called.
class CompositorOutputSurface
: NON_EXPORTED_BASE(public cc::OutputSurface),
NON_EXPORTED_BASE(public base::NonThreadSafe) {
@@ -45,13 +44,14 @@ class 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,
- scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue,
- bool use_swap_compositor_frame_message);
+ scoped_refptr<cc::ContextProvider> context_provider,
+ scoped_refptr<cc::ContextProvider> worker_context_provider,
+ scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue);
+ CompositorOutputSurface(
+ int32_t routing_id,
+ uint32_t output_surface_id,
+ scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider,
+ scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue);
~CompositorOutputSurface() override;
// cc::OutputSurface implementation.
@@ -60,12 +60,6 @@ class CompositorOutputSurface
void SwapBuffers(cc::CompositorFrame* frame) override;
protected:
- void ShortcutSwapAck(uint32_t output_surface_id,
- std::unique_ptr<cc::GLFrameData> gl_frame_data);
- virtual void OnSwapAck(uint32_t output_surface_id,
- const cc::CompositorFrameAck& ack);
- virtual void OnReclaimResources(uint32_t output_surface_id,
- const cc::CompositorFrameAck& ack);
uint32_t output_surface_id_;
private:
@@ -92,21 +86,17 @@ class CompositorOutputSurface
void OnMessageReceived(const IPC::Message& message);
void OnUpdateVSyncParametersFromBrowser(base::TimeTicks timebase,
base::TimeDelta interval);
+ void OnSwapAck(uint32_t output_surface_id, const cc::CompositorFrameAck& ack);
+ void OnReclaimResources(uint32_t output_surface_id,
+ const cc::CompositorFrameAck& ack);
bool Send(IPC::Message* message);
- bool use_swap_compositor_frame_message_;
-
scoped_refptr<CompositorForwardingMessageFilter> output_surface_filter_;
CompositorForwardingMessageFilter::Handler output_surface_filter_handler_;
scoped_refptr<CompositorOutputSurfaceProxy> output_surface_proxy_;
scoped_refptr<IPC::SyncMessageFilter> message_sender_;
scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_;
int routing_id_;
-
- // TODO(danakj): Remove this when crbug.com/311404
- bool layout_test_mode_;
- std::unique_ptr<cc::CompositorFrameAck> layout_test_previous_frame_ack_;
- base::WeakPtrFactory<CompositorOutputSurface> weak_ptrs_;
};
} // namespace content
« no previous file with comments | « content/renderer/android/synchronous_compositor_output_surface.cc ('k') | content/renderer/gpu/compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698