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

Unified Diff: content/common/gpu/gpu_channel_manager.cc

Issue 780133002: Add optimization for CHROMIUM_subscribe_uniform extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tsepez@ 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_manager.cc
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
index 9e5fee4ca191d5963cee8ed82fa329a9db79f205..1a365ca100b81f390eca6012af78db418bb43791 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -114,10 +114,13 @@ GpuChannelManager::GpuChannelManager(MessageRouter* router,
DCHECK(io_message_loop);
DCHECK(shutdown_event);
channel_->AddFilter(filter_.get());
+ subscription_ref_set_ = new gpu::gles2::SubscriptionRefSet();
+ subscription_ref_set_->AddObserver(this);
}
GpuChannelManager::~GpuChannelManager() {
gpu_channels_.clear();
+ subscription_ref_set_->RemoveObserver(this);
if (default_offscreen_surface_.get()) {
default_offscreen_surface_->Destroy();
default_offscreen_surface_ = NULL;
@@ -186,6 +189,14 @@ bool GpuChannelManager::OnMessageReceived(const IPC::Message& msg) {
bool GpuChannelManager::Send(IPC::Message* msg) { return router_->Send(msg); }
+void GpuChannelManager::OnAddSubscription(unsigned int target) {
+ Send(new GpuHostMsg_AddSubscription(target));
+}
+
+void GpuChannelManager::OnRemoveSubscription(unsigned int target) {
+ Send(new GpuHostMsg_RemoveSubscription(target));
+}
+
void GpuChannelManager::OnEstablishChannel(int client_id,
bool share_context,
bool allow_future_sync_points) {
@@ -207,6 +218,7 @@ void GpuChannelManager::OnEstablishChannel(int client_id,
watchdog_,
share_group,
mailbox_manager,
+ subscription_ref_set_.get(),
client_id,
false,
allow_future_sync_points));

Powered by Google App Engine
This is Rietveld 408576698