< prev index next >

src/java.desktop/windows/classes/sun/java2d/d3d/D3DContext.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2007, 2013, 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 --- 1,7 ---- /* ! * 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
*** 24,46 **** */ package sun.java2d.d3d; import java.lang.annotation.Native; import sun.java2d.pipe.BufferedContext; import sun.java2d.pipe.RenderBuffer; import sun.java2d.pipe.RenderQueue; import sun.java2d.pipe.hw.ContextCapabilities; ! import static sun.java2d.pipe.BufferedOpCodes.*; ! import static sun.java2d.pipe.hw.ContextCapabilities.*; ! import static sun.java2d.d3d.D3DContext.D3DContextCaps.*; /** * Note that the RenderQueue lock must be acquired before calling any of * the methods in this class. */ ! class D3DContext extends BufferedContext { private final D3DGraphicsDevice device; D3DContext(RenderQueue rq, D3DGraphicsDevice device) { super(rq); --- 24,47 ---- */ package sun.java2d.d3d; import java.lang.annotation.Native; + import sun.java2d.pipe.BufferedContext; import sun.java2d.pipe.RenderBuffer; import sun.java2d.pipe.RenderQueue; import sun.java2d.pipe.hw.ContextCapabilities; ! ! import static sun.java2d.pipe.BufferedOpCodes.INVALIDATE_CONTEXT; ! import static sun.java2d.pipe.BufferedOpCodes.SET_SCRATCH_SURFACE; /** * Note that the RenderQueue lock must be acquired before calling any of * the methods in this class. */ ! final class D3DContext extends BufferedContext { private final D3DGraphicsDevice device; D3DContext(RenderQueue rq, D3DGraphicsDevice device) { super(rq);
*** 99,144 **** rq.ensureCapacity(8); buf.putInt(SET_SCRATCH_SURFACE); buf.putInt(d3dc.getDevice().getScreen()); } - public RenderQueue getRenderQueue() { - return D3DRenderQueue.getInstance(); - } - - @Override - public void saveState() { - // assert rq.lock.isHeldByCurrentThread(); - - // reset all attributes of this and current contexts - invalidateContext(); - invalidateCurrentContext(); - - setScratchSurface(this); - - // save the state on the native level - rq.ensureCapacity(4); - buf.putInt(SAVE_STATE); - rq.flushNow(); - } - - @Override - public void restoreState() { - // assert rq.lock.isHeldByCurrentThread(); - - // reset all attributes of this and current contexts - invalidateContext(); - invalidateCurrentContext(); - - setScratchSurface(this); - - // restore the state on the native level - rq.ensureCapacity(4); - buf.putInt(RESTORE_STATE); - rq.flushNow(); - } - D3DGraphicsDevice getDevice() { return device; } static class D3DContextCaps extends ContextCapabilities { --- 100,109 ----
< prev index next >