Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Side by Side Diff: gpu/gles2_conform_support/egl/display.cc

Issue 1416043005: Support multiple contexts in command_buffer_gles2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698