OLD | NEW |
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 #define RETURN_FALSE_INTERFACE \ |
120 GrDebugCrash("GrGLInterface::validate() failed."); \ | 120 SkDEBUGFAIL("GrGLInterface::validate() failed."); \ |
121 return false; \ | 121 return false; \ |
122 | 122 |
123 bool GrGLInterface::validate() const { | 123 bool GrGLInterface::validate() const { |
124 | 124 |
125 if (kNone_GrGLStandard == fStandard) { | 125 if (kNone_GrGLStandard == fStandard) { |
126 RETURN_FALSE_INTERFACE | 126 RETURN_FALSE_INTERFACE |
127 } | 127 } |
128 | 128 |
129 if (!fExtensions.isInitialized()) { | 129 if (!fExtensions.isInitialized()) { |
130 RETURN_FALSE_INTERFACE | 130 RETURN_FALSE_INTERFACE |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 NULL == fFunctions.fMapTexSubImage2D || | 503 NULL == fFunctions.fMapTexSubImage2D || |
504 NULL == fFunctions.fUnmapBufferSubData || | 504 NULL == fFunctions.fUnmapBufferSubData || |
505 NULL == fFunctions.fUnmapTexSubImage2D) { | 505 NULL == fFunctions.fUnmapTexSubImage2D) { |
506 RETURN_FALSE_INTERFACE; | 506 RETURN_FALSE_INTERFACE; |
507 } | 507 } |
508 } | 508 } |
509 #endif | 509 #endif |
510 | 510 |
511 return true; | 511 return true; |
512 } | 512 } |
OLD | NEW |