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

Side by Side Diff: tools/gpu/gl/command_buffer/GLContext_command_buffer.h

Issue 1815823002: Move SkGLContext and some GrGLInterface implementations to skgputest module (Closed) Base URL: https://chromium.googlesource.com/skia.git@debugobject
Patch Set: fix windows and android? Created 4 years, 8 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
OLDNEW
(Empty)
1
2 /*
3 * Copyright 2015 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
9 #ifndef GLContext_command_buffer_DEFINED
10 #define GLContext_command_buffer_DEFINED
11
12 #include "gl/GLContext.h"
13
14 namespace sk_gpu_test {
15 class CommandBufferGLContext : public GLContext {
16 public:
17 ~CommandBufferGLContext() override;
18
19 static CommandBufferGLContext *Create() {
20 CommandBufferGLContext *ctx = new CommandBufferGLContext;
21 if (!ctx->isValid()) {
22 delete ctx;
23 return nullptr;
24 }
25 return ctx;
26 }
27
28 static CommandBufferGLContext *Create(void *nativeWindow, int msaaSampleCoun t) {
29 CommandBufferGLContext *ctx = new CommandBufferGLContext(nativeWindow, m saaSampleCount);
30 if (!ctx->isValid()) {
31 delete ctx;
32 return nullptr;
33 }
34 return ctx;
35 }
36
37 void presentCommandBuffer();
38
39 bool makeCurrent();
40
41 int getStencilBits();
42
43 int getSampleCount();
44
45 private:
46 CommandBufferGLContext();
47
48 CommandBufferGLContext(void *nativeWindow, int msaaSampleCount);
49
50 void initializeGLContext(void *nativeWindow, const int *configAttribs,
51 const int *surfaceAttribs);
52
53 void destroyGLContext();
54
55 void onPlatformMakeCurrent() const override;
56
57 void onPlatformSwapBuffers() const override;
58
59 GrGLFuncPtr onPlatformGetProcAddress(const char *name) const override;
60
61 void *fContext;
62 void *fDisplay;
63 void *fSurface;
64 void *fConfig;
65 };
66 } // namespace sk_gpu_test
67
68 #endif
OLDNEW
« no previous file with comments | « tools/gpu/gl/angle/GLContext_angle.cpp ('k') | tools/gpu/gl/command_buffer/GLContext_command_buffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698