bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 1 | |
| 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 | |
| 15 | class SkMesaGLContext : public SkGLContext { |
| 16 | public: |
| 17 | SkMesaGLContext(); |
| 18 | |
| 19 | virtual ~SkMesaGLContext(); |
| 20 | |
| 21 | virtual void makeCurrent() const SK_OVERRIDE; |
| 22 | |
| 23 | protected: |
| 24 | virtual const GrGLInterface* createGLContext() SK_OVERRIDE; |
| 25 | void destroyGLContext() SK_OVERRIDE; |
| 26 | |
| 27 | private: |
bsalomon@google.com | d92780b | 2011-10-20 21:54:46 +0000 | [diff] [blame] | 28 | typedef intptr_t Context; |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 29 | Context fContext; |
| 30 | GrGLubyte *fImage; |
| 31 | }; |
| 32 | |
| 33 | #endif |
| 34 | |
bsalomon@google.com | d92780b | 2011-10-20 21:54:46 +0000 | [diff] [blame] | 35 | #endif |