src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MetalSurfaceData.h
author aghaisas
Wed, 20 Feb 2019 17:00:40 +0530
branchmetal-prototype-branch
changeset 57196 a95707a39ff5
permissions -rw-r--r--
Description : Metal Rendering Pipeline - initial implementation of line and quad rendering Contributed-by: jdv, aghaisas
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
57196
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
     1
/*
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
     2
 * Copyright (c) 2019, 2019, Oracle and/or its affiliates. All rights reserved.
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
     4
 *
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    10
 *
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    15
 * accompanied this code).
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    16
 *
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    20
 *
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    23
 * questions.
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    24
 */
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    25
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    26
#ifndef MetalSurfaceData_h_Included
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    27
#define MetalSurfaceData_h_Included
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    28
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    29
#import "SurfaceData.h"
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    30
#import "MetalGraphicsConfig.h"
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    31
#import "AWTWindow.h"
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    32
#import "MetalLayer.h"
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    33
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    34
/**
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    35
 * The MetalSDOps structure contains the Metal-specific information for
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    36
 * given MetalSurfaceData.
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    37
 */
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    38
typedef struct _MetalSDOps {
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    39
    SurfaceDataOps           sdOps;
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    40
    AWTView                  *peerData;
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    41
    MetalLayer               *layer;
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    42
    //GLclampf              argb[4]; // background clear color
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    43
    MetalGraphicsConfigInfo  *configInfo;
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    44
    jint                     xOffset;
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    45
    jint                     yOffset;
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    46
    jboolean                 isOpaque;
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    47
    id<MTLTexture>           mtlTexture;
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    48
    //id<MTLRenderPipelineState> renderPipelineState;
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    49
    jint                  width;
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    50
    jint                  height;
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    51
} MetalSDOps;
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    52
a95707a39ff5 Description : Metal Rendering Pipeline - initial implementation of line and quad rendering
aghaisas
parents:
diff changeset
    53
#endif /* MetalSurfaceData_h_Included */