aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/gl/angle/SkANGLEGLContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gpu/gl/angle/SkANGLEGLContext.h')
-rw-r--r--include/gpu/gl/angle/SkANGLEGLContext.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/gpu/gl/angle/SkANGLEGLContext.h b/include/gpu/gl/angle/SkANGLEGLContext.h
index 7858fff964..ea5e877ca2 100644
--- a/include/gpu/gl/angle/SkANGLEGLContext.h
+++ b/include/gpu/gl/angle/SkANGLEGLContext.h
@@ -15,18 +15,25 @@
class SkANGLEGLContext : public SkGLContext {
public:
~SkANGLEGLContext() override;
-
- static SkANGLEGLContext* Create(GrGLStandard forcedGpuAPI, bool useGLBackend) {
- if (kGL_GrGLStandard == forcedGpuAPI) {
+#ifdef SK_BUILD_FOR_WIN
+ static SkANGLEGLContext* CreateDirectX() {
+ SkANGLEGLContext* ctx = new SkANGLEGLContext(false);
+ if (!ctx->isValid()) {
+ delete ctx;
return NULL;
}
- SkANGLEGLContext* ctx = new SkANGLEGLContext(useGLBackend);
+ return ctx;
+ }
+#endif
+ static SkANGLEGLContext* CreateOpenGL() {
+ SkANGLEGLContext* ctx = new SkANGLEGLContext(true);
if (!ctx->isValid()) {
delete ctx;
return NULL;
}
return ctx;
}
+
GrEGLImage texture2DToEGLImage(GrGLuint texID) const override;
void destroyEGLImage(GrEGLImage) const override;
GrGLuint eglImageToExternalTexture(GrEGLImage) const override;