aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-01-18 17:14:52 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-01-18 17:14:52 +0000
commit3f3ffd6ad9fa4cbaef1f2a2efee2b03bf5891b3e (patch)
tree8e9cd3525936204bb011f7005a421c6bb70ba400 /gpu/src
parented3a06804f2b43b383565694f08f992dd2b326be (diff)
Fix stencil format array.
git-svn-id: http://skia.googlecode.com/svn/trunk@703 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src')
-rw-r--r--gpu/src/GrGpuGL.cpp56
1 files changed, 29 insertions, 27 deletions
diff --git a/gpu/src/GrGpuGL.cpp b/gpu/src/GrGpuGL.cpp
index ff3519389f..23636d1a92 100644
--- a/gpu/src/GrGpuGL.cpp
+++ b/gpu/src/GrGpuGL.cpp
@@ -524,33 +524,6 @@ void GrGpuGL::resetContext() {
resetContextHelper();
}
-
-// defines stencil formats from more to less preferred
-#if GR_SUPPORT_GLES
- GLenum GR_GL_STENCIL_FORMAT_ARRAY[] = {
- GR_STENCIL_INDEX8,
- };
-#else
- GLenum GR_GL_STENCIL_FORMAT_ARRAY[] = {
- GR_STENCIL_INDEX8,
- GR_STENCIL_INDEX16,
- GR_UNSIGNED_INT_24_8,
- GR_DEPTH_STENCIL,
- };
-#endif
-
-// good to set a break-point here to know when createTexture fails
-static GrTexture* return_null_texture() {
-// GrAssert(!"null texture");
- return NULL;
-}
-
-#if GR_DEBUG
-static size_t as_size_t(int x) {
- return x;
-}
-#endif
-
GrRenderTarget* GrGpuGL::createPlatformRenderTarget(
intptr_t platformRenderTarget,
int width, int height) {
@@ -573,6 +546,35 @@ GrRenderTarget* GrGpuGL::createPlatformRenderTarget(
return rt;
}
+// defines stencil formats from more to less preferred
+GLenum GR_GL_STENCIL_FORMAT_ARRAY[] = {
+ GR_STENCIL_INDEX8,
+
+#if GR_SUPPORT_GLDESKTOP
+ GR_STENCIL_INDEX16,
+#endif
+
+ GR_DEPTH24_STENCIL8,
+ GR_STENCIL_INDEX4,
+
+#if GR_SUPPORT_GLDESKTOP
+ GL_STENCIL_INDEX,
+ GR_DEPTH_STENCIL,
+#endif
+};
+
+// good to set a break-point here to know when createTexture fails
+static GrTexture* return_null_texture() {
+// GrAssert(!"null texture");
+ return NULL;
+}
+
+#if GR_DEBUG
+static size_t as_size_t(int x) {
+ return x;
+}
+#endif
+
GrTexture* GrGpuGL::createTexture(const TextureDesc& desc,
const void* srcData, size_t rowBytes) {