3 * Copyright 2011 Google Inc.
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
8 #ifndef SkMesaGLContext_DEFINED
9 #define SkMesaGLContext_DEFINED
11 #include "gl/SkGLContext.h"
15 class SkMesaGLContext : public SkGLContext {
17 typedef intptr_t Context;
20 ~SkMesaGLContext() override;
21 void makeCurrent() const override;
22 void swapBuffers() const override;
24 static SkMesaGLContext* Create(GrGLStandard forcedGpuAPI) {
25 if (kGLES_GrGLStandard == forcedGpuAPI) {
28 SkMesaGLContext* ctx = SkNEW(SkMesaGLContext);
29 if (!ctx->isValid()) {
38 void destroyGLContext();