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

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

Issue 209853004: Revert 258122 "gpu: Allow fences to check whether a flush has oc..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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 | « trunk/src/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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 : driver_(NULL) { 336 : driver_(NULL) {
337 } 337 }
338 338
339 GLApiBase::~GLApiBase() { 339 GLApiBase::~GLApiBase() {
340 } 340 }
341 341
342 void GLApiBase::InitializeBase(DriverGL* driver) { 342 void GLApiBase::InitializeBase(DriverGL* driver) {
343 driver_ = driver; 343 driver_ = driver;
344 } 344 }
345 345
346 void GLApiBase::SignalFlush() {
347 DCHECK(GLContext::GetCurrent());
348 GLContext::GetCurrent()->OnFlush();
349 }
350
351 RealGLApi::RealGLApi() { 346 RealGLApi::RealGLApi() {
352 } 347 }
353 348
354 RealGLApi::~RealGLApi() { 349 RealGLApi::~RealGLApi() {
355 } 350 }
356 351
357 void RealGLApi::Initialize(DriverGL* driver) { 352 void RealGLApi::Initialize(DriverGL* driver) {
358 InitializeBase(driver); 353 InitializeBase(driver);
359 } 354 }
360 355
361 void RealGLApi::glFlushFn() {
362 GLApiBase::glFlushFn();
363 GLApiBase::SignalFlush();
364 }
365
366 void RealGLApi::glFinishFn() {
367 GLApiBase::glFinishFn();
368 GLApiBase::SignalFlush();
369 }
370
371 TraceGLApi::~TraceGLApi() { 356 TraceGLApi::~TraceGLApi() {
372 } 357 }
373 358
374 VirtualGLApi::VirtualGLApi() 359 VirtualGLApi::VirtualGLApi()
375 : real_context_(NULL), 360 : real_context_(NULL),
376 current_context_(NULL) { 361 current_context_(NULL) {
377 } 362 }
378 363
379 VirtualGLApi::~VirtualGLApi() { 364 VirtualGLApi::~VirtualGLApi() {
380 } 365 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 438
454 const GLubyte* VirtualGLApi::glGetStringFn(GLenum name) { 439 const GLubyte* VirtualGLApi::glGetStringFn(GLenum name) {
455 switch (name) { 440 switch (name) {
456 case GL_EXTENSIONS: 441 case GL_EXTENSIONS:
457 return reinterpret_cast<const GLubyte*>(extensions_.c_str()); 442 return reinterpret_cast<const GLubyte*>(extensions_.c_str());
458 default: 443 default:
459 return driver_->fn.glGetStringFn(name); 444 return driver_->fn.glGetStringFn(name);
460 } 445 }
461 } 446 }
462 447
463 void VirtualGLApi::glFlushFn() {
464 GLApiBase::glFlushFn();
465 GLApiBase::SignalFlush();
466 }
467
468 void VirtualGLApi::glFinishFn() {
469 GLApiBase::glFinishFn();
470 GLApiBase::SignalFlush();
471 }
472
473 } // namespace gfx 448 } // namespace gfx
OLDNEW
« no previous file with comments | « trunk/src/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