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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 234 |
235 // these functions are part of ES2, we assume they are available | 235 // these functions are part of ES2, we assume they are available |
236 // On the desktop we assume they are available if the extension | 236 // On the desktop we assume they are available if the extension |
237 // is present or GL version is high enough. | 237 // is present or GL version is high enough. |
238 if (kGLES_GrGLStandard == fStandard) { | 238 if (kGLES_GrGLStandard == fStandard) { |
239 if (NULL == fFunctions.fStencilFuncSeparate || | 239 if (NULL == fFunctions.fStencilFuncSeparate || |
240 NULL == fFunctions.fStencilMaskSeparate || | 240 NULL == fFunctions.fStencilMaskSeparate || |
241 NULL == fFunctions.fStencilOpSeparate) { | 241 NULL == fFunctions.fStencilOpSeparate) { |
242 RETURN_FALSE_INTERFACE | 242 RETURN_FALSE_INTERFACE |
243 } | 243 } |
| 244 if (fExtensions.has("GL_CHROMIUM_path_rendering")) { |
| 245 if (NULL == fFunctions.fMatrixLoadf || |
| 246 NULL == fFunctions.fMatrixLoadIdentity || |
| 247 NULL == fFunctions.fPathCommands || |
| 248 NULL == fFunctions.fPathParameteri || |
| 249 NULL == fFunctions.fPathParameterf || |
| 250 NULL == fFunctions.fGenPaths || |
| 251 NULL == fFunctions.fDeletePaths || |
| 252 NULL == fFunctions.fPathStencilFunc || |
| 253 NULL == fFunctions.fStencilFillPath || |
| 254 NULL == fFunctions.fStencilFillPathInstanced || |
| 255 NULL == fFunctions.fStencilStrokePath || |
| 256 NULL == fFunctions.fStencilStrokePathInstanced || |
| 257 NULL == fFunctions.fPathTexGen || |
| 258 NULL == fFunctions.fCoverFillPath || |
| 259 NULL == fFunctions.fCoverFillPathInstanced || |
| 260 NULL == fFunctions.fCoverStrokePath || |
| 261 NULL == fFunctions.fCoverStrokePathInstanced) { |
| 262 return false; |
| 263 } |
| 264 } |
244 } else if (kGL_GrGLStandard == fStandard) { | 265 } else if (kGL_GrGLStandard == fStandard) { |
245 | 266 |
246 if (glVer >= GR_GL_VER(2,0)) { | 267 if (glVer >= GR_GL_VER(2,0)) { |
247 if (NULL == fFunctions.fStencilFuncSeparate || | 268 if (NULL == fFunctions.fStencilFuncSeparate || |
248 NULL == fFunctions.fStencilMaskSeparate || | 269 NULL == fFunctions.fStencilMaskSeparate || |
249 NULL == fFunctions.fStencilOpSeparate) { | 270 NULL == fFunctions.fStencilOpSeparate) { |
250 RETURN_FALSE_INTERFACE | 271 RETURN_FALSE_INTERFACE |
251 } | 272 } |
252 } | 273 } |
253 if (glVer >= GR_GL_VER(3,0) && NULL == fFunctions.fBindFragDataLocation)
{ | 274 if (glVer >= GR_GL_VER(3,0) && NULL == fFunctions.fBindFragDataLocation)
{ |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 NULL == fFunctions.fMapTexSubImage2D || | 521 NULL == fFunctions.fMapTexSubImage2D || |
501 NULL == fFunctions.fUnmapBufferSubData || | 522 NULL == fFunctions.fUnmapBufferSubData || |
502 NULL == fFunctions.fUnmapTexSubImage2D) { | 523 NULL == fFunctions.fUnmapTexSubImage2D) { |
503 RETURN_FALSE_INTERFACE; | 524 RETURN_FALSE_INTERFACE; |
504 } | 525 } |
505 } | 526 } |
506 #endif | 527 #endif |
507 | 528 |
508 return true; | 529 return true; |
509 } | 530 } |
OLD | NEW |