blob: 4351f66f33cb98cfab1d4a668587259a65c9e692 [file] [log] [blame]
bsalomon@google.com373a6632011-10-19 20:43:20 +00001
2/*
3 * Copyright 2011 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8#ifndef SkMesaGLContext_DEFINED
9#define SkMesaGLContext_DEFINED
10
11#include "SkGLContext.h"
12
13#if SK_MESA
14
15class SkMesaGLContext : public SkGLContext {
16public:
17 SkMesaGLContext();
18
19 virtual ~SkMesaGLContext();
20
21 virtual void makeCurrent() const SK_OVERRIDE;
22
23protected:
24 virtual const GrGLInterface* createGLContext() SK_OVERRIDE;
25 void destroyGLContext() SK_OVERRIDE;
26
27private:
bsalomon@google.comd92780b2011-10-20 21:54:46 +000028 typedef intptr_t Context;
bsalomon@google.com373a6632011-10-19 20:43:20 +000029 Context fContext;
30 GrGLubyte *fImage;
31};
32
33#endif
34
bsalomon@google.comd92780b2011-10-20 21:54:46 +000035#endif