| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 } | 271 } |
| 272 | 272 |
| 273 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { | 273 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { |
| 274 if (!default_offscreen_surface_.get()) { | 274 if (!default_offscreen_surface_.get()) { |
| 275 default_offscreen_surface_ = gfx::GLSurface::CreateOffscreenGLSurface( | 275 default_offscreen_surface_ = gfx::GLSurface::CreateOffscreenGLSurface( |
| 276 false, gfx::Size(1, 1)); | 276 false, gfx::Size(1, 1)); |
| 277 } | 277 } |
| 278 return default_offscreen_surface_.get(); | 278 return default_offscreen_surface_.get(); |
| 279 } | 279 } |
| 280 | 280 |
| 281 bool GpuChannelManager::MakeCurrent(gfx::GLSurface* surface) { |
| 282 gfx::GLContext* context = share_group_->GetContext(); |
| 283 if (context) |
| 284 return context->MakeCurrent(surface); |
| 285 |
| 286 return false; |
| 287 } |
| 288 |
| 281 } // namespace content | 289 } // namespace content |
| OLD | NEW |