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/gles2_conform_support/egl/display.h" | 5 #include "gpu/gles2_conform_support/egl/display.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 } | 269 } |
270 | 270 |
271 bool Display::MakeCurrent(EGLSurface draw, EGLSurface read, EGLContext ctx) { | 271 bool Display::MakeCurrent(EGLSurface draw, EGLSurface read, EGLContext ctx) { |
272 if (ctx == EGL_NO_CONTEXT) { | 272 if (ctx == EGL_NO_CONTEXT) { |
273 gles2::SetGLContext(NULL); | 273 gles2::SetGLContext(NULL); |
274 } else { | 274 } else { |
275 DCHECK(IsValidSurface(draw)); | 275 DCHECK(IsValidSurface(draw)); |
276 DCHECK(IsValidSurface(read)); | 276 DCHECK(IsValidSurface(read)); |
277 DCHECK(IsValidContext(ctx)); | 277 DCHECK(IsValidContext(ctx)); |
278 gles2::SetGLContext(context_.get()); | 278 gles2::SetGLContext(context_.get()); |
| 279 gl_context_->MakeCurrent(gl_surface_.get()); |
279 } | 280 } |
280 return true; | 281 return true; |
281 } | 282 } |
282 | 283 |
283 gpu::Capabilities Display::GetCapabilities() { | 284 gpu::Capabilities Display::GetCapabilities() { |
284 return decoder_->GetCapabilities(); | 285 return decoder_->GetCapabilities(); |
285 } | 286 } |
286 | 287 |
287 int32_t Display::CreateImage(ClientBuffer buffer, | 288 int32_t Display::CreateImage(ClientBuffer buffer, |
288 size_t width, | 289 size_t width, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 void Display::SignalSyncToken(const gpu::SyncToken& sync_token, | 373 void Display::SignalSyncToken(const gpu::SyncToken& sync_token, |
373 const base::Closure& callback) { | 374 const base::Closure& callback) { |
374 NOTIMPLEMENTED(); | 375 NOTIMPLEMENTED(); |
375 } | 376 } |
376 | 377 |
377 bool Display::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { | 378 bool Display::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { |
378 return false; | 379 return false; |
379 } | 380 } |
380 | 381 |
381 } // namespace egl | 382 } // namespace egl |
OLD | NEW |