< prev index next >

src/java.desktop/windows/native/libawt/java2d/d3d/D3DContext.cpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -683,68 +683,10 @@
         }
     }
     return res;
 }
 
-HRESULT
-D3DContext::SaveState()
-{
-    HRESULT res;
-
-    RETURN_STATUS_IF_NULL(pd3dDevice, S_OK);
-
-    J2dTraceLn(J2D_TRACE_INFO, "D3DContext::SaveState");
-
-    FlushVertexQueue();
-    UpdateState(STATE_CHANGE);
-
-    if (pStateBlock != NULL) {
-        J2dTraceLn(J2D_TRACE_WARNING,
-                   "D3DContext::SaveState: existing state block!");
-        SAFE_RELEASE(pStateBlock);
-    }
-
-    if (SUCCEEDED(res =
-            pd3dDevice->CreateStateBlock(D3DSBT_ALL, &pStateBlock)))
-    {
-        J2dTraceLn(J2D_TRACE_VERBOSE, "  created state block");
-    } else {
-        J2dTraceLn(J2D_TRACE_WARNING,
-                   "D3DContext::SaveState: failed to create state block");
-    }
-    ZeroMemory(lastTexture, sizeof(lastTexture));
-
-    return res;
-}
-
-HRESULT
-D3DContext::RestoreState()
-{
-    HRESULT res = S_OK;
-
-    J2dTraceLn(J2D_TRACE_INFO, "D3DContext::RestoreState");
-
-    FlushVertexQueue();
-    UpdateState(STATE_CHANGE);
-
-    if (pStateBlock != NULL) {
-        if (SUCCEEDED(res = pStateBlock->Apply())) {
-            J2dTraceLn(J2D_TRACE_VERBOSE, "  restored device state");
-        } else {
-            J2dTraceLn(J2D_TRACE_WARNING,
-                       "D3DContext::RestoreState: failed to restore state");
-        }
-        SAFE_RELEASE(pStateBlock);
-    } else {
-        J2dTraceLn(J2D_TRACE_WARNING,
-                   "D3DContext::RestoreState: empty state block!");
-    }
-    ZeroMemory(lastTexture, sizeof(lastTexture));
-
-    return res;
-}
-
 #define POINT_FILTER_CAP (D3DPTFILTERCAPS_MAGFPOINT|D3DPTFILTERCAPS_MINFPOINT)
 #define LINEAR_FILTER_CAP (D3DPTFILTERCAPS_MAGFLINEAR|D3DPTFILTERCAPS_MINFLINEAR)
 
 BOOL
 D3DContext::IsStretchRectFilteringSupported(D3DTEXTUREFILTERTYPE fType)
< prev index next >