aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/SkNullGLContext.cpp5
-rw-r--r--src/gpu/gl/angle/SkANGLEGLContext.cpp7
-rw-r--r--src/gpu/gl/debug/SkDebugGLContext.h5
-rw-r--r--src/gpu/gl/mesa/SkMesaGLContext.h5
4 files changed, 9 insertions, 13 deletions
diff --git a/src/gpu/gl/SkNullGLContext.cpp b/src/gpu/gl/SkNullGLContext.cpp
index e7270c32c4..dafa1ef0bc 100644
--- a/src/gpu/gl/SkNullGLContext.cpp
+++ b/src/gpu/gl/SkNullGLContext.cpp
@@ -578,10 +578,7 @@ static void set_current_context_from_interface(const GrGLInterface* interface) {
}
#endif
-SkNullGLContext* SkNullGLContext::Create(GrGLStandard forcedGpuAPI) {
- if (kGLES_GrGLStandard == forcedGpuAPI) {
- return nullptr;
- }
+SkNullGLContext* SkNullGLContext::Create() {
SkNullGLContext* ctx = new SkNullGLContext;
if (!ctx->isValid()) {
delete ctx;
diff --git a/src/gpu/gl/angle/SkANGLEGLContext.cpp b/src/gpu/gl/angle/SkANGLEGLContext.cpp
index 54ef02d492..2c9f38e1d9 100644
--- a/src/gpu/gl/angle/SkANGLEGLContext.cpp
+++ b/src/gpu/gl/angle/SkANGLEGLContext.cpp
@@ -180,7 +180,12 @@ GrGLuint SkANGLEGLContext::eglImageToExternalTexture(GrEGLImage image) const {
}
SkGLContext* SkANGLEGLContext::createNew() const {
- SkGLContext* ctx = SkANGLEGLContext::Create(this->gl()->fStandard, fIsGLBackend);
+#ifdef SK_BUILD_FOR_WIN
+ SkGLContext* ctx = fIsGLBackend ? SkANGLEGLContext::CreateOpenGL()
+ : SkANGLEGLContext::CreateDirectX();
+#else
+ SkGLContext* ctx = SkANGLEGLContext::CreateOpenGL();
+#endif
if (ctx) {
ctx->makeCurrent();
}
diff --git a/src/gpu/gl/debug/SkDebugGLContext.h b/src/gpu/gl/debug/SkDebugGLContext.h
index abbcf559c5..113a254e0b 100644
--- a/src/gpu/gl/debug/SkDebugGLContext.h
+++ b/src/gpu/gl/debug/SkDebugGLContext.h
@@ -14,10 +14,7 @@ class SkDebugGLContext : public SkGLContext {
public:
~SkDebugGLContext() override;
- static SkDebugGLContext* Create(GrGLStandard forcedGpuAPI) {
- if (kGLES_GrGLStandard == forcedGpuAPI) {
- return nullptr;
- }
+ static SkDebugGLContext* Create() {
return new SkDebugGLContext;
}
private:
diff --git a/src/gpu/gl/mesa/SkMesaGLContext.h b/src/gpu/gl/mesa/SkMesaGLContext.h
index a58f1c890e..a9c77a81da 100644
--- a/src/gpu/gl/mesa/SkMesaGLContext.h
+++ b/src/gpu/gl/mesa/SkMesaGLContext.h
@@ -19,10 +19,7 @@ private:
public:
~SkMesaGLContext() override;
- static SkMesaGLContext* Create(GrGLStandard forcedGpuAPI) {
- if (kGLES_GrGLStandard == forcedGpuAPI) {
- return nullptr;
- }
+ static SkMesaGLContext* Create() {
SkMesaGLContext* ctx = new SkMesaGLContext;
if (!ctx->isValid()) {
delete ctx;