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

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: Update unit test classes. 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..7af87f9e0b575b7c76f55a14b379e3857bd91201 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,13 @@ class GpuChannelHost : public IPC::Sender,
// IPC::Sender implementation:
bool Send(IPC::Message* msg) override;
+ // Flush route.
+ void Flush(int route_id,
+ int32 put_offset,
+ unsigned int flush_count,
+ const std::vector<ui::LatencyInfo>& latency_info,
+ bool shallow_flush);
+
// Create and connect to a command buffer in the GPU process.
CommandBufferProxyImpl* CreateViewCommandBuffer(
int32 surface_id,
@@ -173,6 +192,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 +266,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);
};

Powered by Google App Engine
This is Rietveld 408576698