< prev index next >

src/java.desktop/windows/native/libawt/java2d/d3d/D3DPipelineManager.h

Print this page


   1 /*
   2  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  60     // @param *monHds list of monitor handles retrieved from GDI
  61     // @param monNum number of gdi monitors
  62     static
  63     HRESULT HandleAdaptersChange(HMONITOR *monHds, UINT monNum);
  64     // returns depth stencil buffer format matching adapterFormat and render target
  65     // format for the device specified by adapterOrdinal/devType
  66     D3DFORMAT GetMatchingDepthStencilFormat(UINT adapterOrdinal,
  67                                             D3DFORMAT adapterFormat,
  68                                             D3DFORMAT renderTargetFormat);
  69 
  70     HWND GetCurrentFocusWindow();
  71     // returns previous fs window
  72     HWND SetFSFocusWindow(UINT, HWND);
  73 
  74     LPDIRECT3D9 GetD3DObject() { return pd3d9; }
  75     D3DDEVTYPE GetDeviceType() { return devType; }
  76 
  77     // returns the d3d adapter ordinal given GDI screen number:
  78     // these may differ depending on which display is primary
  79     UINT GetAdapterOrdinalForScreen(jint gdiScreen);
  80 
  81     // notifies adapter event listeners by calling
  82     // AccelDeviceEventNotifier.eventOccured()
  83     static
  84     void NotifyAdapterEventListeners(UINT adapter, jint eventType);
  85 
  86 private:
  87     D3DPipelineManager(void);
  88    ~D3DPipelineManager(void);
  89 
  90     // Creates a Direct3D9 object and initializes adapters.
  91     HRESULT InitD3D(void);
  92     // Releases adapters, Direct3D9 object and the d3d9 library.
  93     HRESULT ReleaseD3D();
  94 
  95     // selects the device type based on user input and available
  96     // device types
  97     D3DDEVTYPE SelectDeviceType();
  98 
  99     // creates array of adapters (releases the old one first)
 100     HRESULT InitAdapters();
 101     // releases each adapter's context, and then releases the array
 102     HRESULT ReleaseAdapters();
 103 
 104     HWND    CreateDefaultFocusWindow();


   1 /*
   2  * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  60     // @param *monHds list of monitor handles retrieved from GDI
  61     // @param monNum number of gdi monitors
  62     static
  63     HRESULT HandleAdaptersChange(HMONITOR *monHds, UINT monNum);
  64     // returns depth stencil buffer format matching adapterFormat and render target
  65     // format for the device specified by adapterOrdinal/devType
  66     D3DFORMAT GetMatchingDepthStencilFormat(UINT adapterOrdinal,
  67                                             D3DFORMAT adapterFormat,
  68                                             D3DFORMAT renderTargetFormat);
  69 
  70     HWND GetCurrentFocusWindow();
  71     // returns previous fs window
  72     HWND SetFSFocusWindow(UINT, HWND);
  73 
  74     LPDIRECT3D9 GetD3DObject() { return pd3d9; }
  75     D3DDEVTYPE GetDeviceType() { return devType; }
  76 
  77     // returns the d3d adapter ordinal given GDI screen number:
  78     // these may differ depending on which display is primary
  79     UINT GetAdapterOrdinalForScreen(jint gdiScreen);





  80 
  81 private:
  82     D3DPipelineManager(void);
  83    ~D3DPipelineManager(void);
  84 
  85     // Creates a Direct3D9 object and initializes adapters.
  86     HRESULT InitD3D(void);
  87     // Releases adapters, Direct3D9 object and the d3d9 library.
  88     HRESULT ReleaseD3D();
  89 
  90     // selects the device type based on user input and available
  91     // device types
  92     D3DDEVTYPE SelectDeviceType();
  93 
  94     // creates array of adapters (releases the old one first)
  95     HRESULT InitAdapters();
  96     // releases each adapter's context, and then releases the array
  97     HRESULT ReleaseAdapters();
  98 
  99     HWND    CreateDefaultFocusWindow();


< prev index next >