diff options
author | 2011-03-10 14:13:19 +0000 | |
---|---|---|
committer | 2011-03-10 14:13:19 +0000 | |
commit | a7f84e150cb9e821267a8ca9e59c1ae9a3cfa300 (patch) | |
tree | 92d0c75a44d7ecfbb0a208fa6f9837ef071a8395 /gpu/src/GrGpuGLShaders2.cpp | |
parent | 63a6060fcdc16245ea3958e7fd88ae32c5e631a3 (diff) |
Make flush discardable and lazily reset context
Review URL: http://codereview.appspot.com/4259059/
git-svn-id: http://skia.googlecode.com/svn/trunk@914 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src/GrGpuGLShaders2.cpp')
-rw-r--r-- | gpu/src/GrGpuGLShaders2.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gpu/src/GrGpuGLShaders2.cpp b/gpu/src/GrGpuGLShaders2.cpp index 77847e9fba..f79e9c883a 100644 --- a/gpu/src/GrGpuGLShaders2.cpp +++ b/gpu/src/GrGpuGLShaders2.cpp @@ -1088,8 +1088,6 @@ void GrGpuGLShaders2::DeleteProgram(Program* program) { GrGpuGLShaders2::GrGpuGLShaders2() { - resetContextHelper(); - fProgram = NULL; fProgramCache = new ProgramCache(); @@ -1119,11 +1117,9 @@ void GrGpuGLShaders2::recordHWSamplerMatrix(int stage, const GrMatrix& matrix){ } void GrGpuGLShaders2::resetContext() { + INHERITED::resetContext(); - resetContextHelper(); -} -void GrGpuGLShaders2::resetContextHelper() { fHWGeometryState.fVertexLayout = 0; fHWGeometryState.fVertexOffset = ~0; GR_GL(DisableVertexAttribArray(COL_ATTR_LOCATION)); |