aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-31 17:18:58 +0000
committerGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-31 17:18:58 +0000
commit8722d7c3e0ddb623a557a67b99b464d9072836bc (patch)
tree631b5a3e9b41fef3afa30173cac27b2f2c99ab11 /src
parentd414666d18fa9dca1cb310bc66c574aac3d79b72 (diff)
Roll out r3117 to alleviate http://code.google.com/p/skia/issues/detail?id=471 ('filltypespersp gm test fails with KERN_PROTECTION_FAILURE on Lion')
git-svn-id: http://skia.googlecode.com/svn/trunk@3122 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrGpu.cpp23
-rw-r--r--src/gpu/GrGpu.h2
-rw-r--r--src/gpu/GrGpuGL.cpp2
3 files changed, 11 insertions, 16 deletions
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 5ec9948690..39960de054 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -343,20 +343,15 @@ const GrVertexBuffer* GrGpu::getUnitSquareVertexBuffer() const {
////////////////////////////////////////////////////////////////////////////////
-const GrStencilSettings* GrGpu::GetClipStencilSettings(void) {
- // stencil settings to use when clip is in stencil
- // NOTE: This is thread-safe on Windows because the implementation of
- // GR_STATIC_CONST_SAME_STENCIL simply updates a pointer to an already
- // constructed constant structure.
- GR_STATIC_CONST_SAME_STENCIL(sClipStencilSettings,
- kKeep_StencilOp,
- kKeep_StencilOp,
- kAlwaysIfInClip_StencilFunc,
- 0x0000,
- 0x0000,
- 0x0000);
- return &sClipStencilSettings;
-}
+// stencil settings to use when clip is in stencil
+GR_STATIC_CONST_SAME_STENCIL(gClipStencilSettings,
+ kKeep_StencilOp,
+ kKeep_StencilOp,
+ kAlwaysIfInClip_StencilFunc,
+ 0x0000,
+ 0x0000,
+ 0x0000);
+const GrStencilSettings& GrGpu::gClipStencilSettings = ::gClipStencilSettings;
// mapping of clip-respecting stencil funcs to normal stencil funcs
// mapping depends on whether stencil-clipping is in effect.
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 37d1fcf9b5..e617efb8e4 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -355,7 +355,7 @@ protected:
// stencil settings to clip drawing when stencil clipping is in effect
// and the client isn't using the stencil test.
- static const GrStencilSettings* GetClipStencilSettings(void);
+ static const GrStencilSettings& gClipStencilSettings;
GrGpuStats fStats;
diff --git a/src/gpu/GrGpuGL.cpp b/src/gpu/GrGpuGL.cpp
index df578c9206..70d28d6785 100644
--- a/src/gpu/GrGpuGL.cpp
+++ b/src/gpu/GrGpuGL.cpp
@@ -1776,7 +1776,7 @@ void GrGpuGL::flushStencil() {
if (settings->isDisabled()) {
if (stencilClip) {
- settings = GetClipStencilSettings();
+ settings = &gClipStencilSettings;
}
}