Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / platform / graphics / GraphicsContextStateSaver.h
index 0993d6a..7134a98 100644 (file)
@@ -58,6 +58,13 @@ public:
         m_saveAndRestore = true;
     }
 
+    void saveIfNeeded()
+    {
+        if (saved())
+            return;
+        save();
+    }
+
     void restore()
     {
         ASSERT(m_saveAndRestore);