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

Side by Side Diff: src/gpu/gl/GrGLInterface.cpp

Issue 268683003: Remove SkDEBUGFAILs that are problematic for Chromium (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 7 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 | « no previous file | src/gpu/gl/GrGLUtil.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "gl/GrGLInterface.h" 9 #include "gl/GrGLInterface.h"
10 #include "gl/GrGLExtensions.h" 10 #include "gl/GrGLExtensions.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 clone->fStandard = interface->fStandard; 109 clone->fStandard = interface->fStandard;
110 clone->fExtensions = interface->fExtensions; 110 clone->fExtensions = interface->fExtensions;
111 clone->fFunctions = interface->fFunctions; 111 clone->fFunctions = interface->fFunctions;
112 #if GR_GL_PER_GL_FUNC_CALLBACK 112 #if GR_GL_PER_GL_FUNC_CALLBACK
113 clone->fCallback = interface->fCallback; 113 clone->fCallback = interface->fCallback;
114 clone->fCallbackData = interface->fCallbackData; 114 clone->fCallbackData = interface->fCallbackData;
115 #endif 115 #endif
116 return clone; 116 return clone;
117 } 117 }
118 118
119 #define RETURN_FALSE_INTERFACE \ 119 #ifdef SK_DEBUG
120 SkDEBUGFAIL("GrGLInterface::validate() failed."); \ 120 static int kIsDebug = 1;
121 return false; \ 121 #else
122 static int kIsDebug = 0;
123 #endif
124
125 #define RETURN_FALSE_INTERFACE \
126 if (kIsDebug) { SkDebugf("%s:%d GrGLInterface::validate() failed.\n", __FILE __, __LINE__); } \
127 return false;
122 128
123 bool GrGLInterface::validate() const { 129 bool GrGLInterface::validate() const {
124 130
125 if (kNone_GrGLStandard == fStandard) { 131 if (kNone_GrGLStandard == fStandard) {
126 RETURN_FALSE_INTERFACE 132 RETURN_FALSE_INTERFACE
127 } 133 }
128 134
129 if (!fExtensions.isInitialized()) { 135 if (!fExtensions.isInitialized()) {
130 RETURN_FALSE_INTERFACE 136 RETURN_FALSE_INTERFACE
131 } 137 }
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 NULL == fFunctions.fMapTexSubImage2D || 509 NULL == fFunctions.fMapTexSubImage2D ||
504 NULL == fFunctions.fUnmapBufferSubData || 510 NULL == fFunctions.fUnmapBufferSubData ||
505 NULL == fFunctions.fUnmapTexSubImage2D) { 511 NULL == fFunctions.fUnmapTexSubImage2D) {
506 RETURN_FALSE_INTERFACE; 512 RETURN_FALSE_INTERFACE;
507 } 513 }
508 } 514 }
509 #endif 515 #endif
510 516
511 return true; 517 return true;
512 } 518 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLUtil.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698