void destroyContexts() {
for (int i = 0; i < fContexts.count(); ++i) {
- if (NULL != fContexts[i].fGLContext) { // could be abandoned.
+ if (fContexts[i].fGLContext) { // could be abandoned.
fContexts[i].fGLContext->makeCurrent();
}
fContexts[i].fGrContext->unref();
- if (NULL != fContexts[i].fGLContext) {
+ if (fContexts[i].fGLContext) {
fContexts[i].fGLContext->unref();
}
}
void abandonContexts() {
for (int i = 0; i < fContexts.count(); ++i) {
- if (NULL != fContexts[i].fGLContext) {
+ if (fContexts[i].fGLContext) {
fContexts[i].fGLContext->testAbandon();
SkSafeSetNull(fContexts[i].fGLContext);
}
return NULL;
}
+ const GrContext::Options& getGlobalOptions() const { return fGlobalOptions; }
+
private:
struct GPUContext {
GLContextType fType;