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

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

Issue 12717013: Add reference-counting for mailbox textures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add optional 'pool' reference while textures are in mailbox Created 7 years, 9 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
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fc48010ca1c36b819bd8211871e1e7f1e3f0649f..fbc99b7cad655d9889a23bd5add973f4ae8b448d 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -4,6 +4,8 @@
#include "content/common/gpu/gpu_channel_manager.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/command_line.h"
#include "content/common/child_thread.h"
@@ -105,6 +107,7 @@ bool GpuChannelManager::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(GpuMsg_CreateImage, OnCreateImage)
IPC_MESSAGE_HANDLER(GpuMsg_DeleteImage, OnDeleteImage)
IPC_MESSAGE_HANDLER(GpuMsg_LoadedShader, OnLoadedShader)
+ IPC_MESSAGE_HANDLER(GpuMsg_DestroySurface, OnDestroySurface)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
return handled;
@@ -259,6 +262,16 @@ void GpuChannelManager::OnLoadedShader(std::string program_proto) {
program_cache()->LoadProgram(program_proto);
}
+void GpuChannelManager::OnDestroySurface(int client_id,
+ int route_id,
+ int surface_id) {
+ if (mailbox_manager_) {
+ GpuChannel* channel = LookupChannel(client_id);
+ if (channel)
+ channel->OnDestroySurface(route_id, surface_id);
+ }
+}
+
bool GpuChannelManager::HandleMessagesScheduled() {
for (GpuChannelMap::iterator iter = gpu_channels_.begin();
iter != gpu_channels_.end(); ++iter) {
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698