23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 #ifndef MTLVertexCache_h_Included |
26 #ifndef MTLVertexCache_h_Included |
27 #define MTLVertexCache_h_Included |
27 #define MTLVertexCache_h_Included |
28 |
|
29 #include "j2d_md.h" |
28 #include "j2d_md.h" |
30 #include "MTLContext.h" |
29 #include "MTLContext.h" |
|
30 #include "fontscalerdefs.h" |
31 |
31 |
32 /** |
32 /** |
33 * Constants that control the size of the vertex cache. |
33 * Constants that control the size of the vertex cache. |
34 */ |
34 */ |
35 #define MTLVC_MAX_INDEX 1024 |
35 #define MTLVC_MAX_INDEX 960 |
|
36 |
|
37 /** |
|
38 * Constants that control the size of the texture pool. |
|
39 */ |
|
40 #define MTLVC_MAX_TEX_INDEX 32 |
36 |
41 |
37 /** |
42 /** |
38 * Constants that control the size of the texture tile cache used for |
43 * Constants that control the size of the texture tile cache used for |
39 * mask operations. |
44 * mask operations. |
40 */ |
45 */ |
64 |
69 |
65 /** |
70 /** |
66 * Exported methods. |
71 * Exported methods. |
67 */ |
72 */ |
68 jboolean MTLVertexCache_InitVertexCache(MTLContext *mtlc); |
73 jboolean MTLVertexCache_InitVertexCache(MTLContext *mtlc); |
69 void MTLVertexCache_FlushVertexCache(); |
74 void MTLVertexCache_FlushVertexCache(MTLContext *mtlc); |
70 void MTLVertexCache_RestoreColorState(MTLContext *mtlc); |
75 void MTLVertexCache_RestoreColorState(MTLContext *mtlc); |
71 |
76 |
72 void MTLVertexCache_EnableMaskCache(MTLContext *mtlc); |
77 void MTLVertexCache_EnableMaskCache(MTLContext *mtlc); |
73 void MTLVertexCache_DisableMaskCache(MTLContext *mtlc); |
78 void MTLVertexCache_DisableMaskCache(MTLContext *mtlc); |
74 void MTLVertexCache_AddMaskQuad(MTLContext *mtlc, |
79 void MTLVertexCache_AddMaskQuad(MTLContext *mtlc, |
75 jint srcx, jint srcy, |
80 jint srcx, jint srcy, |
76 jint dstx, jint dsty, |
81 jint dstx, jint dsty, |
77 jint width, jint height, |
82 jint width, jint height, |
78 jint maskscan, void *mask); |
83 jint maskscan, void *mask); |
79 |
84 |
80 void MTLVertexCache_AddGlyphQuad(MTLContext *mtlc, |
85 void MTLVertexCache_AddGlyphTexture(MTLContext *mtlc, |
81 jfloat tx1, jfloat ty1, |
86 jint width, jint height, |
82 jfloat tx2, jfloat ty2, |
87 GlyphInfo *ginfo); |
83 jfloat dx1, jfloat dy1, |
88 void MTLVertexCache_AddVertexTriangles(jfloat dx1, jfloat dy1, |
84 jfloat dx2, jfloat dy2); |
89 jfloat dx2, jfloat dy2); |
|
90 void MTLVertexCache_CreateSamplingEncoder(MTLContext *mtlc, BMTLSDOps *dstOps); |
85 |
91 |
86 #endif /* MTLVertexCache_h_Included */ |
92 #endif /* MTLVertexCache_h_Included */ |