Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / src / gpu / gl / SkGLContextHelper.cpp
index b06f755..411e1de 100644 (file)
@@ -27,13 +27,14 @@ SkGLContextHelper::~SkGLContextHelper() {
     SkSafeUnref(fGL);
 }
 
-bool SkGLContextHelper::init(int width, int height) {
+bool SkGLContextHelper::init(GrGLStandard forcedGpuAPI, int width,
+                             int height) {
     if (fGL) {
         fGL->unref();
         this->destroyGLContext();
     }
 
-    fGL = this->createGLContext();
+    fGL = this->createGLContext(forcedGpuAPI);
     if (fGL) {
         const GrGLubyte* temp;
 
@@ -133,3 +134,9 @@ bool SkGLContextHelper::init(int width, int height) {
     }
     return false;
 }
+
+void SkGLContextHelper::testAbandon() {
+    if (NULL != fGL) {
+        fGL->abandon();
+    }
+}