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

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

Issue 2009443002: Revert of Consolidate OutputSurface constructors into GL vs Vulkan. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/mailbox_output_surface.h
diff --git a/content/renderer/gpu/mailbox_output_surface.h b/content/renderer/gpu/mailbox_output_surface.h
index f9c4b80558d6be838e0069dbf33c2823d111de3f..1d4b95559f84b82270f2da3326efd300600588f8 100644
--- a/content/renderer/gpu/mailbox_output_surface.h
+++ b/content/renderer/gpu/mailbox_output_surface.h
@@ -11,15 +11,13 @@
#include <queue>
#include "base/memory/ref_counted.h"
-#include "cc/output/output_surface.h"
#include "cc/resources/resource_format.h"
#include "cc/resources/transferable_resource.h"
+#include "content/renderer/gpu/compositor_output_surface.h"
#include "ui/gfx/geometry/size.h"
namespace cc {
class CompositorFrameAck;
-class ContextProvider;
-class GLFrameData;
}
namespace content {
@@ -29,16 +27,19 @@
// are sent to the browser through the mailbox extension.
// This class can be created only on the main thread, but then becomes pinned
// to a fixed thread when bindToClient is called.
-class MailboxOutputSurface : public cc::OutputSurface {
+class MailboxOutputSurface : public CompositorOutputSurface {
public:
MailboxOutputSurface(
+ int32_t routing_id,
uint32_t output_surface_id,
- scoped_refptr<cc::ContextProvider> context_provider,
- scoped_refptr<cc::ContextProvider> worker_context_provider);
+ const scoped_refptr<ContextProviderCommandBuffer>& context_provider,
+ const scoped_refptr<ContextProviderCommandBuffer>&
+ worker_context_provider,
+ scoped_refptr<FrameSwapMessageQueue> swap_frame_message_queue,
+ cc::ResourceFormat format);
~MailboxOutputSurface() override;
// cc::OutputSurface implementation.
- bool BindToClient(cc::OutputSurfaceClient* client) override;
void DetachFromClient() override;
void EnsureBackbuffer() override;
void DiscardBackbuffer() override;
@@ -47,9 +48,9 @@
void SwapBuffers(cc::CompositorFrame* frame) override;
private:
- void ShortcutSwapAck(uint32_t output_surface_id,
- std::unique_ptr<cc::GLFrameData> gl_frame_data);
- void OnSwapAck(uint32_t output_surface_id, const cc::CompositorFrameAck& ack);
+ // CompositorOutputSurface overrides.
+ void OnSwapAck(uint32_t output_surface_id,
+ const cc::CompositorFrameAck& ack) override;
size_t GetNumAcksPending();
@@ -65,17 +66,13 @@
gfx::Size size;
};
- const uint32_t output_surface_id_;
-
TransferableFrame current_backing_;
std::deque<TransferableFrame> pending_textures_;
std::queue<TransferableFrame> returned_textures_;
uint32_t fbo_;
bool is_backbuffer_discarded_;
-
- std::unique_ptr<cc::CompositorFrameAck> previous_frame_ack_;
- base::WeakPtrFactory<MailboxOutputSurface> weak_ptrs_;
+ cc::ResourceFormat format_;
};
} // namespace content
« no previous file with comments | « content/renderer/gpu/delegated_compositor_output_surface.cc ('k') | content/renderer/gpu/mailbox_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698