| Index: content/common/gpu/client/gpu_channel_host.cc
|
| diff --git a/content/common/gpu/client/gpu_channel_host.cc b/content/common/gpu/client/gpu_channel_host.cc
|
| index f7f5d823eedb84285f08f16f93c8b609bcd80793..ea02803efa7f1ce84dd6dd3e9a9534a99d075800 100644
|
| --- a/content/common/gpu/client/gpu_channel_host.cc
|
| +++ b/content/common/gpu/client/gpu_channel_host.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include <algorithm>
|
|
|
| +#include "base/barrier_closure.h"
|
| #include "base/bind.h"
|
| #include "base/debug/trace_event.h"
|
| #include "base/message_loop/message_loop.h"
|
| @@ -319,6 +320,18 @@ int32 GpuChannelHost::GenerateRouteID() {
|
| return next_route_id_.GetNext();
|
| }
|
|
|
| +void GpuChannelHost::WaitForPendingGpuMemoryBufferUsageToComplete(
|
| + const base::Closure& callback) {
|
| + base::Closure proxy_barrier_closure =
|
| + base::BarrierClosure(proxies_.size(), callback);
|
| +
|
| + AutoLock lock(context_lock_);
|
| + for (ProxyMap::iterator it = proxies_.begin(); it != proxies_.end(); it++) {
|
| + it->second->WaitForPendingGpuMemoryBufferUsageToComplete(
|
| + proxy_barrier_closure);
|
| + }
|
| +}
|
| +
|
| GpuChannelHost::~GpuChannelHost() {
|
| // channel_ must be destroyed on the main thread.
|
| if (!factory_->IsMainThread())
|
|
|