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

Side by Side Diff: ui/gl/gl_gl_api_implementation.cc

Issue 898543002: Remove GLFence::CreateWithoutFlush (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove flush event Created 5 years, 10 months 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 | « ui/gl/gl_gl_api_implementation.h ('k') | 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 "ui/gl/gl_gl_api_implementation.h" 5 #include "ui/gl/gl_gl_api_implementation.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 : driver_(NULL) { 388 : driver_(NULL) {
389 } 389 }
390 390
391 GLApiBase::~GLApiBase() { 391 GLApiBase::~GLApiBase() {
392 } 392 }
393 393
394 void GLApiBase::InitializeBase(DriverGL* driver) { 394 void GLApiBase::InitializeBase(DriverGL* driver) {
395 driver_ = driver; 395 driver_ = driver;
396 } 396 }
397 397
398 void GLApiBase::SignalFlush() {
399 DCHECK(GLContext::GetCurrent());
400 GLContext::GetCurrent()->OnFlush();
401 }
402
403 RealGLApi::RealGLApi() { 398 RealGLApi::RealGLApi() {
404 } 399 }
405 400
406 RealGLApi::~RealGLApi() { 401 RealGLApi::~RealGLApi() {
407 } 402 }
408 403
409 void RealGLApi::Initialize(DriverGL* driver) { 404 void RealGLApi::Initialize(DriverGL* driver) {
410 InitializeBase(driver); 405 InitializeBase(driver);
411 } 406 }
412 407
413 void RealGLApi::glFlushFn() { 408 void RealGLApi::glFlushFn() {
414 GLApiBase::glFlushFn(); 409 GLApiBase::glFlushFn();
415 GLApiBase::SignalFlush();
416 } 410 }
417 411
418 void RealGLApi::glFinishFn() { 412 void RealGLApi::glFinishFn() {
419 GLApiBase::glFinishFn(); 413 GLApiBase::glFinishFn();
420 GLApiBase::SignalFlush();
421 } 414 }
422 415
423 TraceGLApi::~TraceGLApi() { 416 TraceGLApi::~TraceGLApi() {
424 } 417 }
425 418
426 NoContextGLApi::NoContextGLApi() { 419 NoContextGLApi::NoContextGLApi() {
427 } 420 }
428 421
429 NoContextGLApi::~NoContextGLApi() { 422 NoContextGLApi::~NoContextGLApi() {
430 } 423 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 switch (name) { 511 switch (name) {
519 case GL_EXTENSIONS: 512 case GL_EXTENSIONS:
520 return reinterpret_cast<const GLubyte*>(extensions_.c_str()); 513 return reinterpret_cast<const GLubyte*>(extensions_.c_str());
521 default: 514 default:
522 return driver_->fn.glGetStringFn(name); 515 return driver_->fn.glGetStringFn(name);
523 } 516 }
524 } 517 }
525 518
526 void VirtualGLApi::glFlushFn() { 519 void VirtualGLApi::glFlushFn() {
527 GLApiBase::glFlushFn(); 520 GLApiBase::glFlushFn();
528 GLApiBase::SignalFlush();
529 } 521 }
530 522
531 void VirtualGLApi::glFinishFn() { 523 void VirtualGLApi::glFinishFn() {
532 GLApiBase::glFinishFn(); 524 GLApiBase::glFinishFn();
533 GLApiBase::SignalFlush();
534 } 525 }
535 526
536 ScopedSetGLToRealGLApi::ScopedSetGLToRealGLApi() 527 ScopedSetGLToRealGLApi::ScopedSetGLToRealGLApi()
537 : old_gl_api_(GetCurrentGLApi()) { 528 : old_gl_api_(GetCurrentGLApi()) {
538 SetGLToRealGLApi(); 529 SetGLToRealGLApi();
539 } 530 }
540 531
541 ScopedSetGLToRealGLApi::~ScopedSetGLToRealGLApi() { 532 ScopedSetGLToRealGLApi::~ScopedSetGLToRealGLApi() {
542 SetGLApi(old_gl_api_); 533 SetGLApi(old_gl_api_);
543 } 534 }
544 535
545 } // namespace gfx 536 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_gl_api_implementation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698