| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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/gles2_conform_support/egl/context.h" | 5 #include "gpu/gles2_conform_support/egl/context.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "gpu/command_buffer/client/gles2_implementation.h" | 10 #include "gpu/command_buffer/client/gles2_implementation.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 223 |
| 224 void Context::SignalSyncToken(const gpu::SyncToken& sync_token, | 224 void Context::SignalSyncToken(const gpu::SyncToken& sync_token, |
| 225 const base::Closure& callback) { | 225 const base::Closure& callback) { |
| 226 NOTIMPLEMENTED(); | 226 NOTIMPLEMENTED(); |
| 227 } | 227 } |
| 228 | 228 |
| 229 bool Context::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { | 229 bool Context::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { |
| 230 return false; | 230 return false; |
| 231 } | 231 } |
| 232 | 232 |
| 233 int32_t Context::CreateFence(ClientFence fence) { |
| 234 NOTIMPLEMENTED(); |
| 235 return -1; |
| 236 } |
| 237 |
| 238 void Context::DestroyFence(int32_t id) { |
| 239 NOTIMPLEMENTED(); |
| 240 } |
| 241 |
| 233 void Context::ApplyCurrentContext(gl::GLSurface* current_surface) { | 242 void Context::ApplyCurrentContext(gl::GLSurface* current_surface) { |
| 234 DCHECK(HasService()); | 243 DCHECK(HasService()); |
| 235 // The current_surface will be the same as | 244 // The current_surface will be the same as |
| 236 // the surface of the decoder. We can not DCHECK as there is | 245 // the surface of the decoder. We can not DCHECK as there is |
| 237 // no accessor. | 246 // no accessor. |
| 238 if (!WasServiceContextLost()) { | 247 if (!WasServiceContextLost()) { |
| 239 if (!gl_context_->MakeCurrent(current_surface)) | 248 if (!gl_context_->MakeCurrent(current_surface)) |
| 240 MarkServiceContextLost(); | 249 MarkServiceContextLost(); |
| 241 } | 250 } |
| 242 gles2::SetGLContext(client_gl_context_.get()); | 251 gles2::SetGLContext(client_gl_context_.get()); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 return false; | 399 return false; |
| 391 if (!gl_context_->MakeCurrent(gl_surface)) { | 400 if (!gl_context_->MakeCurrent(gl_surface)) { |
| 392 MarkServiceContextLost(); | 401 MarkServiceContextLost(); |
| 393 return false; | 402 return false; |
| 394 } | 403 } |
| 395 client_gl_context_->Flush(); | 404 client_gl_context_->Flush(); |
| 396 return true; | 405 return true; |
| 397 } | 406 } |
| 398 | 407 |
| 399 } // namespace egl | 408 } // namespace egl |
| OLD | NEW |