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

Side by Side Diff: src/gpu/gl/nacl/SkCreatePlatformGLContext_nacl.cpp

Issue 630843002: Make the Sk GL context class an abstract base class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix android link problem and ios compile problem Created 6 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
« no previous file with comments | « src/gpu/gl/mesa/SkMesaGLContext.cpp ('k') | src/gpu/gl/nacl/SkNativeGLContext_nacl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1
2 /*
3 * Copyright 2012 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 #include "gl/SkGLContext.h"
9
10 #include <GLES2/gl2.h>
11 #include <EGL/egl.h>
12
13 namespace {
14 class NACLGLContext : public SkGLContext {
15 public:
16 SkGLContextEGL();
17
18 virtual ~NACLGLContext();
19
20 virtual void makeCurrent() const SK_OVERRIDE;
21 virtual void swapBuffers() const SK_OVERRIDE;
22 protected:
23 virtual const GrGLInterface* createGLContext(GrGLStandard forcedGpuAPI) SK_O VERRIDE;
24 virtual void destroyGLContext() SK_OVERRIDE;
25
26 private:
27 EGLContext fContext;
28 EGLDisplay fDisplay;
29 EGLSurface fSurface;
30 };
31
32 NACLGLContext::NACLGLContext()
33 : fContext(NULL)
34 , fDisplay(NULL)
35 {
36 }
37
38 NACLGLContext::~NACLGLContext() {
39 this->destroyGLContext();
40 }
41
42 void NACLGLContext::destroyGLContext() {
43 }
44
45 const GrGLInterface* NACLGLContext::createGLContext(GrGLStandard forcedGpuAPI) {
46 return NULL;
47 }
48
49 void NACLGLContext::makeCurrent() const {
50 }
51
52 void NACLGLContext::swapBuffers() const {
53 }
54
55 } // anonymous namespace
56
57 NACLGLContext* SkCreatePlatformGLContext() {
58 return SkNEW(NACLGLContext);
59 }
60
OLDNEW
« no previous file with comments | « src/gpu/gl/mesa/SkMesaGLContext.cpp ('k') | src/gpu/gl/nacl/SkNativeGLContext_nacl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698