OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "gl/GrGLInterface.h" | 10 #include "gl/GrGLInterface.h" |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 } | 789 } |
790 | 790 |
791 virtual ~GrDebugGLInterface() { | 791 virtual ~GrDebugGLInterface() { |
792 GrDebugGL::staticUnRef(); | 792 GrDebugGL::staticUnRef(); |
793 } | 793 } |
794 | 794 |
795 void setWrapped(GrGLInterface *interface) { | 795 void setWrapped(GrGLInterface *interface) { |
796 fWrapped.reset(interface); | 796 fWrapped.reset(interface); |
797 } | 797 } |
798 | 798 |
| 799 virtual void abandon() const SK_OVERRIDE { |
| 800 GrDebugGL::abandon(); |
| 801 } |
| 802 |
799 // TODO: there are some issues w/ wrapping another GL interface inside the | 803 // TODO: there are some issues w/ wrapping another GL interface inside the |
800 // debug interface: | 804 // debug interface: |
801 // Since none of the "gl" methods are member functions they don't get | 805 // Since none of the "gl" methods are member functions they don't get |
802 // a "this" pointer through which to access "fWrapped" | 806 // a "this" pointer through which to access "fWrapped" |
803 // This could be worked around by having all of them access the | 807 // This could be worked around by having all of them access the |
804 // "glInterface" pointer - i.e., treating the debug interface as a | 808 // "glInterface" pointer - i.e., treating the debug interface as a |
805 // true singleton | 809 // true singleton |
806 // | 810 // |
807 // The problem with this is that we also want to handle OpenGL | 811 // The problem with this is that we also want to handle OpenGL |
808 // contexts. The natural way to do this is to have multiple debug | 812 // contexts. The natural way to do this is to have multiple debug |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 functions->fMatrixLoadIdentity = noOpGLMatrixLoadIdentity; | 973 functions->fMatrixLoadIdentity = noOpGLMatrixLoadIdentity; |
970 | 974 |
971 functions->fBindFragDataLocationIndexed = | 975 functions->fBindFragDataLocationIndexed = |
972 noOpGLBindFragDataLocationIndexed; | 976 noOpGLBindFragDataLocationIndexed; |
973 | 977 |
974 interface->fExtensions.init(kGL_GrGLStandard, functions->fGetString, functio
ns->fGetStringi, | 978 interface->fExtensions.init(kGL_GrGLStandard, functions->fGetString, functio
ns->fGetStringi, |
975 functions->fGetIntegerv); | 979 functions->fGetIntegerv); |
976 | 980 |
977 return interface; | 981 return interface; |
978 } | 982 } |
OLD | NEW |