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

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

Issue 222103008: Revert r258965 aka reland r258122 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 : driver_(NULL) { 348 : driver_(NULL) {
349 } 349 }
350 350
351 GLApiBase::~GLApiBase() { 351 GLApiBase::~GLApiBase() {
352 } 352 }
353 353
354 void GLApiBase::InitializeBase(DriverGL* driver) { 354 void GLApiBase::InitializeBase(DriverGL* driver) {
355 driver_ = driver; 355 driver_ = driver;
356 } 356 }
357 357
358 void GLApiBase::SignalFlush() {
359 DCHECK(GLContext::GetCurrent());
360 GLContext::GetCurrent()->OnFlush();
361 }
362
358 RealGLApi::RealGLApi() { 363 RealGLApi::RealGLApi() {
359 } 364 }
360 365
361 RealGLApi::~RealGLApi() { 366 RealGLApi::~RealGLApi() {
362 } 367 }
363 368
364 void RealGLApi::Initialize(DriverGL* driver) { 369 void RealGLApi::Initialize(DriverGL* driver) {
365 InitializeBase(driver); 370 InitializeBase(driver);
366 } 371 }
367 372
373 void RealGLApi::glFlushFn() {
374 GLApiBase::glFlushFn();
375 GLApiBase::SignalFlush();
376 }
377
378 void RealGLApi::glFinishFn() {
379 GLApiBase::glFinishFn();
380 GLApiBase::SignalFlush();
381 }
382
368 TraceGLApi::~TraceGLApi() { 383 TraceGLApi::~TraceGLApi() {
369 } 384 }
370 385
371 NoContextGLApi::NoContextGLApi() { 386 NoContextGLApi::NoContextGLApi() {
372 } 387 }
373 388
374 NoContextGLApi::~NoContextGLApi() { 389 NoContextGLApi::~NoContextGLApi() {
375 } 390 }
376 391
377 VirtualGLApi::VirtualGLApi() 392 VirtualGLApi::VirtualGLApi()
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 471
457 const GLubyte* VirtualGLApi::glGetStringFn(GLenum name) { 472 const GLubyte* VirtualGLApi::glGetStringFn(GLenum name) {
458 switch (name) { 473 switch (name) {
459 case GL_EXTENSIONS: 474 case GL_EXTENSIONS:
460 return reinterpret_cast<const GLubyte*>(extensions_.c_str()); 475 return reinterpret_cast<const GLubyte*>(extensions_.c_str());
461 default: 476 default:
462 return driver_->fn.glGetStringFn(name); 477 return driver_->fn.glGetStringFn(name);
463 } 478 }
464 } 479 }
465 480
481 void VirtualGLApi::glFlushFn() {
482 GLApiBase::glFlushFn();
483 GLApiBase::SignalFlush();
484 }
485
486 void VirtualGLApi::glFinishFn() {
487 GLApiBase::glFinishFn();
488 GLApiBase::SignalFlush();
489 }
490
466 } // namespace gfx 491 } // 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