| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 const base::Closure& callback) { | 222 const base::Closure& callback) { |
| 223 NOTIMPLEMENTED(); | 223 NOTIMPLEMENTED(); |
| 224 } | 224 } |
| 225 | 225 |
| 226 void Context::WaitSyncTokenHint(const gpu::SyncToken& sync_token) {} | 226 void Context::WaitSyncTokenHint(const gpu::SyncToken& sync_token) {} |
| 227 | 227 |
| 228 bool Context::CanWaitUnverifiedSyncToken(const gpu::SyncToken& sync_token) { | 228 bool Context::CanWaitUnverifiedSyncToken(const gpu::SyncToken& sync_token) { |
| 229 return false; | 229 return false; |
| 230 } | 230 } |
| 231 | 231 |
| 232 void Context::AddLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info) { |
| 233 } |
| 234 |
| 232 void Context::ApplyCurrentContext(gl::GLSurface* current_surface) { | 235 void Context::ApplyCurrentContext(gl::GLSurface* current_surface) { |
| 233 DCHECK(HasService()); | 236 DCHECK(HasService()); |
| 234 // The current_surface will be the same as | 237 // The current_surface will be the same as |
| 235 // the surface of the decoder. We can not DCHECK as there is | 238 // the surface of the decoder. We can not DCHECK as there is |
| 236 // no accessor. | 239 // no accessor. |
| 237 if (!WasServiceContextLost()) { | 240 if (!WasServiceContextLost()) { |
| 238 if (!gl_context_->MakeCurrent(current_surface)) | 241 if (!gl_context_->MakeCurrent(current_surface)) |
| 239 MarkServiceContextLost(); | 242 MarkServiceContextLost(); |
| 240 } | 243 } |
| 241 gles2::SetGLContext(client_gl_context_.get()); | 244 gles2::SetGLContext(client_gl_context_.get()); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 return false; | 392 return false; |
| 390 if (!gl_context_->MakeCurrent(gl_surface)) { | 393 if (!gl_context_->MakeCurrent(gl_surface)) { |
| 391 MarkServiceContextLost(); | 394 MarkServiceContextLost(); |
| 392 return false; | 395 return false; |
| 393 } | 396 } |
| 394 client_gl_context_->Flush(); | 397 client_gl_context_->Flush(); |
| 395 return true; | 398 return true; |
| 396 } | 399 } |
| 397 | 400 |
| 398 } // namespace egl | 401 } // namespace egl |
| OLD | NEW |