/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "D3DPipeline.h"
#include <jlong.h>
#include "D3DSurfaceData.h"
#include "D3DPipelineManager.h"
#include "Trace.h"
#include "awt_Toolkit.h"
#include "awt_Window.h"
#include "awt_BitmapUtil.h"
#include "D3DRenderQueue.h"
// REMIND: move to awt_Component.h
/**
* Initializes nativeWidth/Height fields of the SurfaceData object with
* dimensions on the native surface.
*/
} else {
}
}
{
{
if (pCtx->GetResourceManager()) {
}
}
}
}
void
{
}
// ------------ generic SurfaceData.h functions ----------------
void
{
"dispose", "(J)V",
ptr_to_jlong(ops));
}
/**
* This is the implementation of the general surface LockFunc defined in
*/
{
return SD_FAILURE;
}
/**
* This is the implementation of the general GetRasInfoFunc defined in
*/
void
{
}
/**
* This is the implementation of the general surface UnlockFunc defined in
*/
void
{
}
// ------------ D3DSurfaceData's JNI methods ----------------
extern "C" {
/*
* Class: sun_java2d_d3d_D3DSurfaceData
* Method: initOps
* Signature: (III)V
*/
JNIEXPORT void
{
sizeof(D3DSDOps));
return;
}
}
/*
* Class: sun_java2d_d3d_D3DSurfaceData
* Method: initTexture
* Signature: (JZZ)Z
*/
{
return JNI_FALSE;
}
} else {
}
} else {
}
}
/*
* Class: sun_java2d_d3d_D3DSurfaceData
* Method: initPlain
* Signature: (JZ)Z
*/
{
return JNI_FALSE;
}
} else {
}
}
/*
* Class: sun_java2d_d3d_D3DSurfaceData
* Method: initFlipBackbuffer
* Signature: (JJIZ)Z
*/
{
RECT r = { 0, 0, 0, 0 };
"D3DSurfaceData_initFlipBackbuffer: disposed component");
return JNI_FALSE;
}
return JNI_FALSE;
}
// in full-screen mode we should v-sync
" windowed, forced interval: ONE");
} else {
" windowed, default interval: IMMEDIATE");
}
// REMIND: this is a workaround for the current issue
// we have with non-copy flip chains: since we can not specify
// the dest rectangle for Present for these modes, the result of
// Present(NULL, NULL) is scaled to the client area.
}
} else {
" full-screen, forced interval: IMMEDIATE");
} else {
" full-screen, default interval: ONE");
}
}
} else {
}
}
/*
* Class: sun_java2d_d3d_D3DSurfaceData
* Method: dbGetPixelNative
* Signature: (JII)I
*/
{
return pixel;
}
if (srcFmt == D3DFMT_X8R8G8B8) {
} else {
}
}
}
}
return pixel;
}
/*
* Class: sun_java2d_d3d_D3DSurfaceData
* Method: dbSetPixelNative
* Signature: (JIII)V
*/
{
return;
}
if (srcFmt == D3DFMT_X8R8G8B8) {
} else {
}
}
}
}
/*
* Class: sun_java2d_d3d_D3DSurfaceData
* Method: getNativeResourceNative
* Signature: (JI)J
*/
{
if (resType == D3D_DEVICE_RESOURCE) {
return 0L;
}
}
}
}
if (resType == FLIP_BACKBUFFER) {
}
return 0L;
}
/*
* Class: sun_java2d_d3d_D3DSurfaceData
* Method: updateWindowAccelImpl
* Signature: (JJII)Z
*/
{
if (w <= 0 || h <= 0) {
return JNI_TRUE;
}
return JNI_FALSE;
}
&pLockableRes);
return JNI_FALSE;
}
return JNI_FALSE;
}
hBitmap =
(int*)lockedRect.pBits);
}
// hBitmap is released in UpdateWindow
return JNI_TRUE;
}
}