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

Unified Diff: content/common/gpu/client/gpu_channel_host.h

Issue 896723008: Add OrderingBarrierCHROMIUM API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits. 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/common/gpu/client/gpu_channel_host.h
diff --git a/content/common/gpu/client/gpu_channel_host.h b/content/common/gpu/client/gpu_channel_host.h
index 877baa00e2cecebfc4aa878980f5d3f45022b62c..fbff47b5b9c2f6a58d74fbd8628703bd55742019 100644
--- a/content/common/gpu/client/gpu_channel_host.h
+++ b/content/common/gpu/client/gpu_channel_host.h
@@ -23,6 +23,7 @@
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_sync_channel.h"
#include "ipc/message_filter.h"
+#include "ui/events/latency_info.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gfx/native_widget_types.h"
@@ -63,6 +64,17 @@ struct GpuListenerInfo {
scoped_refptr<base::MessageLoopProxy> loop;
};
+struct ProxyFlushInfo {
+ ProxyFlushInfo();
+ ~ProxyFlushInfo();
+
+ bool flush_pending;
+ int route_id;
+ int32 put_offset;
+ unsigned int flush_count;
+ std::vector<ui::LatencyInfo> latency_info;
+};
+
class CONTENT_EXPORT GpuChannelHostFactory {
public:
virtual ~GpuChannelHostFactory() {}
@@ -103,6 +115,15 @@ class GpuChannelHost : public IPC::Sender,
// IPC::Sender implementation:
bool Send(IPC::Message* msg) override;
+ // Set an ordering barrier. AsyncFlushes any pending barriers on other
+ // routes. Combines multiple OrderingBarriers into a single AsyncFlush.
+ void OrderingBarrier(int route_id,
+ int32 put_offset,
+ unsigned int flush_count,
+ const std::vector<ui::LatencyInfo>& latency_info,
+ bool put_offset_changed,
+ bool do_flush);
+
// Create and connect to a command buffer in the GPU process.
CommandBufferProxyImpl* CreateViewCommandBuffer(
int32 surface_id,
@@ -173,6 +194,8 @@ class GpuChannelHost : public IPC::Sender,
~GpuChannelHost() override;
void Connect(const IPC::ChannelHandle& channel_handle,
base::WaitableEvent* shutdown_event);
+ bool InternalSend(IPC::Message* msg);
+ void InternalFlush();
// A filter used internally to route incoming messages from the IO thread
// to the correct message loop. It also maintains some shared state between
@@ -245,6 +268,7 @@ class GpuChannelHost : public IPC::Sender,
// Used to look up a proxy from its routing id.
typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap;
ProxyMap proxies_;
+ ProxyFlushInfo flush_info_;
DISALLOW_COPY_AND_ASSIGN(GpuChannelHost);
};
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.cc ('k') | content/common/gpu/client/gpu_channel_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698