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

Side by Side Diff: tools/gpu/gl/null/NullGLTestContext.cpp

Issue 1882563002: Enable NV_path_rendering in the Null GL. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Rebased to resolve merge conflict 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
« no previous file with comments | « tools/gpu/gl/null/NullGLTestContext.h ('k') | no next file » | 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 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 8
9 #include "NullGLTestContext.h" 9 #include "NullGLTestContext.h"
10 #include "gl/GrGLTestInterface.h" 10 #include "gl/GrGLTestInterface.h"
11 #include "gl/GrGLDefines.h" 11 #include "gl/GrGLDefines.h"
12 #include "gl/GrGLInterface.h" 12 #include "gl/GrGLInterface.h"
13 #include "gl/GrGLTypes.h" 13 #include "gl/GrGLTypes.h"
14 #include "SkMutex.h" 14 #include "SkMutex.h"
15 #include "SkTDArray.h" 15 #include "SkTDArray.h"
16 16
17 namespace { 17 namespace {
18 class NullGLContext : public sk_gpu_test::GLTestContext { 18 class NullGLContext : public sk_gpu_test::GLTestContext {
19 public: 19 public:
20 NullGLContext() { this->init(GrGLCreateNullInterface()); } 20 NullGLContext(bool enableNVPR) { this->init(GrGLCreateNullInterface(enableNV PR)); }
21 ~NullGLContext() override { this->teardown(); } 21 ~NullGLContext() override { this->teardown(); }
22 22
23 private: 23 private:
24 void onPlatformMakeCurrent() const override {}; 24 void onPlatformMakeCurrent() const override {};
25 void onPlatformSwapBuffers() const override {} 25 void onPlatformSwapBuffers() const override {}
26 GrGLFuncPtr onPlatformGetProcAddress(const char*) const override { return nu llptr; } 26 GrGLFuncPtr onPlatformGetProcAddress(const char*) const override { return nu llptr; }
27 }; 27 };
28 28
29 } // anonymous namespace 29 } // anonymous namespace
30 30
31 namespace sk_gpu_test { 31 namespace sk_gpu_test {
32 GLTestContext* CreateNullGLTestContext() { 32 GLTestContext* CreateNullGLTestContext(bool enableNVPR) {
33 GLTestContext* ctx = new NullGLContext(); 33 GLTestContext* ctx = new NullGLContext(enableNVPR);
34 if (ctx->isValid()) { 34 if (ctx->isValid()) {
35 return ctx; 35 return ctx;
36 } 36 }
37 delete ctx; 37 delete ctx;
38 return nullptr; 38 return nullptr;
39 } 39 }
40 } // namespace sk_gpu_test 40 } // namespace sk_gpu_test
41 41
OLDNEW
« no previous file with comments | « tools/gpu/gl/null/NullGLTestContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698