Avoid checking to see if a bool is less than zero.
Create a symbolic name for -1 when it means "don't know, probe at runtime".
git-svn-id: http://skia.googlecode.com/svn/trunk@1606 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGpuGL.cpp b/gpu/src/GrGpuGL.cpp
index 177ddb1..973e1e4 100644
--- a/gpu/src/GrGpuGL.cpp
+++ b/gpu/src/GrGpuGL.cpp
@@ -471,10 +471,11 @@
// TODO: Make these a preprocess that generate some compile time constants.
// TODO: probe once at startup, rather than once per context creation.
- fNPOTRenderTargetSupport = GrGLGetGLInterface()->fNPOTRenderTargetSupport;
- if (fNPOTRenderTargetSupport < 0) {
+ if (GrGLGetGLInterface()->fNPOTRenderTargetSupport < 0) {
fNPOTRenderTargetSupport =
probe_for_npot_render_target_support(fNPOTTextureSupport);
+ } else {
+ fNPOTRenderTargetSupport = GrGLGetGLInterface()->fNPOTRenderTargetSupport;
}
if (gPrintStartupSpew) {