FBO probing at Context startup is very expensive. This patch removes the
test of whether FBOs work at all, and adds parameters to the GrGLInterface
so that values can be passed into the Context creation routines instead
of executing the probes.
The GrGLInterface now defaults to run FBO tests on Android (since hardware
varies), but assumes success on desktop and software platforms.
git-svn-id: http://skia.googlecode.com/svn/trunk@1582 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/win/GrGLDefaultInterface_win.cpp b/gpu/src/win/GrGLDefaultInterface_win.cpp
index 428abb1..7f680a67 100644
--- a/gpu/src/win/GrGLDefaultInterface_win.cpp
+++ b/gpu/src/win/GrGLDefaultInterface_win.cpp
@@ -32,7 +32,7 @@
static GrGLInterface gDefaultInterface;
static bool gDefaultInterfaceInit;
if (!gDefaultInterfaceInit) {
-
+
// wglGetProcAddress requires a context.
if (NULL != wglGetCurrentContext()) {
int major, minor;
@@ -45,7 +45,11 @@
return;
}
- // Functions that are part of GL 1.1 will return NULL in
+ gDefaultInterface.fNPOTRenderTargetSupport = 1;
+ gDefaultInterface.fMinRenderTargetHeight = 1;
+ gDefaultInterface.fMinRenderTargetWidth = 1;
+
+ // Functions that are part of GL 1.1 will return NULL in
// wglGetProcAddress
gDefaultInterface.fBlendFunc = glBlendFunc;
gDefaultInterface.fClear = glClear;