| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/common/gpu/gpu_channel_manager.h" | 5 #include "content/common/gpu/gpu_channel_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "content/common/child_thread.h" | 9 #include "content/common/child_thread.h" |
| 10 #include "content/common/gpu/gpu_channel.h" | 10 #include "content/common/gpu/gpu_channel.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 } | 263 } |
| 264 | 264 |
| 265 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { | 265 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { |
| 266 if (!default_offscreen_surface_.get()) { | 266 if (!default_offscreen_surface_.get()) { |
| 267 default_offscreen_surface_ = gfx::GLSurface::CreateOffscreenGLSurface( | 267 default_offscreen_surface_ = gfx::GLSurface::CreateOffscreenGLSurface( |
| 268 false, gfx::Size(1, 1)); | 268 false, gfx::Size(1, 1)); |
| 269 } | 269 } |
| 270 return default_offscreen_surface_.get(); | 270 return default_offscreen_surface_.get(); |
| 271 } | 271 } |
| 272 | 272 |
| 273 bool GpuChannelManager::MakeCurrent(gfx::GLSurface* surface) { |
| 274 gfx::GLContext* context = share_group_->GetContext(); |
| 275 if (context) |
| 276 return context->MakeCurrent(surface); |
| 277 |
| 278 return false; |
| 279 } |
| 280 |
| 273 } // namespace content | 281 } // namespace content |
| OLD | NEW |