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

Unified Diff: content/browser/renderer_host/image_transport_factory.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
Index: content/browser/renderer_host/image_transport_factory.cc
diff --git a/content/browser/renderer_host/image_transport_factory.cc b/content/browser/renderer_host/image_transport_factory.cc
index be01420b702cfe4b776474e9fbd9c66e5d399f77..e2586e6a8dbdc8c18f4c847c9931cbd03f65abc7 100644
--- a/content/browser/renderer_host/image_transport_factory.cc
+++ b/content/browser/renderer_host/image_transport_factory.cc
@@ -19,6 +19,7 @@
#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_process_host.h"
+#include "content/browser/gpu/gpu_process_host_ui_shim.h"
#include "content/browser/gpu/gpu_surface_tracker.h"
#include "content/common/gpu/client/context_provider_command_buffer.h"
#include "content/common/gpu/client/gl_helper.h"
@@ -67,7 +68,7 @@ class NoTransportFactory : public ImageTransportFactory {
}
virtual void DestroySharedSurfaceHandle(
- gfx::GLSurfaceHandle surface) OVERRIDE {
+ gfx::GLSurfaceHandle surface, int surface_id) OVERRIDE {
}
virtual scoped_refptr<ui::Texture> CreateTransportClient(
@@ -433,7 +434,15 @@ class GpuProcessTransportFactory
}
virtual void DestroySharedSurfaceHandle(
- gfx::GLSurfaceHandle surface) OVERRIDE {
+ gfx::GLSurfaceHandle surface, int surface_id) OVERRIDE {
+ int gpu_host_id =
+ shared_contexts_main_thread_->Context3d()->GetGPUProcessID();
+ int client_id = shared_contexts_main_thread_->Context3d()->GetChannelID();
+ int route_id = shared_contexts_main_thread_->Context3d()->GetContextID();
+ GpuProcessHostUIShim* ui_shim =
+ GpuProcessHostUIShim::FromID(gpu_host_id);
+ if (ui_shim)
+ ui_shim->Send(new GpuMsg_DestroySurface(client_id, route_id, surface_id));
}
virtual scoped_refptr<ui::Texture> CreateTransportClient(
« no previous file with comments | « content/browser/renderer_host/image_transport_factory.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698