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

Unified Diff: content/common/gpu/gpu_channel.h

Issue 780133002: Add optimization for CHROMIUM_subscribe_uniform extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: piman@ review Created 6 years 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/gpu_channel.h
diff --git a/content/common/gpu/gpu_channel.h b/content/common/gpu/gpu_channel.h
index 6b707289cc55df3a924f66619667f332ceeb7966..0db58ef5a41cb56d90a1d539ca586fbd6b3cb7e8 100644
--- a/content/common/gpu/gpu_channel.h
+++ b/content/common/gpu/gpu_channel.h
@@ -19,6 +19,7 @@
#include "content/common/gpu/gpu_memory_manager.h"
#include "content/common/gpu/gpu_result_codes.h"
#include "content/common/message_router.h"
+#include "gpu/command_buffer/service/valuebuffer_manager.h"
#include "ipc/ipc_sync_channel.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
@@ -37,6 +38,7 @@ class PreemptionFlag;
union ValueState;
class ValueStateMap;
namespace gles2 {
+class SubscriptionRefSet;
}
}
@@ -52,7 +54,8 @@ class GpuWatchdog;
// Encapsulates an IPC channel between the GPU process and one renderer
// process. On the renderer side there's a corresponding GpuChannelHost.
-class GpuChannel : public IPC::Listener, public IPC::Sender {
+class GpuChannel : public IPC::Listener, public IPC::Sender,
+ public gpu::gles2::SubscriptionRefSet::Observer {
public:
// Takes ownership of the renderer process handle.
GpuChannel(GpuChannelManager* gpu_channel_manager,
@@ -99,6 +102,10 @@ class GpuChannel : public IPC::Listener, public IPC::Sender {
// unscheduling conditions.
void RequeueMessage();
+ // SubscriptionRefSet::Observer implementation
+ void OnAddSubscription(unsigned int target) override;
+ void OnRemoveSubscription(unsigned int target) override;
+
// This is called when a command buffer transitions from the unscheduled
// state to the scheduled state, which potentially means the channel
// transitions from the unscheduled to the scheduled state. When this occurs
@@ -219,6 +226,8 @@ class GpuChannel : public IPC::Listener, public IPC::Sender {
scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_;
+ scoped_refptr<gpu::gles2::SubscriptionRefSet> subscription_ref_set_;
+
scoped_refptr<gpu::ValueStateMap> pending_valuebuffer_state_;
typedef IDMap<GpuCommandBufferStub, IDMapOwnPointer> StubMap;

Powered by Google App Engine
This is Rietveld 408576698