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

Side by Side Diff: src/gpu/gl/debug/GrGLCreateDebugInterface.cpp

Issue 422323002: Some fixes around GrContext::abandonContext: (Closed) Base URL: https://skia.googlesource.com/skia.git@abandon
Patch Set: Address comments Created 6 years, 4 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
« no previous file with comments | « src/gpu/gl/debug/GrDebugGL.cpp ('k') | src/gpu/gl/debug/SkDebugGLContext.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 /* 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
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/gl/debug/GrDebugGL.cpp ('k') | src/gpu/gl/debug/SkDebugGLContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698