aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src/GrGpuGLFixed.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-03-10 14:13:19 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-03-10 14:13:19 +0000
commita7f84e150cb9e821267a8ca9e59c1ae9a3cfa300 (patch)
tree92d0c75a44d7ecfbb0a208fa6f9837ef071a8395 /gpu/src/GrGpuGLFixed.cpp
parent63a6060fcdc16245ea3958e7fd88ae32c5e631a3 (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/GrGpuGLFixed.cpp')
-rw-r--r--gpu/src/GrGpuGLFixed.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/gpu/src/GrGpuGLFixed.cpp b/gpu/src/GrGpuGLFixed.cpp
index 516381e308..695b22c156 100644
--- a/gpu/src/GrGpuGLFixed.cpp
+++ b/gpu/src/GrGpuGLFixed.cpp
@@ -58,7 +58,6 @@ static const GLenum gMatrixMode2Enum[] = {
///////////////////////////////////////////////////////////////////////////////
GrGpuGLFixed::GrGpuGLFixed() {
- resetContextHelper();
}
GrGpuGLFixed::~GrGpuGLFixed() {
@@ -66,10 +65,7 @@ GrGpuGLFixed::~GrGpuGLFixed() {
void GrGpuGLFixed::resetContext() {
INHERITED::resetContext();
- resetContextHelper();
-}
-void GrGpuGLFixed::resetContextHelper() {
GR_GL(Disable(GL_TEXTURE_2D));
for (int s = 0; s < kNumStages; ++s) {
@@ -204,11 +200,11 @@ bool GrGpuGLFixed::flushGraphicsState(GrPrimitiveType type) {
}
if (((1 << s) & fDirtyFlags.fTextureChangedMask) ||
- (fHWDrawState.fSamplerStates[s].getMatrix() !=
+ (fHWDrawState.fSamplerStates[s].getMatrix() !=
getSamplerMatrix(s))) {
GrMatrix texMat = getSamplerMatrix(s);
- AdjustTextureMatrix(texture,
+ AdjustTextureMatrix(texture,
GrSamplerState::kNormal_SampleMode,
&texMat);
GrGpuMatrix glm;