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

Side by Side Diff: include/gpu/gl/command_buffer/SkCommandBufferGLContext.h

Issue 1490113005: Add config options to run different GPU APIs to dm and nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@commandbuffer-as-api-03-context-factory-glcontext-type
Patch Set: Created 5 years 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 | « include/gpu/gl/angle/SkANGLEGLContext.h ('k') | src/core/SkString.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 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 SKCOMMANDBUFFERGLCONTEXT_DEFINED 8 #ifndef SKCOMMANDBUFFERGLCONTEXT_DEFINED
9 #define SKCOMMANDBUFFERGLCONTEXT_DEFINED 9 #define SKCOMMANDBUFFERGLCONTEXT_DEFINED
10 10
11 #if SK_COMMAND_BUFFER 11 #if SK_COMMAND_BUFFER
12 12
13 #include "gl/SkGLContext.h" 13 #include "gl/SkGLContext.h"
14 14
15 class SkCommandBufferGLContext : public SkGLContext { 15 class SkCommandBufferGLContext : public SkGLContext {
16 public: 16 public:
17 ~SkCommandBufferGLContext() override; 17 ~SkCommandBufferGLContext() override;
18 18
19 static SkCommandBufferGLContext* Create(GrGLStandard forcedGpuAPI) { 19 static SkCommandBufferGLContext* Create() {
20 if (kGL_GrGLStandard == forcedGpuAPI) {
21 return nullptr;
22 }
23 SkCommandBufferGLContext* ctx = new SkCommandBufferGLContext; 20 SkCommandBufferGLContext* ctx = new SkCommandBufferGLContext;
24 if (!ctx->isValid()) { 21 if (!ctx->isValid()) {
25 delete ctx; 22 delete ctx;
26 return nullptr; 23 return nullptr;
27 } 24 }
28 return ctx; 25 return ctx;
29 } 26 }
30 27
31 static SkCommandBufferGLContext* Create(void* nativeWindow, int msaaSampleCo unt) { 28 static SkCommandBufferGLContext* Create(void* nativeWindow, int msaaSampleCo unt) {
32 SkCommandBufferGLContext* ctx = new SkCommandBufferGLContext(nativeWindo w, 29 SkCommandBufferGLContext* ctx = new SkCommandBufferGLContext(nativeWindo w,
(...skipping 24 matching lines...) Expand all
57 54
58 void* fContext; 55 void* fContext;
59 void* fDisplay; 56 void* fDisplay;
60 void* fSurface; 57 void* fSurface;
61 void* fConfig; 58 void* fConfig;
62 }; 59 };
63 60
64 #endif // SK_COMMAND_BUFFER 61 #endif // SK_COMMAND_BUFFER
65 62
66 #endif 63 #endif
OLDNEW
« no previous file with comments | « include/gpu/gl/angle/SkANGLEGLContext.h ('k') | src/core/SkString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698