Rename flag that disables stencil buffer creation
Review URL: http://codereview.appspot.com/4273103/
git-svn-id: http://skia.googlecode.com/svn/trunk@1000 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/include/GrGpu.h b/gpu/include/GrGpu.h
index 75fb1f4..abeec0c 100644
--- a/gpu/include/GrGpu.h
+++ b/gpu/include/GrGpu.h
@@ -77,9 +77,11 @@
// rendered to by calling
// GrGpu::setRenderTarget() with
// GrTexture::asRenderTarget().
- kNoPathRendering_TextureFlag = 0x2, //<! If the texture is used as a
- // rendertarget but paths will not
- // be rendered to it.
+ kNoStencil_TextureFlag = 0x2, //<! If the texture is used as a
+ // rendertarget but a stencil
+ // buffer is not required. Stencil
+ // may be required for clipping and
+ // path rendering.
kDynamicUpdate_TextureFlag = 0x4 //!< Hint that the CPU may modify
// this texture after creation
};
diff --git a/gpu/src/GrContext.cpp b/gpu/src/GrContext.cpp
index cf51cc9e..a20c6be 100644
--- a/gpu/src/GrContext.cpp
+++ b/gpu/src/GrContext.cpp
@@ -133,7 +133,7 @@
}
GrGpu::TextureDesc rtDesc = desc;
rtDesc.fFlags |= GrGpu::kRenderTarget_TextureFlag |
- GrGpu::kNoPathRendering_TextureFlag;
+ GrGpu::kNoStencil_TextureFlag;
rtDesc.fWidth = GrNextPow2(GrMax<int>(desc.fWidth,
fGpu->minRenderTargetWidth()));
rtDesc.fHeight = GrNextPow2(GrMax<int>(desc.fHeight,
diff --git a/gpu/src/GrGpuGL.cpp b/gpu/src/GrGpuGL.cpp
index 2ed6aa6..6833a31 100644
--- a/gpu/src/GrGpuGL.cpp
+++ b/gpu/src/GrGpuGL.cpp
@@ -850,7 +850,7 @@
} else {
rtIDs.fRTFBOID = rtIDs.fTexFBOID;
}
- if (!(kNoPathRendering_TextureFlag & desc.fFlags)) {
+ if (!(kNoStencil_TextureFlag & desc.fFlags)) {
GR_GL(GenRenderbuffers(1, &rtIDs.fStencilRenderbufferID));
GrAssert(0 != rtIDs.fStencilRenderbufferID);
}
@@ -1006,7 +1006,7 @@
fHWDrawState.fRenderTarget = NULL;
// clear the new stencil buffer if we have one
- if (!(desc.fFlags & kNoPathRendering_TextureFlag)) {
+ if (!(desc.fFlags & kNoStencil_TextureFlag)) {
GrRenderTarget* rtSave = fCurrDrawState.fRenderTarget;
fCurrDrawState.fRenderTarget = rt;
eraseStencil(0, ~0);