OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "GrGLNoOpInterface.h" | 8 #include "GrGLNoOpInterface.h" |
9 #include "SkString.h" | 9 #include "SkString.h" |
10 #include "SkThread.h" | 10 #include "SkThread.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // the OpenGLES 2.0 spec says this must be >= 8 | 21 // the OpenGLES 2.0 spec says this must be >= 8 |
22 static const GrGLint kDefaultMaxVaryingVectors = 8; | 22 static const GrGLint kDefaultMaxVaryingVectors = 8; |
23 | 23 |
24 static const char* kExtensions[] = { | 24 static const char* kExtensions[] = { |
25 "GL_ARB_framebuffer_object", | 25 "GL_ARB_framebuffer_object", |
26 "GL_ARB_blend_func_extended", | 26 "GL_ARB_blend_func_extended", |
27 "GL_ARB_timer_query", | 27 "GL_ARB_timer_query", |
28 "GL_ARB_draw_buffers", | 28 "GL_ARB_draw_buffers", |
29 "GL_ARB_occlusion_query", | 29 "GL_ARB_occlusion_query", |
30 "GL_EXT_blend_color", | 30 "GL_EXT_blend_color", |
| 31 "GL_EXT_blend_subtract", |
31 "GL_EXT_stencil_wrap" | 32 "GL_EXT_stencil_wrap" |
32 }; | 33 }; |
33 | 34 |
34 namespace { | 35 namespace { |
35 const GrGLubyte* combined_extensions_string() { | 36 const GrGLubyte* combined_extensions_string() { |
36 static SkString gExtString; | 37 static SkString gExtString; |
37 static SkMutex gMutex; | 38 static SkMutex gMutex; |
38 gMutex.acquire(); | 39 gMutex.acquire(); |
39 if (0 == gExtString.size()) { | 40 if (0 == gExtString.size()) { |
40 for (size_t i = 0; i < SK_ARRAY_COUNT(kExtensions) - 1; ++i) { | 41 for (size_t i = 0; i < SK_ARRAY_COUNT(kExtensions) - 1; ++i) { |
41 gExtString.append(kExtensions[i]); | 42 gExtString.append(kExtensions[i]); |
42 gExtString.append(" "); | 43 gExtString.append(" "); |
43 } | 44 } |
44 gExtString.append(kExtensions[SK_ARRAY_COUNT(kExtensions) - 1]); | 45 gExtString.append(kExtensions[SK_ARRAY_COUNT(kExtensions) - 1]); |
45 } | 46 } |
46 gMutex.release(); | 47 gMutex.release(); |
47 return (const GrGLubyte*) gExtString.c_str(); | 48 return (const GrGLubyte*) gExtString.c_str(); |
48 } | 49 } |
49 } | 50 } |
50 | 51 |
| 52 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocation(GrGLuint program, |
| 53 GrGLuint colorNumber, |
| 54 const GrGLchar* name) { |
| 55 } |
| 56 |
51 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendColor(GrGLclampf red, | 57 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendColor(GrGLclampf red, |
52 GrGLclampf green, | 58 GrGLclampf green, |
53 GrGLclampf blue, | 59 GrGLclampf blue, |
54 GrGLclampf alpha) { | 60 GrGLclampf alpha) { |
55 } | 61 } |
56 | 62 |
57 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBindFragDataLocation(GrGLuint program, | 63 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendEquation(GrGLenum mode) { |
58 GrGLuint colorNumber, | |
59 const GrGLchar* name) { | |
60 } | 64 } |
61 | 65 |
62 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendFunc(GrGLenum sfactor, | 66 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBlendFunc(GrGLenum sfactor, |
63 GrGLenum dfactor) { | 67 GrGLenum dfactor) { |
64 } | 68 } |
65 | 69 |
66 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBufferSubData(GrGLenum target, | 70 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLBufferSubData(GrGLenum target, |
67 GrGLintptr offset, | 71 GrGLintptr offset, |
68 GrGLsizeiptr size, | 72 GrGLsizeiptr size, |
69 const GrGLvoid* data) { | 73 const GrGLvoid* data) { |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 static int gUniLocation = 0; | 659 static int gUniLocation = 0; |
656 return ++gUniLocation; | 660 return ++gUniLocation; |
657 } | 661 } |
658 | 662 |
659 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLInsertEventMarker(GrGLsizei length, const cha
r* marker) { | 663 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLInsertEventMarker(GrGLsizei length, const cha
r* marker) { |
660 } | 664 } |
661 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPushGroupMarker(GrGLsizei length , const cha
r* marker) { | 665 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPushGroupMarker(GrGLsizei length , const cha
r* marker) { |
662 } | 666 } |
663 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPopGroupMarker() { | 667 GrGLvoid GR_GL_FUNCTION_TYPE noOpGLPopGroupMarker() { |
664 } | 668 } |
OLD | NEW |