| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/cancelable_callback.h" | 8 #include "base/cancelable_callback.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 share_group_->AddContext(this); | 59 share_group_->AddContext(this); |
| 60 } | 60 } |
| 61 | 61 |
| 62 GLContext::~GLContext() { | 62 GLContext::~GLContext() { |
| 63 share_group_->RemoveContext(this); | 63 share_group_->RemoveContext(this); |
| 64 if (GetCurrent() == this) { | 64 if (GetCurrent() == this) { |
| 65 SetCurrent(nullptr); | 65 SetCurrent(nullptr); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 bool GLContext::GetTotalGpuMemory(size_t* bytes) { | |
| 70 DCHECK(bytes); | |
| 71 *bytes = 0; | |
| 72 return false; | |
| 73 } | |
| 74 | |
| 75 void GLContext::SetSafeToForceGpuSwitch() { | 69 void GLContext::SetSafeToForceGpuSwitch() { |
| 76 } | 70 } |
| 77 | 71 |
| 78 bool GLContext::ForceGpuSwitchIfNeeded() { | 72 bool GLContext::ForceGpuSwitchIfNeeded() { |
| 79 return true; | 73 return true; |
| 80 } | 74 } |
| 81 | 75 |
| 82 void GLContext::SetUnbindFboOnMakeCurrent() { | 76 void GLContext::SetUnbindFboOnMakeCurrent() { |
| 83 NOTIMPLEMENTED(); | 77 NOTIMPLEMENTED(); |
| 84 } | 78 } |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 } | 241 } |
| 248 | 242 |
| 249 GLContextReal::~GLContextReal() {} | 243 GLContextReal::~GLContextReal() {} |
| 250 | 244 |
| 251 void GLContextReal::SetCurrent(GLSurface* surface) { | 245 void GLContextReal::SetCurrent(GLSurface* surface) { |
| 252 GLContext::SetCurrent(surface); | 246 GLContext::SetCurrent(surface); |
| 253 current_real_context_.Pointer()->Set(surface ? this : nullptr); | 247 current_real_context_.Pointer()->Set(surface ? this : nullptr); |
| 254 } | 248 } |
| 255 | 249 |
| 256 } // namespace gfx | 250 } // namespace gfx |
| OLD | NEW |