Chromium Code Reviews| 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 be60a19413468e7bca9090760b360de78b511651..4774476f6d4539f45d4d61196ee8bc155fbcec47 100644 |
| --- a/content/common/gpu/gpu_channel_manager.cc |
| +++ b/content/common/gpu/gpu_channel_manager.cc |
| @@ -175,3 +175,25 @@ void GpuChannelManager::LoseAllContexts() { |
| void GpuChannelManager::OnLoseAllContexts() { |
| gpu_channels_.clear(); |
| } |
| + |
| +gfx::GLSurface* GpuChannelManager::AllocMakeCurrentSurface() { |
| + if (make_current_surface_.get()) { |
| + make_current_surface_->AddRef(); |
| + } else { |
| + make_current_surface_ = gfx::GLSurface::CreateOffscreenGLSurface( |
| + false, gfx::Size(1, 1)); |
| + } |
| + return make_current_surface_.get(); |
| +} |
| + |
| +void GpuChannelManager::ReleaseMakeCurrentSurface() { |
| + if (make_current_surface_.get()) { |
| + if (make_current_surface_->HasOneRef()) { |
|
piman
2012/09/25 00:12:18
This is bogus, because you don't have a way to kno
hshi1
2012/09/25 00:26:34
Done.
|
| + make_current_surface_->Destroy(); |
| + make_current_surface_ = NULL; |
| + } else { |
| + make_current_surface_->Release(); |
| + } |
| + } |
| +} |
| + |