Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Side by Side Diff: include/gpu/gl/SkMesaGLContext.h

Issue 26701002: Add swapBuffer call to SkGLContextHelper. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: ios Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #ifndef SkMesaGLContext_DEFINED 8 #ifndef SkMesaGLContext_DEFINED
9 #define SkMesaGLContext_DEFINED 9 #define SkMesaGLContext_DEFINED
10 10
11 #include "SkGLContextHelper.h" 11 #include "SkGLContextHelper.h"
12 12
13 #if SK_MESA 13 #if SK_MESA
14 14
15 class SkMesaGLContext : public SkGLContextHelper { 15 class SkMesaGLContext : public SkGLContextHelper {
16 private: 16 private:
17 typedef intptr_t Context; 17 typedef intptr_t Context;
18 18
19 public: 19 public:
20 SkMesaGLContext(); 20 SkMesaGLContext();
21 21
22 virtual ~SkMesaGLContext(); 22 virtual ~SkMesaGLContext();
23 23
24 virtual void makeCurrent() const SK_OVERRIDE; 24 virtual void makeCurrent() const SK_OVERRIDE;
25 virtual void swapBuffers() const SK_OVERRIDE;
25 26
26 class AutoContextRestore { 27 class AutoContextRestore {
27 public: 28 public:
28 AutoContextRestore(); 29 AutoContextRestore();
29 ~AutoContextRestore(); 30 ~AutoContextRestore();
30 31
31 private: 32 private:
32 Context fOldContext; 33 Context fOldContext;
33 GrGLint fOldWidth; 34 GrGLint fOldWidth;
34 GrGLint fOldHeight; 35 GrGLint fOldHeight;
35 GrGLint fOldFormat; 36 GrGLint fOldFormat;
36 void* fOldImage; 37 void* fOldImage;
37 }; 38 };
38 39
39 protected: 40 protected:
40 virtual const GrGLInterface* createGLContext() SK_OVERRIDE; 41 virtual const GrGLInterface* createGLContext() SK_OVERRIDE;
41 virtual void destroyGLContext() SK_OVERRIDE; 42 virtual void destroyGLContext() SK_OVERRIDE;
42 43
43 private: 44 private:
44 Context fContext; 45 Context fContext;
45 GrGLubyte *fImage; 46 GrGLubyte *fImage;
46 }; 47 };
47 48
48 #endif 49 #endif
49 50
50 #endif 51 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698