| 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 "gpu/command_buffer/service/gl_context_virtual.h" | 5 #include "gpu/command_buffer/service/gl_context_virtual.h" |
| 6 | 6 |
| 7 #include "gpu/command_buffer/service/gl_state_restorer_impl.h" | 7 #include "gpu/command_buffer/service/gl_state_restorer_impl.h" |
| 8 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 8 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 9 #include "ui/gl/gl_surface.h" | 9 #include "ui/gl/gl_surface.h" |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 } | 85 } |
| 86 | 86 |
| 87 std::string GLContextVirtual::GetExtensions() { | 87 std::string GLContextVirtual::GetExtensions() { |
| 88 return shared_context_->GetExtensions(); | 88 return shared_context_->GetExtensions(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 bool GLContextVirtual::GetTotalGpuMemory(size_t* bytes) { | 91 bool GLContextVirtual::GetTotalGpuMemory(size_t* bytes) { |
| 92 return shared_context_->GetTotalGpuMemory(bytes); | 92 return shared_context_->GetTotalGpuMemory(bytes); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void GLContextVirtual::SetSafeToForceGpuSwitch() { |
| 96 // TODO(ccameron): This will not work if two contexts that disagree |
| 97 // about whether or not forced gpu switching may be done both share |
| 98 // the same underlying shared_context_. |
| 99 return shared_context_->SetSafeToForceGpuSwitch(); |
| 100 } |
| 101 |
| 95 bool GLContextVirtual::WasAllocatedUsingRobustnessExtension() { | 102 bool GLContextVirtual::WasAllocatedUsingRobustnessExtension() { |
| 96 return shared_context_->WasAllocatedUsingRobustnessExtension(); | 103 return shared_context_->WasAllocatedUsingRobustnessExtension(); |
| 97 } | 104 } |
| 98 | 105 |
| 99 GLContextVirtual::~GLContextVirtual() { | 106 GLContextVirtual::~GLContextVirtual() { |
| 100 Destroy(); | 107 Destroy(); |
| 101 } | 108 } |
| 102 | 109 |
| 103 } // namespace gpu | 110 } // namespace gpu |
| OLD | NEW |