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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 return shared_context_->IsCurrent(surface); | 75 return shared_context_->IsCurrent(surface); |
76 | 76 |
77 // Otherwise, only insure the context itself is current. | 77 // Otherwise, only insure the context itself is current. |
78 return shared_context_->IsCurrent(NULL); | 78 return shared_context_->IsCurrent(NULL); |
79 } | 79 } |
80 | 80 |
81 void* GLContextVirtual::GetHandle() { | 81 void* GLContextVirtual::GetHandle() { |
82 return shared_context_->GetHandle(); | 82 return shared_context_->GetHandle(); |
83 } | 83 } |
84 | 84 |
85 void GLContextVirtual::SetSwapInterval(int interval) { | 85 void GLContextVirtual::OnSetSwapInterval(int interval) { |
86 shared_context_->SetSwapInterval(interval); | 86 shared_context_->SetSwapInterval(interval); |
87 } | 87 } |
88 | 88 |
89 std::string GLContextVirtual::GetExtensions() { | 89 std::string GLContextVirtual::GetExtensions() { |
90 return shared_context_->GetExtensions(); | 90 return shared_context_->GetExtensions(); |
91 } | 91 } |
92 | 92 |
93 bool GLContextVirtual::GetTotalGpuMemory(size_t* bytes) { | 93 bool GLContextVirtual::GetTotalGpuMemory(size_t* bytes) { |
94 return shared_context_->GetTotalGpuMemory(bytes); | 94 return shared_context_->GetTotalGpuMemory(bytes); |
95 } | 95 } |
(...skipping 11 matching lines...) Expand all Loading... |
107 | 107 |
108 void GLContextVirtual::SetUnbindFboOnMakeCurrent() { | 108 void GLContextVirtual::SetUnbindFboOnMakeCurrent() { |
109 shared_context_->SetUnbindFboOnMakeCurrent(); | 109 shared_context_->SetUnbindFboOnMakeCurrent(); |
110 } | 110 } |
111 | 111 |
112 GLContextVirtual::~GLContextVirtual() { | 112 GLContextVirtual::~GLContextVirtual() { |
113 Destroy(); | 113 Destroy(); |
114 } | 114 } |
115 | 115 |
116 } // namespace gpu | 116 } // namespace gpu |
OLD | NEW |