Merge branch 'master' into randr-1.2
This commit is contained in:
commit
b4659faf9b
|
@ -62,414 +62,99 @@ symlink_mesa_glapi() {
|
|||
src_dir src/mesa/glapi
|
||||
dst_dir mesa/glapi
|
||||
|
||||
action dispatch.h
|
||||
action glapi.c
|
||||
action glapi.h
|
||||
action glapioffsets.h
|
||||
action glapitable.h
|
||||
action glapitemp.h
|
||||
action glprocs.h
|
||||
action glthread.c
|
||||
action glthread.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_main() {
|
||||
src_dir src/mesa/main
|
||||
dst_dir mesa/main
|
||||
|
||||
action accum.c
|
||||
action accum.h
|
||||
action api_arrayelt.c
|
||||
action api_arrayelt.h
|
||||
action api_eval.h
|
||||
action api_loopback.c
|
||||
action api_loopback.h
|
||||
action api_noop.c
|
||||
action api_noop.h
|
||||
action api_validate.c
|
||||
action api_validate.h
|
||||
action arrayobj.c
|
||||
action arrayobj.h
|
||||
action attrib.c
|
||||
action attrib.h
|
||||
action bitset.h
|
||||
action blend.c
|
||||
action blend.h
|
||||
action bufferobj.c
|
||||
action bufferobj.h
|
||||
action buffers.c
|
||||
action buffers.h
|
||||
action clip.c
|
||||
action clip.h
|
||||
action colormac.h
|
||||
action colortab.c
|
||||
action colortab.h
|
||||
action config.h
|
||||
action context.c
|
||||
action context.h
|
||||
action convolve.c
|
||||
action convolve.h
|
||||
action dd.h
|
||||
action debug.c
|
||||
action debug.h
|
||||
action depth.c
|
||||
action depth.h
|
||||
action depthstencil.c
|
||||
action depthstencil.h
|
||||
action dlist.c
|
||||
action dlist.h
|
||||
action drawpix.c
|
||||
action drawpix.h
|
||||
action enable.c
|
||||
action enable.h
|
||||
action enums.c
|
||||
action enums.h
|
||||
action eval.c
|
||||
action eval.h
|
||||
action execmem.c
|
||||
action extensions.c
|
||||
action extensions.h
|
||||
action fbobject.c
|
||||
action fbobject.h
|
||||
action feedback.c
|
||||
action feedback.h
|
||||
action fog.c
|
||||
action fog.h
|
||||
action framebuffer.c
|
||||
action framebuffer.h
|
||||
action get.c
|
||||
action get.h
|
||||
action getstring.c
|
||||
action glheader.h
|
||||
action hash.c
|
||||
action hash.h
|
||||
action hint.c
|
||||
action hint.h
|
||||
action histogram.c
|
||||
action histogram.h
|
||||
action image.c
|
||||
action image.h
|
||||
action imports.c
|
||||
action imports.h
|
||||
action light.c
|
||||
action light.h
|
||||
action lines.c
|
||||
action lines.h
|
||||
action macros.h
|
||||
action matrix.c
|
||||
action matrix.h
|
||||
action mm.c
|
||||
action mm.h
|
||||
action mtypes.h
|
||||
action occlude.c
|
||||
action occlude.h
|
||||
action pixel.c
|
||||
action pixel.h
|
||||
action points.c
|
||||
action points.h
|
||||
action polygon.c
|
||||
action polygon.h
|
||||
action rastpos.c
|
||||
action rastpos.h
|
||||
action rbadaptors.c
|
||||
action rbadaptors.h
|
||||
action renderbuffer.c
|
||||
action renderbuffer.h
|
||||
action simple_list.h
|
||||
action state.c
|
||||
action state.h
|
||||
action stencil.c
|
||||
action stencil.h
|
||||
action texcompress.c
|
||||
action texcompress.h
|
||||
action texcompress_fxt1.c
|
||||
action texcompress_s3tc.c
|
||||
action texenvprogram.c
|
||||
action texenvprogram.h
|
||||
action texformat.c
|
||||
action texformat.h
|
||||
action texformat_tmp.h
|
||||
action teximage.c
|
||||
action teximage.h
|
||||
action texobj.c
|
||||
action texobj.h
|
||||
action texrender.c
|
||||
action texrender.h
|
||||
action texstate.c
|
||||
action texstate.h
|
||||
action texstore.c
|
||||
action texstore.h
|
||||
action varray.c
|
||||
action varray.h
|
||||
action version.h
|
||||
action vsnprintf.c
|
||||
action vtxfmt.c
|
||||
action vtxfmt.h
|
||||
action vtxfmt_tmp.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_math() {
|
||||
src_dir src/mesa/math
|
||||
dst_dir mesa/math
|
||||
|
||||
action m_clip_tmp.h
|
||||
action m_copy_tmp.h
|
||||
action m_debug.h
|
||||
action m_debug_clip.c
|
||||
action m_debug_norm.c
|
||||
action m_debug_util.h
|
||||
action m_debug_xform.c
|
||||
action m_dotprod_tmp.h
|
||||
action m_eval.c
|
||||
action m_eval.h
|
||||
action m_matrix.c
|
||||
action m_matrix.h
|
||||
action m_norm_tmp.h
|
||||
action m_trans_tmp.h
|
||||
action m_translate.c
|
||||
action m_translate.h
|
||||
action m_vector.c
|
||||
action m_vector.h
|
||||
action m_xform.c
|
||||
action m_xform.h
|
||||
action m_xform_tmp.h
|
||||
action mathmod.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_ac() {
|
||||
src_dir src/mesa/array_cache
|
||||
dst_dir mesa/array_cache
|
||||
|
||||
action ac_context.c
|
||||
action ac_context.h
|
||||
action ac_import.c
|
||||
action acache.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_swrast() {
|
||||
src_dir src/mesa/swrast
|
||||
dst_dir mesa/swrast
|
||||
|
||||
action s_aaline.c
|
||||
action s_aaline.h
|
||||
action s_aalinetemp.h
|
||||
action s_aatriangle.c
|
||||
action s_aatriangle.h
|
||||
action s_aatritemp.h
|
||||
action s_accum.c
|
||||
action s_accum.h
|
||||
action s_alpha.c
|
||||
action s_alpha.h
|
||||
action s_arbshader.c
|
||||
action s_arbshader.h
|
||||
action s_atifragshader.c
|
||||
action s_atifragshader.h
|
||||
action s_bitmap.c
|
||||
action s_blend.c
|
||||
action s_blend.h
|
||||
action s_blit.c
|
||||
action s_buffers.c
|
||||
action s_context.c
|
||||
action s_context.h
|
||||
action s_copypix.c
|
||||
action s_depth.c
|
||||
action s_depth.h
|
||||
action s_drawpix.c
|
||||
action s_drawpix.h
|
||||
action s_feedback.c
|
||||
action s_feedback.h
|
||||
action s_fog.c
|
||||
action s_fog.h
|
||||
action s_imaging.c
|
||||
action s_lines.c
|
||||
action s_lines.h
|
||||
action s_linetemp.h
|
||||
action s_logic.c
|
||||
action s_logic.h
|
||||
action s_masking.c
|
||||
action s_masking.h
|
||||
action s_nvfragprog.c
|
||||
action s_nvfragprog.h
|
||||
action s_points.c
|
||||
action s_points.h
|
||||
action s_pointtemp.h
|
||||
action s_readpix.c
|
||||
action s_span.c
|
||||
action s_span.h
|
||||
action s_spantemp.h
|
||||
action s_stencil.c
|
||||
action s_stencil.h
|
||||
action s_texcombine.c
|
||||
action s_texcombine.h
|
||||
action s_texfilter.c
|
||||
action s_texfilter.h
|
||||
action s_texstore.c
|
||||
action s_triangle.c
|
||||
action s_triangle.h
|
||||
action s_trispan.h
|
||||
action s_tritemp.h
|
||||
action s_zoom.c
|
||||
action s_zoom.h
|
||||
action swrast.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_ss() {
|
||||
src_dir src/mesa/swrast_setup
|
||||
dst_dir mesa/swrast_setup
|
||||
|
||||
action ss_context.c
|
||||
action ss_context.h
|
||||
action ss_triangle.c
|
||||
action ss_triangle.h
|
||||
action ss_tritmp.h
|
||||
action ss_vb.h
|
||||
action swrast_setup.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_tnl() {
|
||||
src_dir src/mesa/tnl
|
||||
dst_dir mesa/tnl
|
||||
|
||||
action t_array_api.c
|
||||
action t_array_api.h
|
||||
action t_array_import.c
|
||||
action t_array_import.h
|
||||
action t_context.c
|
||||
action t_context.h
|
||||
action t_pipeline.c
|
||||
action t_pipeline.h
|
||||
action t_save_api.c
|
||||
action t_save_api.h
|
||||
action t_save_loopback.c
|
||||
action t_save_playback.c
|
||||
action t_vb_arbprogram.c
|
||||
action t_vb_arbprogram.h
|
||||
action t_vb_arbprogram_sse.c
|
||||
action t_vb_arbshader.c
|
||||
action t_vb_cliptmp.h
|
||||
action t_vb_cull.c
|
||||
action t_vb_fog.c
|
||||
action t_vb_light.c
|
||||
action t_vb_lighttmp.h
|
||||
action t_vb_normals.c
|
||||
action t_vb_points.c
|
||||
action t_vb_program.c
|
||||
action t_vb_render.c
|
||||
action t_vb_rendertmp.h
|
||||
action t_vb_texgen.c
|
||||
action t_vb_texmat.c
|
||||
action t_vb_vertex.c
|
||||
action t_vertex.c
|
||||
action t_vertex.h
|
||||
action t_vertex_generic.c
|
||||
action t_vertex_sse.c
|
||||
action t_vp_build.c
|
||||
action t_vp_build.h
|
||||
action t_vtx_api.c
|
||||
action t_vtx_api.h
|
||||
action t_vtx_eval.c
|
||||
action t_vtx_exec.c
|
||||
action t_vtx_generic.c
|
||||
action t_vtx_x86.c
|
||||
action tnl.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_shader() {
|
||||
src_dir src/mesa/shader
|
||||
dst_dir mesa/shader
|
||||
|
||||
action arbprogparse.c
|
||||
action arbprogparse.h
|
||||
action arbprogram.c
|
||||
action arbprogram.h
|
||||
action arbprogram_syn.h
|
||||
action atifragshader.c
|
||||
action atifragshader.h
|
||||
action nvfragparse.c
|
||||
action nvfragparse.h
|
||||
action nvprogram.c
|
||||
action nvprogram.h
|
||||
action nvvertexec.c
|
||||
action nvvertexec.h
|
||||
action nvvertparse.c
|
||||
action nvvertparse.h
|
||||
action program.c
|
||||
action program.h
|
||||
action program_instruction.h
|
||||
action shaderobjects.c
|
||||
action shaderobjects.h
|
||||
action shaderobjects_3dlabs.c
|
||||
action shaderobjects_3dlabs.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_shader_grammar() {
|
||||
src_dir src/mesa/shader/grammar
|
||||
dst_dir mesa/shader/grammar
|
||||
|
||||
action grammar.c
|
||||
action grammar.h
|
||||
action grammar_syn.h
|
||||
action grammar_mesa.c
|
||||
action grammar_mesa.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_shader_slang() {
|
||||
src_dir src/mesa/shader/slang
|
||||
dst_dir mesa/shader/slang
|
||||
|
||||
action slang_analyse.c
|
||||
action slang_analyse.h
|
||||
action slang_assemble.c
|
||||
action slang_assemble.h
|
||||
action slang_assemble_assignment.c
|
||||
action slang_assemble_assignment.h
|
||||
action slang_assemble_conditional.c
|
||||
action slang_assemble_conditional.h
|
||||
action slang_assemble_constructor.c
|
||||
action slang_assemble_constructor.h
|
||||
action slang_assemble_typeinfo.c
|
||||
action slang_assemble_typeinfo.h
|
||||
action slang_compile.c
|
||||
action slang_compile.h
|
||||
action slang_compile_function.c
|
||||
action slang_compile_function.h
|
||||
action slang_compile_operation.c
|
||||
action slang_compile_operation.h
|
||||
action slang_compile_struct.c
|
||||
action slang_compile_struct.h
|
||||
action slang_compile_variable.c
|
||||
action slang_compile_variable.h
|
||||
action slang_execute.c
|
||||
action slang_execute.h
|
||||
action slang_execute_x86.c
|
||||
action slang_export.c
|
||||
action slang_export.h
|
||||
action slang_library_noise.c
|
||||
action slang_library_noise.h
|
||||
action slang_library_texsample.c
|
||||
action slang_library_texsample.h
|
||||
action slang_link.c
|
||||
action slang_link.h
|
||||
action slang_mesa.h
|
||||
action slang_preprocess.c
|
||||
action slang_preprocess.h
|
||||
action slang_storage.c
|
||||
action slang_storage.h
|
||||
action slang_utility.c
|
||||
action slang_utility.h
|
||||
action traverse_wrap.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_shader_slang_library() {
|
||||
src_dir src/mesa/shader/slang/library
|
||||
dst_dir mesa/shader/slang/library
|
||||
|
||||
action slang_common_builtin_gc.h
|
||||
action slang_core_gc.h
|
||||
action slang_fragment_builtin_gc.h
|
||||
action slang_shader_syn.h
|
||||
action slang_pp_version_syn.h
|
||||
action slang_vertex_builtin_gc.h
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
symlink_mesa_x() {
|
||||
|
|
|
@ -426,6 +426,7 @@ AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extensi
|
|||
AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: enabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=yes])
|
||||
AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
|
||||
AC_ARG_ENABLE(xinput, AS_HELP_STRING([--disable-xinput], [Build XInput Extension (default: enabled)]), [XINPUT=$enableval], [XINPUT=yes])
|
||||
AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes])
|
||||
|
||||
dnl DDXes.
|
||||
AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
|
||||
|
@ -735,6 +736,8 @@ if test "x$XINPUT" = xyes; then
|
|||
XI_INC='-I$(top_srcdir)/Xi'
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes)
|
||||
|
||||
AC_DEFINE(SHAPE, 1, [Support SHAPE extension])
|
||||
|
||||
AC_DEFINE(XKB, 1, [Build XKB])
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
noinst_LTLIBRARIES = libfb.la libfbmmx.la
|
||||
noinst_LTLIBRARIES = libfb.la libwfb.la libfbmmx.la
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)/hw/xfree86/os-support \
|
||||
|
@ -7,11 +7,11 @@ INCLUDES = \
|
|||
AM_CFLAGS = $(DIX_CFLAGS)
|
||||
|
||||
if XORG
|
||||
sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h
|
||||
sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h wfbrename.h
|
||||
endif
|
||||
|
||||
if MMX_CAPABLE
|
||||
AM_CFLAGS += -DUSE_MMX
|
||||
libfb_la_CFLAGS = $(AM_CFLAGS) -DUSE_MMX
|
||||
|
||||
libfbmmx_la_CFLAGS = \
|
||||
$(DIX_CFLAGS) \
|
||||
|
@ -23,6 +23,8 @@ libfbmmx_la_CFLAGS = \
|
|||
--param large-function-growth=10000
|
||||
endif
|
||||
|
||||
libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
|
||||
|
||||
libfbmmx_la_SOURCES = \
|
||||
fbmmx.c \
|
||||
fbmmx.h
|
||||
|
@ -70,6 +72,8 @@ libfb_la_SOURCES = \
|
|||
fbedge.c \
|
||||
fbedgeimp.h
|
||||
|
||||
libwfb_la_SOURCES = $(libfb_la_SOURCES)
|
||||
|
||||
libfb_la_LIBADD = libfbmmx.la
|
||||
|
||||
EXTRA_DIST = fbcmap.c
|
||||
|
|
118
fb/fb.h
118
fb/fb.h
|
@ -44,6 +44,39 @@
|
|||
#include "picture.h"
|
||||
#endif
|
||||
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
|
||||
#include "wfbrename.h"
|
||||
#define FBPREFIX(x) wfb##x
|
||||
#define WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr))))
|
||||
#define READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr))))
|
||||
|
||||
#define MEMCPY_WRAPPED(dst, src, size) do { \
|
||||
size_t _i; \
|
||||
CARD8 *_dst = (CARD8*)(dst), *_src = (CARD8*)(src); \
|
||||
for(_i = 0; _i < size; _i++) { \
|
||||
WRITE(_dst +_i, READ(_src + _i)); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define MEMSET_WRAPPED(dst, val, size) do { \
|
||||
size_t _i; \
|
||||
CARD8 *_dst = (CARD8*)(dst); \
|
||||
for(_i = 0; _i < size; _i++) { \
|
||||
WRITE(_dst +_i, (val)); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#else
|
||||
|
||||
#define FBPREFIX(x) fb##x
|
||||
#define WRITE(ptr, val) (*(ptr) = (val))
|
||||
#define READ(ptr) (*(ptr))
|
||||
#define MEMCPY_WRAPPED(dst, src, size) memcpy((dst), (src), (size))
|
||||
#define MEMSET_WRAPPED(dst, val, size) memset((dst), (val), (size))
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This single define controls the basic size of data manipulated
|
||||
* by this software; it must be log2(sizeof (FbBits) * 8)
|
||||
|
@ -222,8 +255,8 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data);
|
|||
|
||||
#define FbPtrOffset(p,o,t) ((t *) ((CARD8 *) (p) + (o)))
|
||||
#define FbSelectPatternPart(xor,o,t) ((xor) >> (FbPatternOffset (o,t) << 3))
|
||||
#define FbStorePart(dst,off,t,xor) (*FbPtrOffset(dst,off,t) = \
|
||||
FbSelectPart(xor,off,t))
|
||||
#define FbStorePart(dst,off,t,xor) (WRITE(FbPtrOffset(dst,off,t), \
|
||||
FbSelectPart(xor,off,t)))
|
||||
#ifndef FbSelectPart
|
||||
#define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t)
|
||||
#endif
|
||||
|
@ -403,7 +436,7 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data);
|
|||
FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \
|
||||
break; \
|
||||
default: \
|
||||
*dst = FbDoMaskRRop(*dst, and, xor, l); \
|
||||
WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, l)); \
|
||||
break; \
|
||||
} \
|
||||
}
|
||||
|
@ -423,7 +456,7 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data);
|
|||
break; \
|
||||
FbDoRightMaskByteRRop6Cases(dst,xor) \
|
||||
default: \
|
||||
*dst = FbDoMaskRRop (*dst, and, xor, r); \
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
@ -455,20 +488,20 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data);
|
|||
* The term "lane" comes from the hardware term "byte-lane" which
|
||||
*/
|
||||
|
||||
#define FbLaneCase1(n,a,o) ((n) == 0x01 ? \
|
||||
(*(CARD8 *) ((a)+FbPatternOffset(o,CARD8)) = \
|
||||
fgxor) : 0)
|
||||
#define FbLaneCase2(n,a,o) ((n) == 0x03 ? \
|
||||
(*(CARD16 *) ((a)+FbPatternOffset(o,CARD16)) = \
|
||||
#define FbLaneCase1(n,a,o) ((n) == 0x01 ? (void) \
|
||||
WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), \
|
||||
fgxor) : (void) 0)
|
||||
#define FbLaneCase2(n,a,o) ((n) == 0x03 ? (void) \
|
||||
WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), \
|
||||
fgxor) : \
|
||||
((void)FbLaneCase1((n)&1,a,o), \
|
||||
FbLaneCase1((n)>>1,a,(o)+1)))
|
||||
#define FbLaneCase4(n,a,o) ((n) == 0x0f ? \
|
||||
(*(CARD32 *) ((a)+FbPatternOffset(o,CARD32)) = \
|
||||
#define FbLaneCase4(n,a,o) ((n) == 0x0f ? (void) \
|
||||
WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), \
|
||||
fgxor) : \
|
||||
((void)FbLaneCase2((n)&3,a,o), \
|
||||
FbLaneCase2((n)>>2,a,(o)+2)))
|
||||
#define FbLaneCase8(n,a,o) ((n) == 0x0ff ? (*(FbBits *) ((a)+(o)) = fgxor) : \
|
||||
#define FbLaneCase8(n,a,o) ((n) == 0x0ff ? (void) (*(FbBits *) ((a)+(o)) = fgxor) : \
|
||||
((void)FbLaneCase4((n)&15,a,o), \
|
||||
FbLaneCase4((n)>>4,a,(o)+4)))
|
||||
|
||||
|
@ -588,6 +621,32 @@ extern WindowPtr *WindowTable;
|
|||
#define FB_SCREEN_PRIVATE
|
||||
#endif
|
||||
|
||||
/* Framebuffer access wrapper */
|
||||
typedef FbBits (*ReadMemoryProcPtr)(const void *src, int size);
|
||||
typedef void (*WriteMemoryProcPtr)(void *dst, FbBits value, int size);
|
||||
typedef void (*SetupWrapProcPtr)(ReadMemoryProcPtr *pRead,
|
||||
WriteMemoryProcPtr *pWrite,
|
||||
DrawablePtr pDraw);
|
||||
typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw);
|
||||
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
|
||||
#define fbPrepareAccess(pDraw) \
|
||||
fbGetScreenPrivate((pDraw)->pScreen)->setupWrap( \
|
||||
&wfbReadMemory, \
|
||||
&wfbWriteMemory, \
|
||||
(pDraw))
|
||||
#define fbFinishAccess(pDraw) \
|
||||
fbGetScreenPrivate((pDraw)->pScreen)->finishWrap(pDraw)
|
||||
|
||||
#else
|
||||
|
||||
#define fbPrepareAccess(pPix)
|
||||
#define fbFinishAccess(pDraw)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FB_SCREEN_PRIVATE
|
||||
extern int fbScreenPrivateIndex;
|
||||
extern int fbGetScreenPrivateIndex(void);
|
||||
|
@ -596,6 +655,10 @@ extern int fbGetScreenPrivateIndex(void);
|
|||
typedef struct {
|
||||
unsigned char win32bpp; /* window bpp for 32-bpp images */
|
||||
unsigned char pix32bpp; /* pixmap bpp for 32-bpp images */
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
SetupWrapProcPtr setupWrap; /* driver hook to set pixmap access wrapping */
|
||||
FinishWrapProcPtr finishWrap; /* driver hook to clean up pixmap access wrapping */
|
||||
#endif
|
||||
} FbScreenPrivRec, *FbScreenPrivPtr;
|
||||
|
||||
#define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
|
||||
|
@ -674,6 +737,7 @@ typedef struct {
|
|||
(xoff) = __fbPixOffXPix(_pPix); \
|
||||
(yoff) = __fbPixOffYPix(_pPix); \
|
||||
} \
|
||||
fbPrepareAccess(pDrawable); \
|
||||
(pointer) = (FbBits *) _pPix->devPrivate.ptr; \
|
||||
(stride) = ((int) _pPix->devKind) / sizeof (FbBits); (void)(stride); \
|
||||
(bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
|
||||
|
@ -690,6 +754,7 @@ typedef struct {
|
|||
(xoff) = __fbPixOffXPix(_pPix); \
|
||||
(yoff) = __fbPixOffYPix(_pPix); \
|
||||
} \
|
||||
fbPrepareAccess(pDrawable); \
|
||||
(pointer) = (FbStip *) _pPix->devPrivate.ptr; \
|
||||
(stride) = ((int) _pPix->devKind) / sizeof (FbStip); (void)(stride); \
|
||||
(bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
|
||||
|
@ -1738,6 +1803,30 @@ fbSetupScreen(ScreenPtr pScreen,
|
|||
int width, /* pixel width of frame buffer */
|
||||
int bpp); /* bits per pixel of frame buffer */
|
||||
|
||||
Bool
|
||||
wfbFinishScreenInit(ScreenPtr pScreen,
|
||||
pointer pbits,
|
||||
int xsize,
|
||||
int ysize,
|
||||
int dpix,
|
||||
int dpiy,
|
||||
int width,
|
||||
int bpp,
|
||||
SetupWrapProcPtr setupWrap,
|
||||
FinishWrapProcPtr finishWrap);
|
||||
|
||||
Bool
|
||||
wfbScreenInit(ScreenPtr pScreen,
|
||||
pointer pbits,
|
||||
int xsize,
|
||||
int ysize,
|
||||
int dpix,
|
||||
int dpiy,
|
||||
int width,
|
||||
int bpp,
|
||||
SetupWrapProcPtr setupWrap,
|
||||
FinishWrapProcPtr finishWrap);
|
||||
|
||||
Bool
|
||||
fbFinishScreenInit(ScreenPtr pScreen,
|
||||
pointer pbits,
|
||||
|
@ -1994,6 +2083,11 @@ fbReplicatePixel (Pixel p, int bpp);
|
|||
void
|
||||
fbReduceRasterOp (int rop, FbBits fg, FbBits pm, FbBits *andp, FbBits *xorp);
|
||||
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
extern ReadMemoryProcPtr wfbReadMemory;
|
||||
extern WriteMemoryProcPtr wfbWriteMemory;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* fbwindow.c
|
||||
*/
|
||||
|
|
74
fb/fb24_32.c
74
fb/fb24_32.c
|
@ -38,18 +38,18 @@
|
|||
* by reading/writing aligned CARD32s where it's easy
|
||||
*/
|
||||
|
||||
#define Get8(a) ((CARD32) *(a))
|
||||
#define Get8(a) ((CARD32) READ(a))
|
||||
|
||||
#if BITMAP_BIT_ORDER == MSBFirst
|
||||
#define Get24(a) ((Get8(a) << 16) | (Get8((a)+1) << 8) | Get8((a)+2))
|
||||
#define Put24(a,p) (((a)[0] = (CARD8) ((p) >> 16)), \
|
||||
((a)[1] = (CARD8) ((p) >> 8)), \
|
||||
((a)[2] = (CARD8) (p)))
|
||||
#define Put24(a,p) ((WRITE((a+0), (CARD8) ((p) >> 16))), \
|
||||
(WRITE((a+1), (CARD8) ((p) >> 8))), \
|
||||
(WRITE((a+2), (CARD8) (p))))
|
||||
#else
|
||||
#define Get24(a) (Get8(a) | (Get8((a)+1) << 8) | (Get8((a)+2)<<16))
|
||||
#define Put24(a,p) (((a)[0] = (CARD8) (p)), \
|
||||
((a)[1] = (CARD8) ((p) >> 8)), \
|
||||
((a)[2] = (CARD8) ((p) >> 16)))
|
||||
#define Put24(a,p) ((WRITE((a+0), (CARD8) (p))), \
|
||||
(WRITE((a+1), (CARD8) ((p) >> 8))), \
|
||||
(WRITE((a+2), (CARD8) ((p) >> 16))))
|
||||
#endif
|
||||
|
||||
typedef void (*fb24_32BltFunc) (CARD8 *srcLine,
|
||||
|
@ -106,7 +106,7 @@ fb24_32BltDown (CARD8 *srcLine,
|
|||
while (((long) dst & 3) && w)
|
||||
{
|
||||
w--;
|
||||
pixel = *src++;
|
||||
pixel = READ(src++);
|
||||
pixel = FbDoDestInvarientMergeRop(pixel);
|
||||
Put24 (dst, pixel);
|
||||
dst += 3;
|
||||
|
@ -115,35 +115,35 @@ fb24_32BltDown (CARD8 *srcLine,
|
|||
while (w >= 4)
|
||||
{
|
||||
CARD32 s0, s1;
|
||||
s0 = *src++;
|
||||
s0 = READ(src++);
|
||||
s0 = FbDoDestInvarientMergeRop(s0);
|
||||
s1 = *src++;
|
||||
s1 = READ(src++);
|
||||
s1 = FbDoDestInvarientMergeRop(s1);
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
*(CARD32 *)(dst) = (s0 & 0xffffff) | (s1 << 24);
|
||||
WRITE((CARD32 *)dst, (s0 & 0xffffff) | (s1 << 24));
|
||||
#else
|
||||
*(CARD32 *)(dst) = (s0 << 8) | ((s1 & 0xffffff) >> 16);
|
||||
WRITE((CARD32 *)dst, (s0 << 8) | ((s1 & 0xffffff) >> 16));
|
||||
#endif
|
||||
s0 = *src++;
|
||||
s0 = READ(src++);
|
||||
s0 = FbDoDestInvarientMergeRop(s0);
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
*(CARD32 *)(dst+4) = ((s1 & 0xffffff) >> 8) | (s0 << 16);
|
||||
WRITE((CARD32 *)(dst+4), ((s1 & 0xffffff) >> 8) | (s0 << 16));
|
||||
#else
|
||||
*(CARD32 *)(dst+4) = (s1 << 16) | ((s0 & 0xffffff) >> 8);
|
||||
WRITE((CARD32 *)(dst+4), (s1 << 16) | ((s0 & 0xffffff) >> 8));
|
||||
#endif
|
||||
s1 = *src++;
|
||||
s1 = READ(src++);
|
||||
s1 = FbDoDestInvarientMergeRop(s1);
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
*(CARD32 *)(dst+8) = ((s0 & 0xffffff) >> 16) | (s1 << 8);
|
||||
WRITE((CARD32 *)(dst+8), ((s0 & 0xffffff) >> 16) | (s1 << 8));
|
||||
#else
|
||||
*(CARD32 *)(dst+8) = (s0 << 24) | (s1 & 0xffffff);
|
||||
WRITE((CARD32 *)(dst+8), (s0 << 24) | (s1 & 0xffffff));
|
||||
#endif
|
||||
dst += 12;
|
||||
w -= 4;
|
||||
}
|
||||
while (w--)
|
||||
{
|
||||
pixel = *src++;
|
||||
pixel = READ(src++);
|
||||
pixel = FbDoDestInvarientMergeRop(pixel);
|
||||
Put24 (dst, pixel);
|
||||
dst += 3;
|
||||
|
@ -153,7 +153,7 @@ fb24_32BltDown (CARD8 *srcLine,
|
|||
{
|
||||
while (w--)
|
||||
{
|
||||
pixel = *src++;
|
||||
pixel = READ(src++);
|
||||
dpixel = Get24 (dst);
|
||||
pixel = FbDoMergeRop(pixel, dpixel);
|
||||
Put24 (dst, pixel);
|
||||
|
@ -205,40 +205,40 @@ fb24_32BltUp (CARD8 *srcLine,
|
|||
w--;
|
||||
pixel = Get24(src);
|
||||
src += 3;
|
||||
*dst++ = FbDoDestInvarientMergeRop(pixel);
|
||||
WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
|
||||
}
|
||||
/* Do four aligned pixels at a time */
|
||||
while (w >= 4)
|
||||
{
|
||||
CARD32 s0, s1;
|
||||
|
||||
s0 = *(CARD32 *)(src);
|
||||
s0 = READ((CARD32 *)src);
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
pixel = s0 & 0xffffff;
|
||||
#else
|
||||
pixel = s0 >> 8;
|
||||
#endif
|
||||
*dst++ = FbDoDestInvarientMergeRop(pixel);
|
||||
s1 = *(CARD32 *)(src+4);
|
||||
WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
|
||||
s1 = READ((CARD32 *)(src+4));
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
pixel = (s0 >> 24) | ((s1 << 8) & 0xffffff);
|
||||
#else
|
||||
pixel = ((s0 << 16) & 0xffffff) | (s1 >> 16);
|
||||
#endif
|
||||
*dst++ = FbDoDestInvarientMergeRop(pixel);
|
||||
s0 = *(CARD32 *)(src+8);
|
||||
WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
|
||||
s0 = READ((CARD32 *)(src+8));
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
pixel = (s1 >> 16) | ((s0 << 16) & 0xffffff);
|
||||
#else
|
||||
pixel = ((s1 << 8) & 0xffffff) | (s0 >> 24);
|
||||
#endif
|
||||
*dst++ = FbDoDestInvarientMergeRop(pixel);
|
||||
WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
pixel = s0 >> 8;
|
||||
#else
|
||||
pixel = s0 & 0xffffff;
|
||||
#endif
|
||||
*dst++ = FbDoDestInvarientMergeRop(pixel);
|
||||
WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
|
||||
src += 12;
|
||||
w -= 4;
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ fb24_32BltUp (CARD8 *srcLine,
|
|||
w--;
|
||||
pixel = Get24(src);
|
||||
src += 3;
|
||||
*dst++ = FbDoDestInvarientMergeRop(pixel);
|
||||
WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -256,7 +256,7 @@ fb24_32BltUp (CARD8 *srcLine,
|
|||
{
|
||||
pixel = Get24(src);
|
||||
src += 3;
|
||||
*dst = FbDoMergeRop(pixel, *dst);
|
||||
WRITE(dst, FbDoMergeRop(pixel, READ(dst)));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
@ -305,6 +305,8 @@ fb24_32GetSpans(DrawablePtr pDrawable,
|
|||
ppt++;
|
||||
pwidth++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -366,6 +368,8 @@ fb24_32SetSpans (DrawablePtr pDrawable,
|
|||
ppt++;
|
||||
pwidth++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -429,6 +433,8 @@ fb24_32PutZImage (DrawablePtr pDrawable,
|
|||
alu,
|
||||
pm);
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -463,6 +469,8 @@ fb24_32GetImage (DrawablePtr pDrawable,
|
|||
fb24_32BltUp (src + (y + srcYoff) * srcStride, srcStride, x + srcXoff,
|
||||
(CARD8 *) d, dstStride, 0,
|
||||
w, h, GXcopy, pm);
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -519,6 +527,9 @@ fb24_32CopyMtoN (DrawablePtr pSrcDrawable,
|
|||
pPriv->pm);
|
||||
pbox++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pSrcDrawable);
|
||||
fbFinishAccess (pDstDrawable);
|
||||
}
|
||||
|
||||
PixmapPtr
|
||||
|
@ -563,6 +574,9 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
|
|||
GXcopy,
|
||||
FB_ALLONES);
|
||||
|
||||
fbFinishAccess (&pOldTile->drawable);
|
||||
fbFinishAccess (&pNewTile->drawable);
|
||||
|
||||
return pNewTile;
|
||||
}
|
||||
|
||||
|
|
|
@ -90,3 +90,8 @@ fbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex)
|
|||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
ReadMemoryProcPtr wfbReadMemory;
|
||||
WriteMemoryProcPtr wfbWriteMemory;
|
||||
#endif
|
||||
|
|
|
@ -109,6 +109,7 @@ fbPolyArc (DrawablePtr pDrawable,
|
|||
miPolyArc(pDrawable, pGC, 1, parcs);
|
||||
parcs++;
|
||||
}
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
|
16
fb/fbbits.c
16
fb/fbbits.c
|
@ -103,14 +103,14 @@
|
|||
#define BITSUNIT BYTE
|
||||
#define BITSMUL 3
|
||||
|
||||
#define FbDoTypeStore(b,t,x,s) (*((t *) (b)) = (x) >> (s))
|
||||
#define FbDoTypeRRop(b,t,a,x,s) (*((t *) (b)) = FbDoRRop(*((t *) (b)),\
|
||||
(a) >> (s), \
|
||||
(x) >> (s)))
|
||||
#define FbDoTypeMaskRRop(b,t,a,x,m,s) (*((t *) (b)) = FbDoMaskRRop(*((t *) (b)),\
|
||||
(a) >> (s), \
|
||||
(x) >> (s), \
|
||||
(m) >> (s))
|
||||
#define FbDoTypeStore(b,t,x,s) WRITE(((t *) (b)), (x) >> (s))
|
||||
#define FbDoTypeRRop(b,t,a,x,s) WRITE((t *) (b), FbDoRRop(READ((t *) (b)),\
|
||||
(a) >> (s), \
|
||||
(x) >> (s)))
|
||||
#define FbDoTypeMaskRRop(b,t,a,x,m,s) WRITE((t *) (b), FbDoMaskRRop(READ((t *) (b)),\
|
||||
(a) >> (s), \
|
||||
(x) >> (s), \
|
||||
(m) >> (s)))
|
||||
#if BITMAP_BIT_ORDER == LSBFirst
|
||||
#define BITSSTORE(b,x) ((unsigned long) (b) & 1 ? \
|
||||
(FbDoTypeStore (b, CARD8, x, 0), \
|
||||
|
|
35
fb/fbbits.h
35
fb/fbbits.h
|
@ -42,13 +42,13 @@
|
|||
#ifdef BITSSTORE
|
||||
#define STORE(b,x) BITSSTORE(b,x)
|
||||
#else
|
||||
#define STORE(b,x) (*(b) = (x))
|
||||
#define STORE(b,x) WRITE((b), (x))
|
||||
#endif
|
||||
|
||||
#ifdef BITSRROP
|
||||
#define RROP(b,a,x) BITSRROP(b,a,x)
|
||||
#else
|
||||
#define RROP(b,a,x) (*(b) = FbDoRRop (*(b), (a), (x)))
|
||||
#define RROP(b,a,x) WRITE((b), FbDoRRop (READ(b), (a), (x)))
|
||||
#endif
|
||||
|
||||
#ifdef BITSUNIT
|
||||
|
@ -119,6 +119,8 @@ BRESSOLID (DrawablePtr pDrawable,
|
|||
e += e3;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -263,6 +265,8 @@ onOffOdd:
|
|||
dashlen = len;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -541,18 +545,18 @@ ARC (FbBits *dst,
|
|||
# define WRITE_ADDR4(n) ((n))
|
||||
#endif
|
||||
|
||||
#define WRITE1(d,n,fg) ((d)[WRITE_ADDR1(n)] = (BITS) (fg))
|
||||
#define WRITE1(d,n,fg) WRITE(d + WRITE_ADDR1(n), (BITS) (fg))
|
||||
|
||||
#ifdef BITS2
|
||||
# define WRITE2(d,n,fg) (*((BITS2 *) &((d)[WRITE_ADDR2(n)])) = (BITS2) (fg))
|
||||
# define WRITE2(d,n,fg) WRITE((BITS2 *) &((d)[WRITE_ADDR2(n)]), (BITS2) (fg))
|
||||
#else
|
||||
# define WRITE2(d,n,fg) WRITE1(d,(n)+1,WRITE1(d,n,fg))
|
||||
# define WRITE2(d,n,fg) (WRITE1(d,n,fg), WRITE1(d,(n)+1,fg))
|
||||
#endif
|
||||
|
||||
#ifdef BITS4
|
||||
# define WRITE4(d,n,fg) (*((BITS4 *) &((d)[WRITE_ADDR4(n)])) = (BITS4) (fg))
|
||||
# define WRITE4(d,n,fg) WRITE((BITS4 *) &((d)[WRITE_ADDR4(n)]), (BITS4) (fg))
|
||||
#else
|
||||
# define WRITE4(d,n,fg) WRITE2(d,(n)+2,WRITE2(d,n,fg))
|
||||
# define WRITE4(d,n,fg) (WRITE2(d,n,fg), WRITE2(d,(n)+2,fg))
|
||||
#endif
|
||||
|
||||
void
|
||||
|
@ -710,8 +714,10 @@ POLYLINE (DrawablePtr pDrawable,
|
|||
intToX(pt2) + xoff, intToY(pt2) + yoff,
|
||||
npt == 0 && pGC->capStyle != CapNotLast,
|
||||
&dashoffset);
|
||||
if (!npt)
|
||||
if (!npt) {
|
||||
fbFinishAccess (pDrawable);
|
||||
return;
|
||||
}
|
||||
pt1 = pt2;
|
||||
pt2 = *pts++;
|
||||
npt--;
|
||||
|
@ -776,6 +782,7 @@ POLYLINE (DrawablePtr pDrawable,
|
|||
{
|
||||
RROP(bits,and,xor);
|
||||
}
|
||||
fbFinishAccess (pDrawable);
|
||||
return;
|
||||
}
|
||||
pt1 = pt2;
|
||||
|
@ -786,6 +793,8 @@ POLYLINE (DrawablePtr pDrawable,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -883,20 +892,20 @@ POLYSEGMENT (DrawablePtr pDrawable,
|
|||
FbMaskBits (dstX, width, startmask, nmiddle, endmask);
|
||||
if (startmask)
|
||||
{
|
||||
*dstLine = FbDoMaskRRop (*dstLine, andBits, xorBits, startmask);
|
||||
WRITE(dstLine, FbDoMaskRRop (READ(dstLine), andBits, xorBits, startmask));
|
||||
dstLine++;
|
||||
}
|
||||
if (!andBits)
|
||||
while (nmiddle--)
|
||||
*dstLine++ = xorBits;
|
||||
WRITE(dstLine++, xorBits);
|
||||
else
|
||||
while (nmiddle--)
|
||||
{
|
||||
*dstLine = FbDoRRop (*dstLine, andBits, xorBits);
|
||||
WRITE(dstLine, FbDoRRop (READ(dstLine), andBits, xorBits));
|
||||
dstLine++;
|
||||
}
|
||||
if (endmask)
|
||||
*dstLine = FbDoMaskRRop (*dstLine, andBits, xorBits, endmask);
|
||||
WRITE(dstLine, FbDoMaskRRop (READ(dstLine), andBits, xorBits, endmask));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -950,6 +959,8 @@ POLYSEGMENT (DrawablePtr pDrawable,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
138
fb/fbblt.c
138
fb/fbblt.c
|
@ -92,10 +92,10 @@ fbBlt (FbBits *srcLine,
|
|||
|
||||
if (!upsidedown)
|
||||
for (i = 0; i < height; i++)
|
||||
memcpy(dst + i * dstStride, src + i * srcStride, width);
|
||||
MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, width);
|
||||
else
|
||||
for (i = height - 1; i >= 0; i--)
|
||||
memcpy(dst + i * dstStride, src + i * srcStride, width);
|
||||
MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, width);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ fbBlt (FbBits *srcLine,
|
|||
{
|
||||
if (endmask)
|
||||
{
|
||||
bits = *--src;
|
||||
bits = READ(--src);
|
||||
--dst;
|
||||
FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
|
||||
}
|
||||
|
@ -145,20 +145,20 @@ fbBlt (FbBits *srcLine,
|
|||
if (destInvarient)
|
||||
{
|
||||
while (n--)
|
||||
*--dst = FbDoDestInvarientMergeRop(*--src);
|
||||
WRITE(--dst, FbDoDestInvarientMergeRop(READ(--src)));
|
||||
}
|
||||
else
|
||||
{
|
||||
while (n--)
|
||||
{
|
||||
bits = *--src;
|
||||
bits = READ(--src);
|
||||
--dst;
|
||||
*dst = FbDoMergeRop (bits, *dst);
|
||||
WRITE(dst, FbDoMergeRop (bits, READ(dst)));
|
||||
}
|
||||
}
|
||||
if (startmask)
|
||||
{
|
||||
bits = *--src;
|
||||
bits = READ(--src);
|
||||
--dst;
|
||||
FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask);
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ fbBlt (FbBits *srcLine,
|
|||
{
|
||||
if (startmask)
|
||||
{
|
||||
bits = *src++;
|
||||
bits = READ(src++);
|
||||
FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask);
|
||||
dst++;
|
||||
}
|
||||
|
@ -198,20 +198,20 @@ fbBlt (FbBits *srcLine,
|
|||
}
|
||||
#endif
|
||||
while (n--)
|
||||
*dst++ = FbDoDestInvarientMergeRop(*src++);
|
||||
WRITE(dst++, FbDoDestInvarientMergeRop(READ(src++)));
|
||||
}
|
||||
else
|
||||
{
|
||||
while (n--)
|
||||
{
|
||||
bits = *src++;
|
||||
*dst = FbDoMergeRop (bits, *dst);
|
||||
bits = READ(src++);
|
||||
WRITE(dst, FbDoMergeRop (bits, READ(dst)));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
if (endmask)
|
||||
{
|
||||
bits = *src;
|
||||
bits = READ(src);
|
||||
FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
|
||||
}
|
||||
}
|
||||
|
@ -240,13 +240,13 @@ fbBlt (FbBits *srcLine,
|
|||
if (reverse)
|
||||
{
|
||||
if (srcX < dstX)
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
if (endmask)
|
||||
{
|
||||
bits = FbScrRight(bits1, rightShift);
|
||||
if (FbScrRight(endmask, leftShift))
|
||||
{
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
bits |= FbScrLeft(bits1, leftShift);
|
||||
}
|
||||
--dst;
|
||||
|
@ -258,10 +258,10 @@ fbBlt (FbBits *srcLine,
|
|||
while (n--)
|
||||
{
|
||||
bits = FbScrRight(bits1, rightShift);
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
bits |= FbScrLeft(bits1, leftShift);
|
||||
--dst;
|
||||
*dst = FbDoDestInvarientMergeRop(bits);
|
||||
WRITE(dst, FbDoDestInvarientMergeRop(bits));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -269,10 +269,10 @@ fbBlt (FbBits *srcLine,
|
|||
while (n--)
|
||||
{
|
||||
bits = FbScrRight(bits1, rightShift);
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
bits |= FbScrLeft(bits1, leftShift);
|
||||
--dst;
|
||||
*dst = FbDoMergeRop(bits, *dst);
|
||||
WRITE(dst, FbDoMergeRop(bits, READ(dst)));
|
||||
}
|
||||
}
|
||||
if (startmask)
|
||||
|
@ -280,7 +280,7 @@ fbBlt (FbBits *srcLine,
|
|||
bits = FbScrRight(bits1, rightShift);
|
||||
if (FbScrRight(startmask, leftShift))
|
||||
{
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
bits |= FbScrLeft(bits1, leftShift);
|
||||
}
|
||||
--dst;
|
||||
|
@ -290,13 +290,13 @@ fbBlt (FbBits *srcLine,
|
|||
else
|
||||
{
|
||||
if (srcX > dstX)
|
||||
bits1 = *src++;
|
||||
bits1 = READ(src++);
|
||||
if (startmask)
|
||||
{
|
||||
bits = FbScrLeft(bits1, leftShift);
|
||||
if (FbScrLeft(startmask, rightShift))
|
||||
{
|
||||
bits1 = *src++;
|
||||
bits1 = READ(src++);
|
||||
bits |= FbScrRight(bits1, rightShift);
|
||||
}
|
||||
FbDoLeftMaskByteMergeRop (dst, bits, startbyte, startmask);
|
||||
|
@ -308,9 +308,9 @@ fbBlt (FbBits *srcLine,
|
|||
while (n--)
|
||||
{
|
||||
bits = FbScrLeft(bits1, leftShift);
|
||||
bits1 = *src++;
|
||||
bits1 = READ(src++);
|
||||
bits |= FbScrRight(bits1, rightShift);
|
||||
*dst = FbDoDestInvarientMergeRop(bits);
|
||||
WRITE(dst, FbDoDestInvarientMergeRop(bits));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
@ -319,9 +319,9 @@ fbBlt (FbBits *srcLine,
|
|||
while (n--)
|
||||
{
|
||||
bits = FbScrLeft(bits1, leftShift);
|
||||
bits1 = *src++;
|
||||
bits1 = READ(src++);
|
||||
bits |= FbScrRight(bits1, rightShift);
|
||||
*dst = FbDoMergeRop(bits, *dst);
|
||||
WRITE(dst, FbDoMergeRop(bits, READ(dst)));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ fbBlt (FbBits *srcLine,
|
|||
bits = FbScrLeft(bits1, leftShift);
|
||||
if (FbScrLeft(endmask, rightShift))
|
||||
{
|
||||
bits1 = *src;
|
||||
bits1 = READ(src);
|
||||
bits |= FbScrRight(bits1, rightShift);
|
||||
}
|
||||
FbDoRightMaskByteMergeRop (dst, bits, endbyte, endmask);
|
||||
|
@ -425,45 +425,45 @@ fbBlt24Line (FbBits *src,
|
|||
{
|
||||
if (endmask)
|
||||
{
|
||||
bits = *--src;
|
||||
bits = READ(--src);
|
||||
--dst;
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask & endmask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask));
|
||||
mask = FbPrev24Pix (mask);
|
||||
}
|
||||
while (n--)
|
||||
{
|
||||
bits = *--src;
|
||||
bits = READ(--src);
|
||||
--dst;
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask));
|
||||
mask = FbPrev24Pix (mask);
|
||||
}
|
||||
if (startmask)
|
||||
{
|
||||
bits = *--src;
|
||||
bits = READ(--src);
|
||||
--dst;
|
||||
*dst = FbDoMaskMergeRop(bits, *dst, mask & startmask);
|
||||
WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & startmask));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (startmask)
|
||||
{
|
||||
bits = *src++;
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask & startmask);
|
||||
bits = READ(src++);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask));
|
||||
dst++;
|
||||
mask = FbNext24Pix(mask);
|
||||
}
|
||||
while (n--)
|
||||
{
|
||||
bits = *src++;
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask);
|
||||
bits = READ(src++);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask));
|
||||
dst++;
|
||||
mask = FbNext24Pix(mask);
|
||||
}
|
||||
if (endmask)
|
||||
{
|
||||
bits = *src;
|
||||
*dst = FbDoMaskMergeRop(bits, *dst, mask & endmask);
|
||||
bits = READ(src);
|
||||
WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & endmask));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -484,26 +484,26 @@ fbBlt24Line (FbBits *src,
|
|||
if (reverse)
|
||||
{
|
||||
if (srcX < dstX)
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
if (endmask)
|
||||
{
|
||||
bits = FbScrRight(bits1, rightShift);
|
||||
if (FbScrRight(endmask, leftShift))
|
||||
{
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
bits |= FbScrLeft(bits1, leftShift);
|
||||
}
|
||||
--dst;
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask & endmask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask));
|
||||
mask = FbPrev24Pix(mask);
|
||||
}
|
||||
while (n--)
|
||||
{
|
||||
bits = FbScrRight(bits1, rightShift);
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
bits |= FbScrLeft(bits1, leftShift);
|
||||
--dst;
|
||||
*dst = FbDoMaskMergeRop(bits, *dst, mask);
|
||||
WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask));
|
||||
mask = FbPrev24Pix(mask);
|
||||
}
|
||||
if (startmask)
|
||||
|
@ -511,32 +511,32 @@ fbBlt24Line (FbBits *src,
|
|||
bits = FbScrRight(bits1, rightShift);
|
||||
if (FbScrRight(startmask, leftShift))
|
||||
{
|
||||
bits1 = *--src;
|
||||
bits1 = READ(--src);
|
||||
bits |= FbScrLeft(bits1, leftShift);
|
||||
}
|
||||
--dst;
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask & startmask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (srcX > dstX)
|
||||
bits1 = *src++;
|
||||
bits1 = READ(src++);
|
||||
if (startmask)
|
||||
{
|
||||
bits = FbScrLeft(bits1, leftShift);
|
||||
bits1 = *src++;
|
||||
bits1 = READ(src++);
|
||||
bits |= FbScrRight(bits1, rightShift);
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask & startmask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask));
|
||||
dst++;
|
||||
mask = FbNext24Pix(mask);
|
||||
}
|
||||
while (n--)
|
||||
{
|
||||
bits = FbScrLeft(bits1, leftShift);
|
||||
bits1 = *src++;
|
||||
bits1 = READ(src++);
|
||||
bits |= FbScrRight(bits1, rightShift);
|
||||
*dst = FbDoMaskMergeRop(bits, *dst, mask);
|
||||
WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask));
|
||||
dst++;
|
||||
mask = FbNext24Pix(mask);
|
||||
}
|
||||
|
@ -545,10 +545,10 @@ fbBlt24Line (FbBits *src,
|
|||
bits = FbScrLeft(bits1, leftShift);
|
||||
if (FbScrLeft(endmask, rightShift))
|
||||
{
|
||||
bits1 = *src;
|
||||
bits1 = READ(src);
|
||||
bits |= FbScrRight(bits1, rightShift);
|
||||
}
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, mask & endmask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -707,8 +707,8 @@ fbBltOdd (FbBits *srcLine,
|
|||
{
|
||||
if (startmask)
|
||||
{
|
||||
bits = *src++;
|
||||
*dst = FbDoMaskMergeRop (bits, *dst, startmask);
|
||||
bits = READ(src++);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), startmask));
|
||||
dst++;
|
||||
}
|
||||
n = nmiddle;
|
||||
|
@ -716,8 +716,8 @@ fbBltOdd (FbBits *srcLine,
|
|||
{
|
||||
while (n--)
|
||||
{
|
||||
bits = *src++;
|
||||
*dst = FbDoDestInvarientMergeRop(bits);
|
||||
bits = READ(src++);
|
||||
WRITE(dst, FbDoDestInvarientMergeRop(bits));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
@ -725,28 +725,28 @@ fbBltOdd (FbBits *srcLine,
|
|||
{
|
||||
while (n--)
|
||||
{
|
||||
bits = *src++;
|
||||
*dst = FbDoMergeRop (bits, *dst);
|
||||
bits = READ(src++);
|
||||
WRITE(dst, FbDoMergeRop (bits, READ(dst)));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
if (endmask)
|
||||
{
|
||||
bits = *src;
|
||||
*dst = FbDoMaskMergeRop(bits, *dst, endmask);
|
||||
bits = READ(src);
|
||||
WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), endmask));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bits = 0;
|
||||
if (srcX > dstX)
|
||||
bits = *src++;
|
||||
bits = READ(src++);
|
||||
if (startmask)
|
||||
{
|
||||
bits1 = FbScrLeft(bits, leftShift);
|
||||
bits = *src++;
|
||||
bits = READ(src++);
|
||||
bits1 |= FbScrRight(bits, rightShift);
|
||||
*dst = FbDoMaskMergeRop (bits1, *dst, startmask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits1, READ(dst), startmask));
|
||||
dst++;
|
||||
}
|
||||
n = nmiddle;
|
||||
|
@ -755,9 +755,9 @@ fbBltOdd (FbBits *srcLine,
|
|||
while (n--)
|
||||
{
|
||||
bits1 = FbScrLeft(bits, leftShift);
|
||||
bits = *src++;
|
||||
bits = READ(src++);
|
||||
bits1 |= FbScrRight(bits, rightShift);
|
||||
*dst = FbDoDestInvarientMergeRop(bits1);
|
||||
WRITE(dst, FbDoDestInvarientMergeRop(bits1));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
@ -766,9 +766,9 @@ fbBltOdd (FbBits *srcLine,
|
|||
while (n--)
|
||||
{
|
||||
bits1 = FbScrLeft(bits, leftShift);
|
||||
bits = *src++;
|
||||
bits = READ(src++);
|
||||
bits1 |= FbScrRight(bits, rightShift);
|
||||
*dst = FbDoMergeRop(bits1, *dst);
|
||||
WRITE(dst, FbDoMergeRop(bits1, READ(dst)));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
@ -777,10 +777,10 @@ fbBltOdd (FbBits *srcLine,
|
|||
bits1 = FbScrLeft(bits, leftShift);
|
||||
if (FbScrLeft(endmask, rightShift))
|
||||
{
|
||||
bits = *src;
|
||||
bits = READ(src);
|
||||
bits1 |= FbScrRight(bits, rightShift);
|
||||
}
|
||||
*dst = FbDoMaskMergeRop (bits1, *dst, endmask);
|
||||
WRITE(dst, FbDoMaskMergeRop (bits1, READ(dst), endmask));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,12 +51,12 @@
|
|||
|
||||
#define LoadBits {\
|
||||
if (leftShift) { \
|
||||
bitsRight = (src < srcEnd ? *src++ : 0); \
|
||||
bitsRight = (src < srcEnd ? READ(src++) : 0); \
|
||||
bits = (FbStipLeft (bitsLeft, leftShift) | \
|
||||
FbStipRight(bitsRight, rightShift)); \
|
||||
bitsLeft = bitsRight; \
|
||||
} else \
|
||||
bits = (src < srcEnd ? *src++ : 0); \
|
||||
bits = (src < srcEnd ? READ(src++) : 0); \
|
||||
}
|
||||
|
||||
#ifndef FBNOPIXADDR
|
||||
|
@ -285,7 +285,7 @@ fbBltOne (FbStip *src,
|
|||
|
||||
bitsLeft = 0;
|
||||
if (srcX > dstS)
|
||||
bitsLeft = *src++;
|
||||
bitsLeft = READ(src++);
|
||||
if (n)
|
||||
{
|
||||
/*
|
||||
|
@ -338,7 +338,7 @@ fbBltOne (FbStip *src,
|
|||
else
|
||||
#endif
|
||||
mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
|
||||
*dst = FbOpaqueStipple (mask, fgxor, bgxor);
|
||||
WRITE(dst, FbOpaqueStipple (mask, fgxor, bgxor));
|
||||
dst++;
|
||||
bits = FbStipLeft(bits, pixelsPerDst);
|
||||
}
|
||||
|
@ -368,8 +368,8 @@ fbBltOne (FbStip *src,
|
|||
if (left || !transparent)
|
||||
{
|
||||
mask = fbBits[left];
|
||||
*dst = FbStippleRRop (*dst, mask,
|
||||
fgand, fgxor, bgand, bgxor);
|
||||
WRITE(dst, FbStippleRRop (READ(dst), mask,
|
||||
fgand, fgxor, bgand, bgxor));
|
||||
}
|
||||
dst++;
|
||||
bits = FbStipLeft(bits, pixelsPerDst);
|
||||
|
@ -537,7 +537,7 @@ const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
|
|||
stip = FbLeftStipBits(bits, len); \
|
||||
} else { \
|
||||
stip = FbLeftStipBits(bits, remain); \
|
||||
bits = (src < srcEnd ? *src++ : 0); \
|
||||
bits = (src < srcEnd ? READ(src++) : 0); \
|
||||
__len = (len) - remain; \
|
||||
stip = FbMergePartStip24Bits(stip, FbLeftStipBits(bits, __len), \
|
||||
remain, __len); \
|
||||
|
@ -548,7 +548,7 @@ const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
|
|||
}
|
||||
|
||||
#define fbInitStipBits(offset,len,stip) {\
|
||||
bits = FbStipLeft (*src++,offset); \
|
||||
bits = FbStipLeft (READ(src++),offset); \
|
||||
remain = FB_STIP_UNIT - offset; \
|
||||
fbFirstStipBits(len,stip); \
|
||||
stip = FbMergeStip24Bits (0, stip, len); \
|
||||
|
@ -631,10 +631,11 @@ fbBltOne24 (FbStip *srcLine,
|
|||
if (leftMask)
|
||||
{
|
||||
mask = fbStipple24Bits[rot >> 3][stip];
|
||||
*dst = (*dst & ~leftMask) | (FbOpaqueStipple (mask,
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgxor, rot))
|
||||
& leftMask);
|
||||
WRITE(dst, (READ(dst) & ~leftMask) |
|
||||
(FbOpaqueStipple (mask,
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgxor, rot))
|
||||
& leftMask));
|
||||
dst++;
|
||||
fbNextStipBits(rot,stip);
|
||||
}
|
||||
|
@ -642,19 +643,20 @@ fbBltOne24 (FbStip *srcLine,
|
|||
while (nl--)
|
||||
{
|
||||
mask = fbStipple24Bits[rot>>3][stip];
|
||||
*dst = FbOpaqueStipple (mask,
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgxor, rot));
|
||||
WRITE(dst, FbOpaqueStipple (mask,
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgxor, rot)));
|
||||
dst++;
|
||||
fbNextStipBits(rot,stip);
|
||||
}
|
||||
if (rightMask)
|
||||
{
|
||||
mask = fbStipple24Bits[rot >> 3][stip];
|
||||
*dst = (*dst & ~rightMask) | (FbOpaqueStipple (mask,
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgxor, rot))
|
||||
& rightMask);
|
||||
WRITE(dst, (READ(dst) & ~rightMask) |
|
||||
(FbOpaqueStipple (mask,
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgxor, rot))
|
||||
& rightMask));
|
||||
}
|
||||
dst += dstStride;
|
||||
src += srcStride;
|
||||
|
@ -674,7 +676,7 @@ fbBltOne24 (FbStip *srcLine,
|
|||
if (stip)
|
||||
{
|
||||
mask = fbStipple24Bits[rot >> 3][stip] & leftMask;
|
||||
*dst = (*dst & ~mask) | (FbRot24(fgxor, rot) & mask);
|
||||
WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
|
||||
}
|
||||
dst++;
|
||||
fbNextStipBits (rot, stip);
|
||||
|
@ -685,7 +687,7 @@ fbBltOne24 (FbStip *srcLine,
|
|||
if (stip)
|
||||
{
|
||||
mask = fbStipple24Bits[rot>>3][stip];
|
||||
*dst = (*dst & ~mask) | (FbRot24(fgxor,rot) & mask);
|
||||
WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor,rot) & mask));
|
||||
}
|
||||
dst++;
|
||||
fbNextStipBits (rot, stip);
|
||||
|
@ -695,7 +697,7 @@ fbBltOne24 (FbStip *srcLine,
|
|||
if (stip)
|
||||
{
|
||||
mask = fbStipple24Bits[rot >> 3][stip] & rightMask;
|
||||
*dst = (*dst & ~mask) | (FbRot24(fgxor, rot) & mask);
|
||||
WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
|
||||
}
|
||||
}
|
||||
dst += dstStride;
|
||||
|
@ -712,12 +714,12 @@ fbBltOne24 (FbStip *srcLine,
|
|||
if (leftMask)
|
||||
{
|
||||
mask = fbStipple24Bits[rot >> 3][stip];
|
||||
*dst = FbStippleRRopMask (*dst, mask,
|
||||
FbRot24(fgand, rot),
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgand, rot),
|
||||
FbRot24(bgxor, rot),
|
||||
leftMask);
|
||||
WRITE(dst, FbStippleRRopMask (READ(dst), mask,
|
||||
FbRot24(fgand, rot),
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgand, rot),
|
||||
FbRot24(bgxor, rot),
|
||||
leftMask));
|
||||
dst++;
|
||||
fbNextStipBits(rot,stip);
|
||||
}
|
||||
|
@ -725,23 +727,23 @@ fbBltOne24 (FbStip *srcLine,
|
|||
while (nl--)
|
||||
{
|
||||
mask = fbStipple24Bits[rot >> 3][stip];
|
||||
*dst = FbStippleRRop (*dst, mask,
|
||||
FbRot24(fgand, rot),
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgand, rot),
|
||||
FbRot24(bgxor, rot));
|
||||
WRITE(dst, FbStippleRRop (READ(dst), mask,
|
||||
FbRot24(fgand, rot),
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgand, rot),
|
||||
FbRot24(bgxor, rot)));
|
||||
dst++;
|
||||
fbNextStipBits(rot,stip);
|
||||
}
|
||||
if (rightMask)
|
||||
{
|
||||
mask = fbStipple24Bits[rot >> 3][stip];
|
||||
*dst = FbStippleRRopMask (*dst, mask,
|
||||
FbRot24(fgand, rot),
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgand, rot),
|
||||
FbRot24(bgxor, rot),
|
||||
rightMask);
|
||||
WRITE(dst, FbStippleRRopMask (READ(dst), mask,
|
||||
FbRot24(fgand, rot),
|
||||
FbRot24(fgxor, rot),
|
||||
FbRot24(bgand, rot),
|
||||
FbRot24(bgxor, rot),
|
||||
rightMask));
|
||||
}
|
||||
dst += dstStride;
|
||||
}
|
||||
|
@ -832,7 +834,7 @@ fbBltPlane (FbBits *src,
|
|||
if (srcBpp == 24)
|
||||
srcMask0 = FbRot24(pm,rot0) & FbBitsMask(0, srcBpp);
|
||||
#endif
|
||||
srcBits = *s++;
|
||||
srcBits = READ(s++);
|
||||
|
||||
dstMask = dstMaskFirst;
|
||||
dstUnion = 0;
|
||||
|
@ -844,7 +846,7 @@ fbBltPlane (FbBits *src,
|
|||
{
|
||||
if (!srcMask)
|
||||
{
|
||||
srcBits = *s++;
|
||||
srcBits = READ(s++);
|
||||
#ifdef FB_24BIT
|
||||
if (srcBpp == 24)
|
||||
srcMask0 = FbNext24Pix(srcMask0) & FbBitsMask(0,24);
|
||||
|
@ -853,9 +855,9 @@ fbBltPlane (FbBits *src,
|
|||
}
|
||||
if (!dstMask)
|
||||
{
|
||||
*d = FbStippleRRopMask(*d, dstBits,
|
||||
fgand, fgxor, bgand, bgxor,
|
||||
dstUnion);
|
||||
WRITE(d, FbStippleRRopMask(READ(d), dstBits,
|
||||
fgand, fgxor, bgand, bgxor,
|
||||
dstUnion));
|
||||
d++;
|
||||
dstMask = FbStipMask(0,1);
|
||||
dstUnion = 0;
|
||||
|
@ -871,9 +873,9 @@ fbBltPlane (FbBits *src,
|
|||
dstMask = FbStipRight(dstMask,1);
|
||||
}
|
||||
if (dstUnion)
|
||||
*d = FbStippleRRopMask(*d,dstBits,
|
||||
fgand, fgxor, bgand, bgxor,
|
||||
dstUnion);
|
||||
WRITE(d, FbStippleRRopMask(READ(d),dstBits,
|
||||
fgand, fgxor, bgand, bgxor,
|
||||
dstUnion));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
663
fb/fbcompose.c
663
fb/fbcompose.c
File diff suppressed because it is too large
Load Diff
10
fb/fbcopy.c
10
fb/fbcopy.c
|
@ -103,6 +103,8 @@ fbCopyNtoN (DrawablePtr pSrcDrawable,
|
|||
#endif
|
||||
pbox++;
|
||||
}
|
||||
fbFinishAccess (pDstDrawable);
|
||||
fbFinishAccess (pSrcDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -173,6 +175,9 @@ fbCopy1toN (DrawablePtr pSrcDrawable,
|
|||
}
|
||||
pbox++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pDstDrawable);
|
||||
fbFinishAccess (pSrcDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -221,6 +226,8 @@ fbCopyNto1 (DrawablePtr pSrcDrawable,
|
|||
(FbStip) pPriv->and, (FbStip) pPriv->xor,
|
||||
(FbStip) pPriv->bgand, (FbStip) pPriv->bgxor,
|
||||
bitplane);
|
||||
fbFinishAccess (pDstDrawable);
|
||||
fbFinishAccess (pSrcDrawable);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -281,6 +288,9 @@ fbCopyNto1 (DrawablePtr pSrcDrawable,
|
|||
pPriv->and, pPriv->xor,
|
||||
pPriv->bgand, pPriv->bgxor);
|
||||
xfree (tmp);
|
||||
|
||||
fbFinishAccess (pDstDrawable);
|
||||
fbFinishAccess (pSrcDrawable);
|
||||
}
|
||||
pbox++;
|
||||
}
|
||||
|
|
16
fb/fbedge.c
16
fb/fbedge.c
|
@ -60,9 +60,9 @@
|
|||
#define StepAlpha ((__ap += __ao), (__ao ^= 1))
|
||||
|
||||
#define AddAlpha(a) { \
|
||||
CARD8 __o = *__ap; \
|
||||
CARD8 __o = READ(__ap); \
|
||||
CARD8 __a = (a) + Get4(__o, __ao); \
|
||||
*__ap = Put4 (__o, __ao, __a | (0 - ((__a) >> 4))); \
|
||||
WRITE(__ap, Put4 (__o, __ao, __a | (0 - ((__a) >> 4)))); \
|
||||
}
|
||||
|
||||
#include "fbedgeimp.h"
|
||||
|
@ -102,7 +102,7 @@ add_saturate_8 (CARD8 *buf, int value, int length)
|
|||
{
|
||||
while (length--)
|
||||
{
|
||||
*buf = clip255 (*buf + value);
|
||||
WRITE(buf, clip255 (READ(buf) + value));
|
||||
buf++;
|
||||
}
|
||||
}
|
||||
|
@ -164,11 +164,11 @@ fbRasterizeEdges8 (FbBits *buf,
|
|||
/* Add coverage across row */
|
||||
if (lxi == rxi)
|
||||
{
|
||||
ap[lxi] = clip255 (ap[lxi] + rxs - lxs);
|
||||
WRITE(ap +lxi, clip255 (READ(ap + lxi) + rxs - lxs));
|
||||
}
|
||||
else
|
||||
{
|
||||
ap[lxi] = clip255 (ap[lxi] + N_X_FRAC(8) - lxs);
|
||||
WRITE(ap + lxi, clip255 (READ(ap + lxi) + N_X_FRAC(8) - lxs));
|
||||
|
||||
/* Move forward so that lxi/rxi is the pixel span */
|
||||
lxi++;
|
||||
|
@ -238,7 +238,7 @@ fbRasterizeEdges8 (FbBits *buf,
|
|||
* necessary to avoid a buffer overrun, (when rx
|
||||
* is exactly on a pixel boundary). */
|
||||
if (rxs)
|
||||
ap[rxi] = clip255 (ap[rxi] + rxs);
|
||||
WRITE(ap + rxi, clip255 (READ(ap + rxi) + rxs));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ fbRasterizeEdges8 (FbBits *buf,
|
|||
if (fill_start != fill_end) {
|
||||
if (fill_size == N_Y_FRAC(8))
|
||||
{
|
||||
memset (ap + fill_start, 0xff, fill_end - fill_start);
|
||||
MEMSET_WRAPPED (ap + fill_start, 0xff, fill_end - fill_start);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -273,7 +273,7 @@ fbRasterizeEdges8 (FbBits *buf,
|
|||
{
|
||||
if (fill_size == N_Y_FRAC(8))
|
||||
{
|
||||
memset (ap + fill_start, 0xff, fill_end - fill_start);
|
||||
MEMSET_WRAPPED (ap + fill_start, 0xff, fill_end - fill_start);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -76,12 +76,14 @@ rasterizeEdges (FbBits *buf,
|
|||
x &= FB_MASK;
|
||||
|
||||
FbMaskBits (x, width, startmask, nmiddle, endmask);
|
||||
if (startmask)
|
||||
*a++ |= startmask;
|
||||
if (startmask) {
|
||||
WRITE(a, READ(a) | startmask);
|
||||
a++;
|
||||
}
|
||||
while (nmiddle--)
|
||||
*a++ = FB_ALLONES;
|
||||
WRITE(a++, FB_ALLONES);
|
||||
if (endmask)
|
||||
*a |= endmask;
|
||||
WRITE(a, READ(a) | endmask);
|
||||
}
|
||||
#else
|
||||
{
|
||||
|
|
13
fb/fbfill.c
13
fb/fbfill.c
|
@ -49,8 +49,10 @@ fbFill (DrawablePtr pDrawable,
|
|||
case FillSolid:
|
||||
#ifdef USE_MMX
|
||||
if (!pPriv->and && fbHaveMMX())
|
||||
if (fbSolidFillmmx (pDrawable, x, y, width, height, pPriv->xor))
|
||||
if (fbSolidFillmmx (pDrawable, x, y, width, height, pPriv->xor)) {
|
||||
fbFinishAccess (pDrawable);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
fbSolid (dst + (y + dstYoff) * dstStride,
|
||||
dstStride,
|
||||
|
@ -92,6 +94,7 @@ fbFill (DrawablePtr pDrawable,
|
|||
|
||||
(pGC->patOrg.x + pDrawable->x + dstXoff),
|
||||
pGC->patOrg.y + pDrawable->y - y);
|
||||
fbFinishAccess (&pStip->drawable);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -129,6 +132,7 @@ fbFill (DrawablePtr pDrawable,
|
|||
bgand, bgxor,
|
||||
pGC->patOrg.x + pDrawable->x + dstXoff,
|
||||
pGC->patOrg.y + pDrawable->y - y);
|
||||
fbFinishAccess (&pStip->drawable);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -157,10 +161,12 @@ fbFill (DrawablePtr pDrawable,
|
|||
dstBpp,
|
||||
(pGC->patOrg.x + pDrawable->x + dstXoff) * dstBpp,
|
||||
pGC->patOrg.y + pDrawable->y - y);
|
||||
fbFinishAccess (&pTile->drawable);
|
||||
break;
|
||||
}
|
||||
}
|
||||
fbValidateDrawable (pDrawable);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -215,8 +221,10 @@ fbSolidBoxClipped (DrawablePtr pDrawable,
|
|||
if (fbSolidFillmmx (pDrawable,
|
||||
partX1, partY1,
|
||||
(partX2 - partX1), (partY2 - partY1),
|
||||
xor))
|
||||
xor)) {
|
||||
fbFinishAccess (pDrawable);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
fbSolid (dst + (partY1 + dstYoff) * dstStride,
|
||||
|
@ -228,4 +236,5 @@ fbSolidBoxClipped (DrawablePtr pDrawable,
|
|||
(partY2 - partY1),
|
||||
and, xor);
|
||||
}
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
|
13
fb/fbgc.c
13
fb/fbgc.c
|
@ -106,16 +106,18 @@ fbPadPixmap (PixmapPtr pPixmap)
|
|||
mask = FbBitsMask (0, width);
|
||||
while (height--)
|
||||
{
|
||||
b = *bits & mask;
|
||||
b = READ(bits) & mask;
|
||||
w = width;
|
||||
while (w < FB_UNIT)
|
||||
{
|
||||
b = b | FbScrRight(b, w);
|
||||
w <<= 1;
|
||||
}
|
||||
*bits = b;
|
||||
WRITE(bits, b);
|
||||
bits += stride;
|
||||
}
|
||||
|
||||
fbFinishAccess (&pPixmap->drawable);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -153,7 +155,7 @@ fbLineRepeat (FbBits *bits, int len, int width)
|
|||
width = (width + FB_UNIT-1) >> FB_SHIFT;
|
||||
bits++;
|
||||
while (--width)
|
||||
if (*bits != first)
|
||||
if (READ(bits) != first)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -183,10 +185,13 @@ fbCanEvenStipple (PixmapPtr pStipple, int bpp)
|
|||
/* check to see that the stipple repeats horizontally */
|
||||
while (h--)
|
||||
{
|
||||
if (!fbLineRepeat (bits, len, pStipple->drawable.width))
|
||||
if (!fbLineRepeat (bits, len, pStipple->drawable.width)) {
|
||||
fbFinishAccess (&pStipple->drawable);
|
||||
return FALSE;
|
||||
}
|
||||
bits += stride;
|
||||
}
|
||||
fbFinishAccess (&pStipple->drawable);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -84,4 +84,6 @@ fbGetSpans(DrawablePtr pDrawable,
|
|||
ppt++;
|
||||
pwidth++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
|
18
fb/fbglyph.c
18
fb/fbglyph.c
|
@ -62,11 +62,11 @@ fbGlyphIn (RegionPtr pRegion,
|
|||
#ifdef FB_24BIT
|
||||
#ifndef FBNOPIXADDR
|
||||
|
||||
#define WRITE1(d,n,fg) ((d)[n] = (CARD8) fg)
|
||||
#define WRITE2(d,n,fg) (*(CARD16 *) &(d[n]) = (CARD16) fg)
|
||||
#define WRITE4(d,n,fg) (*(CARD32 *) &(d[n]) = (CARD32) fg)
|
||||
#define WRITE1(d,n,fg) WRITE((d) + (n), (CARD8) fg)
|
||||
#define WRITE2(d,n,fg) WRITE((CARD16 *) &(d[n]), (CARD16) fg)
|
||||
#define WRITE4(d,n,fg) WRITE((CARD32 *) &(d[n]), (CARD32) fg)
|
||||
#if FB_UNIT == 6 && IMAGE_BYTE_ORDER == LSBFirst
|
||||
#define WRITE8(d) (*(FbBits *) &(d[0]) = fg)
|
||||
#define WRITE8(d) WRITE((FbBits *) &(d[0]), fg)
|
||||
#else
|
||||
#define WRITE8(d) WRITE4(d,0,_ABCA), WRITE4(d,4,_BCAB)
|
||||
#endif
|
||||
|
@ -157,7 +157,7 @@ fbGlyph24 (FbBits *dstBits,
|
|||
lshift = 4 - shift;
|
||||
while (height--)
|
||||
{
|
||||
bits = *stipple++;
|
||||
bits = READ(stipple++);
|
||||
n = lshift;
|
||||
dst = dstLine;
|
||||
while (bits)
|
||||
|
@ -284,7 +284,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable,
|
|||
glyph = 0;
|
||||
if (pGC->fillStyle == FillSolid && pPriv->and == 0)
|
||||
{
|
||||
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
||||
dstBpp = pDrawable->bitsPerPixel;
|
||||
switch (dstBpp) {
|
||||
case 8: glyph = fbGlyph8; break;
|
||||
case 16: glyph = fbGlyph16; break;
|
||||
|
@ -312,6 +312,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable,
|
|||
if (glyph && gWidth <= sizeof (FbStip) * 8 &&
|
||||
fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight))
|
||||
{
|
||||
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
||||
(*glyph) (dst + (gy + dstYoff) * dstStride,
|
||||
dstStride,
|
||||
dstBpp,
|
||||
|
@ -319,6 +320,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable,
|
|||
pPriv->xor,
|
||||
gx + dstXoff,
|
||||
gHeight);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
@ -375,7 +377,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable,
|
|||
glyph = 0;
|
||||
if (pPriv->and == 0)
|
||||
{
|
||||
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
||||
dstBpp = pDrawable->bitsPerPixel;
|
||||
switch (dstBpp) {
|
||||
case 8: glyph = fbGlyph8; break;
|
||||
case 16: glyph = fbGlyph16; break;
|
||||
|
@ -443,6 +445,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable,
|
|||
if (glyph && gWidth <= sizeof (FbStip) * 8 &&
|
||||
fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight))
|
||||
{
|
||||
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
|
||||
(*glyph) (dst + (gy + dstYoff) * dstStride,
|
||||
dstStride,
|
||||
dstBpp,
|
||||
|
@ -450,6 +453,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable,
|
|||
pPriv->fg,
|
||||
gx + dstXoff,
|
||||
gHeight);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
|
|
@ -170,6 +170,8 @@ fbPutZImage (DrawablePtr pDrawable,
|
|||
pm,
|
||||
dstBpp);
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -277,6 +279,8 @@ fbPutXYImage (DrawablePtr pDrawable,
|
|||
fgand, fgxor, bgand, bgxor);
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -361,4 +365,6 @@ fbGetImage (DrawablePtr pDrawable,
|
|||
fbXorStip(GXcopy,0,FB_STIP_ALLONES),
|
||||
planeMask);
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
|
109
fb/fbpict.c
109
fb/fbpict.c
|
@ -137,22 +137,25 @@ fbCompositeSolidMask_nx8x8888 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
m = *mask++;
|
||||
m = READ(mask++);
|
||||
if (m == 0xff)
|
||||
{
|
||||
if (srca == 0xff)
|
||||
*dst = src & dstMask;
|
||||
WRITE(dst, src & dstMask);
|
||||
else
|
||||
*dst = fbOver (src, *dst) & dstMask;
|
||||
WRITE(dst, fbOver (src, READ(dst)) & dstMask);
|
||||
}
|
||||
else if (m)
|
||||
{
|
||||
d = fbIn (src, m);
|
||||
*dst = fbOver (d, *dst) & dstMask;
|
||||
WRITE(dst, fbOver (d, READ(dst)) & dstMask);
|
||||
}
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pMask->pDrawable);
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -196,17 +199,17 @@ fbCompositeSolidMask_nx8888x8888C (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
ma = *mask++;
|
||||
ma = READ(mask++);
|
||||
if (ma == 0xffffffff)
|
||||
{
|
||||
if (srca == 0xff)
|
||||
*dst = src & dstMask;
|
||||
WRITE(dst, src & dstMask);
|
||||
else
|
||||
*dst = fbOver (src, *dst) & dstMask;
|
||||
WRITE(dst, fbOver (src, READ(dst)) & dstMask);
|
||||
}
|
||||
else if (ma)
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
#define FbInOverC(src,srca,msk,dst,i,result) { \
|
||||
CARD16 __a = FbGet8(msk,i); \
|
||||
CARD32 __t, __ta; \
|
||||
|
@ -221,11 +224,14 @@ fbCompositeSolidMask_nx8888x8888C (CARD8 op,
|
|||
FbInOverC (src, srca, ma, d, 8, n);
|
||||
FbInOverC (src, srca, ma, d, 16, o);
|
||||
FbInOverC (src, srca, ma, d, 24, p);
|
||||
*dst = m|n|o|p;
|
||||
WRITE(dst, m|n|o|p);
|
||||
}
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pMask->pDrawable);
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -268,7 +274,7 @@ fbCompositeSolidMask_nx8x0888 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
m = *mask++;
|
||||
m = READ(mask++);
|
||||
if (m == 0xff)
|
||||
{
|
||||
if (srca == 0xff)
|
||||
|
@ -288,6 +294,9 @@ fbCompositeSolidMask_nx8x0888 (CARD8 op,
|
|||
dst += 3;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pMask->pDrawable);
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -330,27 +339,30 @@ fbCompositeSolidMask_nx8x0565 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
m = *mask++;
|
||||
m = READ(mask++);
|
||||
if (m == 0xff)
|
||||
{
|
||||
if (srca == 0xff)
|
||||
d = src;
|
||||
else
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
d = fbOver24 (src, cvt0565to8888(d));
|
||||
}
|
||||
*dst = cvt8888to0565(d);
|
||||
WRITE(dst, cvt8888to0565(d));
|
||||
}
|
||||
else if (m)
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
d = fbOver24 (fbIn(src,m), cvt0565to8888(d));
|
||||
*dst = cvt8888to0565(d);
|
||||
WRITE(dst, cvt8888to0565(d));
|
||||
}
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pMask->pDrawable);
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -397,33 +409,36 @@ fbCompositeSolidMask_nx8888x0565C (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
ma = *mask++;
|
||||
ma = READ(mask++);
|
||||
if (ma == 0xffffffff)
|
||||
{
|
||||
if (srca == 0xff)
|
||||
{
|
||||
*dst = src16;
|
||||
WRITE(dst, src16);
|
||||
}
|
||||
else
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
d = fbOver24 (src, cvt0565to8888(d));
|
||||
*dst = cvt8888to0565(d);
|
||||
WRITE(dst, cvt8888to0565(d));
|
||||
}
|
||||
}
|
||||
else if (ma)
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
d = cvt0565to8888(d);
|
||||
FbInOverC (src, srca, ma, d, 0, m);
|
||||
FbInOverC (src, srca, ma, d, 8, n);
|
||||
FbInOverC (src, srca, ma, d, 16, o);
|
||||
d = m|n|o;
|
||||
*dst = cvt8888to0565(d);
|
||||
WRITE(dst, cvt8888to0565(d));
|
||||
}
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pMask->pDrawable);
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -461,15 +476,18 @@ fbCompositeSrc_8888x8888 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
s = *src++;
|
||||
s = READ(src++);
|
||||
a = s >> 24;
|
||||
if (a == 0xff)
|
||||
*dst = s & dstMask;
|
||||
WRITE(dst, s & dstMask);
|
||||
else if (a)
|
||||
*dst = fbOver (s, *dst) & dstMask;
|
||||
WRITE(dst, fbOver (s, READ(dst)) & dstMask);
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pSrc->pDrawable);
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -506,7 +524,7 @@ fbCompositeSrc_8888x0888 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
s = *src++;
|
||||
s = READ(src++);
|
||||
a = s >> 24;
|
||||
if (a)
|
||||
{
|
||||
|
@ -519,6 +537,9 @@ fbCompositeSrc_8888x0888 (CARD8 op,
|
|||
dst += 3;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pSrc->pDrawable);
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -555,7 +576,7 @@ fbCompositeSrc_8888x0565 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
s = *src++;
|
||||
s = READ(src++);
|
||||
a = s >> 24;
|
||||
if (a)
|
||||
{
|
||||
|
@ -563,14 +584,17 @@ fbCompositeSrc_8888x0565 (CARD8 op,
|
|||
d = s;
|
||||
else
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
d = fbOver24 (s, cvt0565to8888(d));
|
||||
}
|
||||
*dst = cvt8888to0565(d);
|
||||
WRITE(dst, cvt8888to0565(d));
|
||||
}
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
fbFinishAccess (pSrc->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -605,8 +629,11 @@ fbCompositeSrc_0565x0565 (CARD8 op,
|
|||
w = width;
|
||||
|
||||
while (w--)
|
||||
*dst++ = *src++;
|
||||
WRITE(dst, READ(src++));
|
||||
}
|
||||
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
fbFinishAccess (pSrc->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -643,20 +670,23 @@ fbCompositeSrcAdd_8000x8000 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
s = *src++;
|
||||
s = READ(src++);
|
||||
if (s)
|
||||
{
|
||||
if (s != 0xff)
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
t = d + s;
|
||||
s = t | (0 - (t >> 8));
|
||||
}
|
||||
*dst = s;
|
||||
WRITE(dst, s);
|
||||
}
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
fbFinishAccess (pSrc->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -694,12 +724,12 @@ fbCompositeSrcAdd_8888x8888 (CARD8 op,
|
|||
|
||||
while (w--)
|
||||
{
|
||||
s = *src++;
|
||||
s = READ(src++);
|
||||
if (s)
|
||||
{
|
||||
if (s != 0xffffffff)
|
||||
{
|
||||
d = *dst;
|
||||
d = READ(dst);
|
||||
if (d)
|
||||
{
|
||||
m = FbAdd(s,d,0,t);
|
||||
|
@ -709,11 +739,14 @@ fbCompositeSrcAdd_8888x8888 (CARD8 op,
|
|||
s = m|n|o|p;
|
||||
}
|
||||
}
|
||||
*dst = s;
|
||||
WRITE(dst, s);
|
||||
}
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
fbFinishAccess (pSrc->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -757,6 +790,9 @@ fbCompositeSrcAdd_1000x1000 (CARD8 op,
|
|||
|
||||
FALSE,
|
||||
FALSE);
|
||||
|
||||
fbFinishAccess(pDst->pDrawable);
|
||||
fbFinishAccess(pSrc->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -821,6 +857,9 @@ fbCompositeSolidMask_nx1xn (CARD8 op,
|
|||
src,
|
||||
FB_ALLONES,
|
||||
0x0);
|
||||
|
||||
fbFinishAccess (pDst->pDrawable);
|
||||
fbFinishAccess (pMask->pDrawable);
|
||||
}
|
||||
|
||||
# define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b))
|
||||
|
|
29
fb/fbpict.h
29
fb/fbpict.h
|
@ -76,13 +76,13 @@
|
|||
fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \
|
||||
switch (__bpp__) { \
|
||||
case 32: \
|
||||
(bits) = *(CARD32 *) __bits__; \
|
||||
(bits) = READ((CARD32 *) __bits__); \
|
||||
break; \
|
||||
case 24: \
|
||||
(bits) = Fetch24 ((CARD8 *) __bits__); \
|
||||
break; \
|
||||
case 16: \
|
||||
(bits) = *(CARD16 *) __bits__; \
|
||||
(bits) = READ((CARD16 *) __bits__); \
|
||||
(bits) = cvt0565to8888(bits); \
|
||||
break; \
|
||||
default: \
|
||||
|
@ -99,6 +99,7 @@
|
|||
/* manage missing src alpha */ \
|
||||
if ((pict)->pFormat->direct.alphaMask == 0) \
|
||||
(bits) |= 0xff000000; \
|
||||
fbFinishAccess ((pict)->pDrawable); \
|
||||
}
|
||||
|
||||
#define fbComposeGetStart(pict,x,y,type,stride,line,mul) {\
|
||||
|
@ -120,22 +121,22 @@
|
|||
|
||||
#if IMAGE_BYTE_ORDER == MSBFirst
|
||||
#define Fetch24(a) ((unsigned long) (a) & 1 ? \
|
||||
((*(a) << 16) | *((CARD16 *) ((a)+1))) : \
|
||||
((*((CARD16 *) (a)) << 8) | *((a)+2)))
|
||||
((READ(a) << 16) | READ((CARD16 *) ((a)+1))) : \
|
||||
((READ((CARD16 *) (a)) << 8) | READ((a)+2)))
|
||||
#define Store24(a,v) ((unsigned long) (a) & 1 ? \
|
||||
((*(a) = (CARD8) ((v) >> 16)), \
|
||||
(*((CARD16 *) ((a)+1)) = (CARD16) (v))) : \
|
||||
((*((CARD16 *) (a)) = (CARD16) ((v) >> 8)), \
|
||||
(*((a)+2) = (CARD8) (v))))
|
||||
(WRITE(a, (CARD8) ((v) >> 16)), \
|
||||
WRITE((CARD16 *) ((a)+1), (CARD16) (v))) : \
|
||||
(WRITE((CARD16 *) (a), (CARD16) ((v) >> 8)), \
|
||||
WRITE((a)+2, (CARD8) (v))))
|
||||
#else
|
||||
#define Fetch24(a) ((unsigned long) (a) & 1 ? \
|
||||
((*(a)) | (*((CARD16 *) ((a)+1)) << 8)) : \
|
||||
((*((CARD16 *) (a))) | (*((a)+2) << 16)))
|
||||
(READ(a) | (READ((CARD16 *) ((a)+1)) << 8)) : \
|
||||
(READ((CARD16 *) (a)) | (READ((a)+2) << 16)))
|
||||
#define Store24(a,v) ((unsigned long) (a) & 1 ? \
|
||||
((*(a) = (CARD8) (v)), \
|
||||
(*((CARD16 *) ((a)+1)) = (CARD16) ((v) >> 8))) : \
|
||||
((*((CARD16 *) (a)) = (CARD16) (v)),\
|
||||
(*((a)+2) = (CARD8) ((v) >> 16))))
|
||||
(WRITE(a, (CARD8) (v)), \
|
||||
WRITE((CARD16 *) ((a)+1), (CARD16) ((v) >> 8))) : \
|
||||
(WRITE((CARD16 *) (a), (CARD16) (v)),\
|
||||
WRITE((a)+2, (CARD8) ((v) >> 16))))
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -160,6 +160,8 @@ fbPixmapToRegion(PixmapPtr pPix)
|
|||
FirstRect = REGION_BOXPTR(pReg);
|
||||
rects = FirstRect;
|
||||
|
||||
fbPrepareAccess(&pPix->drawable);
|
||||
|
||||
pwLine = (FbBits *) pPix->devPrivate.ptr;
|
||||
nWidth = pPix->devKind >> (FB_SHIFT-3);
|
||||
|
||||
|
@ -174,7 +176,7 @@ fbPixmapToRegion(PixmapPtr pPix)
|
|||
irectLineStart = rects - FirstRect;
|
||||
/* If the Screen left most bit of the word is set, we're starting in
|
||||
* a box */
|
||||
if(*pw & mask0)
|
||||
if(READ(pw) & mask0)
|
||||
{
|
||||
fInBox = TRUE;
|
||||
rx1 = 0;
|
||||
|
@ -185,7 +187,7 @@ fbPixmapToRegion(PixmapPtr pPix)
|
|||
pwLineEnd = pw + (width >> FB_SHIFT);
|
||||
for (base = 0; pw < pwLineEnd; base += FB_UNIT)
|
||||
{
|
||||
w = *pw++;
|
||||
w = READ(pw++);
|
||||
if (fInBox)
|
||||
{
|
||||
if (!~w)
|
||||
|
@ -226,7 +228,7 @@ fbPixmapToRegion(PixmapPtr pPix)
|
|||
if(width & FB_MASK)
|
||||
{
|
||||
/* Process final partial word on line */
|
||||
w = *pw++;
|
||||
w = READ(pw++);
|
||||
for(ib = 0; ib < (width & FB_MASK); ib++)
|
||||
{
|
||||
/* If the Screen left most bit of the word is set, we're
|
||||
|
@ -311,6 +313,8 @@ fbPixmapToRegion(PixmapPtr pPix)
|
|||
pReg->data = (RegDataPtr)NULL;
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess(&pPix->drawable);
|
||||
#ifdef DEBUG
|
||||
if (!miValidRegion(pReg))
|
||||
FatalError("Assertion failed file %s, line %d: expr\n", __FILE__, __LINE__);
|
||||
|
@ -362,6 +366,7 @@ fbValidateDrawable (DrawablePtr pDrawable)
|
|||
if (!fbValidateBits (first, stride, FB_HEAD_BITS) ||
|
||||
!fbValidateBits (last, stride, FB_TAIL_BITS))
|
||||
fbInitializeDrawable(pDrawable);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -383,5 +388,6 @@ fbInitializeDrawable (DrawablePtr pDrawable)
|
|||
last = bits + stride * pDrawable->height;
|
||||
fbSetBits (first, stride, FB_HEAD_BITS);
|
||||
fbSetBits (last, stride, FB_TAIL_BITS);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
#endif /* FB_DEBUG */
|
||||
|
|
|
@ -90,20 +90,20 @@ fbDots (FbBits *dstOrig,
|
|||
FbMaskStip (x, 24, leftMask, n, rightMask);
|
||||
if (leftMask)
|
||||
{
|
||||
*d = FbDoMaskRRop (*d, andT, xorT, leftMask);
|
||||
WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask));
|
||||
andT = FbNext24Stip(andT);
|
||||
xorT = FbNext24Stip(xorT);
|
||||
d++;
|
||||
}
|
||||
if (rightMask)
|
||||
*d = FbDoMaskRRop(*d, andT, xorT, rightMask);
|
||||
WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
FbStip mask;
|
||||
mask = FbStipMask(x, dstBpp);
|
||||
*d = FbDoMaskRRop (*d, and, xor, mask);
|
||||
WRITE(d, FbDoMaskRRop (READ(d), and, xor, mask));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,4 +160,5 @@ fbPolyPoint (DrawablePtr pDrawable,
|
|||
nBox--; pBox++)
|
||||
(*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit,
|
||||
pDrawable->x, pDrawable->y, dstXoff, dstYoff, and, xor);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
|
|
@ -875,6 +875,8 @@ xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
|
|||
register CARD16 *d;
|
||||
int w;
|
||||
|
||||
fbPrepareAccess((DrawablePtr)pScreen->devPrivate);
|
||||
|
||||
dst_base = (CARD16*) ((PixmapPtr)pScreen->devPrivate)->devPrivate.ptr;
|
||||
dst_stride = (int)((PixmapPtr)pScreen->devPrivate)->devKind
|
||||
/ sizeof (CARD16);
|
||||
|
@ -899,6 +901,8 @@ xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
|
|||
}
|
||||
pbox++;
|
||||
}
|
||||
|
||||
fbFinishAccess(&((PixmapPtr)pScreen->devPrivate)->drawable);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1200,7 +1204,7 @@ GCFuncs xxGCFuncs = {
|
|||
xxChangeClip, xxDestroyClip, xxCopyClip
|
||||
};
|
||||
|
||||
GCOps xxGCOps = {
|
||||
static GCOps xxGCOps = {
|
||||
xxFillSpans, xxSetSpans,
|
||||
xxPutImage, xxCopyArea,
|
||||
xxCopyPlane, xxPolyPoint,
|
||||
|
|
|
@ -58,7 +58,7 @@ fbPushPattern (DrawablePtr pDrawable,
|
|||
w = width;
|
||||
s = src;
|
||||
src += srcStride;
|
||||
bits = *s++;
|
||||
bits = READ(s++);
|
||||
xspan = x;
|
||||
while (w)
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ fbPushPattern (DrawablePtr pDrawable,
|
|||
bitsMask = FbStipRight (bitsMask, 1);
|
||||
if (!bitsMask)
|
||||
{
|
||||
bits = *s++;
|
||||
bits = READ(s++);
|
||||
bitsMask = FbBitsMask(0,1);
|
||||
}
|
||||
} while (bits & bitsMask);
|
||||
|
@ -92,7 +92,7 @@ fbPushPattern (DrawablePtr pDrawable,
|
|||
bitsMask = FbStipRight (bitsMask, 1);
|
||||
if (!bitsMask)
|
||||
{
|
||||
bits = *s++;
|
||||
bits = READ(s++);
|
||||
bitsMask = FbBitsMask(0,1);
|
||||
}
|
||||
} while (!(bits & bitsMask));
|
||||
|
@ -165,6 +165,7 @@ fbPushFill (DrawablePtr pDrawable,
|
|||
fbAnd(GXnoop,(FbBits) 0,FB_ALLONES),
|
||||
fbXor(GXnoop,(FbBits) 0,FB_ALLONES));
|
||||
}
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -155,6 +155,19 @@ fbSetupScreen(ScreenPtr pScreen,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
Bool
|
||||
wfbFinishScreenInit(ScreenPtr pScreen,
|
||||
pointer pbits,
|
||||
int xsize,
|
||||
int ysize,
|
||||
int dpix,
|
||||
int dpiy,
|
||||
int width,
|
||||
int bpp,
|
||||
SetupWrapProcPtr setupWrap,
|
||||
FinishWrapProcPtr finishWrap)
|
||||
#else
|
||||
Bool
|
||||
fbFinishScreenInit(ScreenPtr pScreen,
|
||||
pointer pbits,
|
||||
|
@ -164,6 +177,7 @@ fbFinishScreenInit(ScreenPtr pScreen,
|
|||
int dpiy,
|
||||
int width,
|
||||
int bpp)
|
||||
#endif
|
||||
{
|
||||
VisualPtr visuals;
|
||||
DepthPtr depths;
|
||||
|
@ -222,6 +236,10 @@ fbFinishScreenInit(ScreenPtr pScreen,
|
|||
fbGetScreenPrivate(pScreen)->win32bpp = 32;
|
||||
fbGetScreenPrivate(pScreen)->pix32bpp = 32;
|
||||
}
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
fbGetScreenPrivate(pScreen)->setupWrap = setupWrap;
|
||||
fbGetScreenPrivate(pScreen)->finishWrap = finishWrap;
|
||||
#endif
|
||||
#endif
|
||||
rootdepth = 0;
|
||||
if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth,
|
||||
|
@ -256,6 +274,27 @@ fbFinishScreenInit(ScreenPtr pScreen,
|
|||
}
|
||||
|
||||
/* dts * (inch/dot) * (25.4 mm / inch) = mm */
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
Bool
|
||||
wfbScreenInit(ScreenPtr pScreen,
|
||||
pointer pbits,
|
||||
int xsize,
|
||||
int ysize,
|
||||
int dpix,
|
||||
int dpiy,
|
||||
int width,
|
||||
int bpp,
|
||||
SetupWrapProcPtr setupWrap,
|
||||
FinishWrapProcPtr finishWrap)
|
||||
{
|
||||
if (!fbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp))
|
||||
return FALSE;
|
||||
if (!wfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy,
|
||||
width, bpp, setupWrap, finishWrap))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
#else
|
||||
Bool
|
||||
fbScreenInit(ScreenPtr pScreen,
|
||||
pointer pbits,
|
||||
|
@ -273,6 +312,7 @@ fbScreenInit(ScreenPtr pScreen,
|
|||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FB_OLD_SCREEN
|
||||
|
|
28
fb/fbseg.c
28
fb/fbseg.c
|
@ -79,7 +79,7 @@ fbBresSolid (DrawablePtr pDrawable,
|
|||
mask = fbBresShiftMask(mask,signdx,dstBpp);
|
||||
if (!mask)
|
||||
{
|
||||
*dst = FbDoMaskRRop (*dst, and, xor, bits);
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
|
||||
bits = 0;
|
||||
dst += signdx;
|
||||
mask = mask0;
|
||||
|
@ -87,20 +87,20 @@ fbBresSolid (DrawablePtr pDrawable,
|
|||
e += e1;
|
||||
if (e >= 0)
|
||||
{
|
||||
*dst = FbDoMaskRRop (*dst, and, xor, bits);
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
|
||||
bits = 0;
|
||||
dst += dstStride;
|
||||
e += e3;
|
||||
}
|
||||
}
|
||||
if (bits)
|
||||
*dst = FbDoMaskRRop (*dst, and, xor, bits);
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
|
||||
}
|
||||
else
|
||||
{
|
||||
while (len--)
|
||||
{
|
||||
*dst = FbDoMaskRRop (*dst, and, xor, mask);
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, mask));
|
||||
dst += dstStride;
|
||||
e += e1;
|
||||
if (e >= 0)
|
||||
|
@ -115,6 +115,8 @@ fbBresSolid (DrawablePtr pDrawable,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -164,9 +166,9 @@ fbBresDash (DrawablePtr pDrawable,
|
|||
while (len--)
|
||||
{
|
||||
if (even)
|
||||
*dst = FbDoMaskRRop (*dst, and, xor, mask);
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, mask));
|
||||
else if (doOdd)
|
||||
*dst = FbDoMaskRRop (*dst, bgand, bgxor, mask);
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), bgand, bgxor, mask));
|
||||
if (axis == X_AXIS)
|
||||
{
|
||||
mask = fbBresShiftMask(mask,signdx,dstBpp);
|
||||
|
@ -199,6 +201,8 @@ fbBresDash (DrawablePtr pDrawable,
|
|||
}
|
||||
FbDashStep (dashlen, even);
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -371,13 +375,13 @@ fbBresSolid24RRop (DrawablePtr pDrawable,
|
|||
FbMaskStip (x, 24, leftMask, nl, rightMask);
|
||||
if (leftMask)
|
||||
{
|
||||
*d = FbDoMaskRRop (*d, andT, xorT, leftMask);
|
||||
WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask));
|
||||
d++;
|
||||
andT = FbNext24Stip (andT);
|
||||
xorT = FbNext24Stip (xorT);
|
||||
}
|
||||
if (rightMask)
|
||||
*d = FbDoMaskRRop (*d, andT, xorT, rightMask);
|
||||
WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, rightMask));
|
||||
if (axis == X_AXIS)
|
||||
{
|
||||
x1 += signdx;
|
||||
|
@ -399,6 +403,8 @@ fbBresSolid24RRop (DrawablePtr pDrawable,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -468,13 +474,13 @@ fbBresDash24RRop (DrawablePtr pDrawable,
|
|||
FbMaskStip (x, 24, leftMask, nl, rightMask);
|
||||
if (leftMask)
|
||||
{
|
||||
*d = FbDoMaskRRop (*d, andT, xorT, leftMask);
|
||||
WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask));
|
||||
d++;
|
||||
andT = FbNext24Stip (andT);
|
||||
xorT = FbNext24Stip (xorT);
|
||||
}
|
||||
if (rightMask)
|
||||
*d = FbDoMaskRRop (*d, andT, xorT, rightMask);
|
||||
WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, rightMask));
|
||||
}
|
||||
if (axis == X_AXIS)
|
||||
{
|
||||
|
@ -498,6 +504,8 @@ fbBresDash24RRop (DrawablePtr pDrawable,
|
|||
}
|
||||
FbDashStep (dashlen, even);
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -99,5 +99,6 @@ fbSetSpans (DrawablePtr pDrawable,
|
|||
pwidth++;
|
||||
}
|
||||
fbValidateDrawable (pDrawable);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
|
|
42
fb/fbsolid.c
42
fb/fbsolid.c
|
@ -70,12 +70,12 @@ fbSolid (FbBits *dst,
|
|||
n = nmiddle;
|
||||
if (!and)
|
||||
while (n--)
|
||||
*dst++ = xor;
|
||||
WRITE(dst++, xor);
|
||||
else
|
||||
while (n--)
|
||||
{
|
||||
*dst = FbDoRRop (*dst, and, xor);
|
||||
dst++;
|
||||
WRITE(dst, FbDoRRop (READ(dst), and, xor));
|
||||
dst++;
|
||||
}
|
||||
if (endmask)
|
||||
FbDoRightMaskByteRRop(dst,endbyte,endmask,and,xor);
|
||||
|
@ -160,26 +160,26 @@ fbSolid24 (FbBits *dst,
|
|||
{
|
||||
if (startmask)
|
||||
{
|
||||
*dst = FbDoMaskRRop(*dst, andS, xorS, startmask);
|
||||
dst++;
|
||||
WRITE(dst, FbDoMaskRRop(READ(dst), andS, xorS, startmask));
|
||||
dst++;
|
||||
}
|
||||
n = nmiddle;
|
||||
if (!and0)
|
||||
{
|
||||
while (n >= 3)
|
||||
{
|
||||
*dst++ = xor0;
|
||||
*dst++ = xor1;
|
||||
*dst++ = xor2;
|
||||
WRITE(dst++, xor0);
|
||||
WRITE(dst++, xor1);
|
||||
WRITE(dst++, xor2);
|
||||
n -= 3;
|
||||
}
|
||||
if (n)
|
||||
{
|
||||
*dst++ = xor0;
|
||||
WRITE(dst++, xor0);
|
||||
n--;
|
||||
if (n)
|
||||
{
|
||||
*dst++ = xor1;
|
||||
WRITE(dst++, xor1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -187,28 +187,28 @@ fbSolid24 (FbBits *dst,
|
|||
{
|
||||
while (n >= 3)
|
||||
{
|
||||
*dst = FbDoRRop (*dst, and0, xor0);
|
||||
dst++;
|
||||
*dst = FbDoRRop (*dst, and1, xor1);
|
||||
dst++;
|
||||
*dst = FbDoRRop (*dst, and2, xor2);
|
||||
dst++;
|
||||
WRITE(dst, FbDoRRop (READ(dst), and0, xor0));
|
||||
dst++;
|
||||
WRITE(dst, FbDoRRop (READ(dst), and1, xor1));
|
||||
dst++;
|
||||
WRITE(dst, FbDoRRop (READ(dst), and2, xor2));
|
||||
dst++;
|
||||
n -= 3;
|
||||
}
|
||||
if (n)
|
||||
{
|
||||
*dst = FbDoRRop (*dst, and0, xor0);
|
||||
dst++;
|
||||
WRITE(dst, FbDoRRop (READ(dst), and0, xor0));
|
||||
dst++;
|
||||
n--;
|
||||
if (n)
|
||||
{
|
||||
*dst = FbDoRRop (*dst, and1, xor1);
|
||||
dst++;
|
||||
WRITE(dst, FbDoRRop (READ(dst), and1, xor1));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (endmask)
|
||||
*dst = FbDoMaskRRop (*dst, andE, xorE, endmask);
|
||||
WRITE(dst, FbDoMaskRRop (READ(dst), andE, xorE, endmask));
|
||||
dst += dstStride;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@ fbEvenStipple (FbBits *dst,
|
|||
/*
|
||||
* Extract stipple bits for this scanline;
|
||||
*/
|
||||
bits = *s;
|
||||
bits = READ(s);
|
||||
s += stipStride;
|
||||
if (s == stipEnd)
|
||||
s = stip;
|
||||
|
@ -199,12 +199,12 @@ fbEvenStipple (FbBits *dst,
|
|||
n = nmiddle;
|
||||
if (!and)
|
||||
while (n--)
|
||||
*dst++ = xor;
|
||||
WRITE(dst++, xor);
|
||||
else
|
||||
{
|
||||
while (n--)
|
||||
{
|
||||
*dst = FbDoRRop (*dst, and, xor);
|
||||
WRITE(dst, FbDoRRop (READ(dst), and, xor));
|
||||
dst++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ fbEvenTile (FbBits *dst,
|
|||
/*
|
||||
* Pick up bits for this scanline
|
||||
*/
|
||||
bits = *t++;
|
||||
bits = READ(t++);
|
||||
if (t == tileEnd) t = tile;
|
||||
bits = FbRotLeft(bits,rot);
|
||||
and = fbAnd(alu,bits,pm);
|
||||
|
@ -94,11 +94,11 @@ fbEvenTile (FbBits *dst,
|
|||
n = nmiddle;
|
||||
if (!and)
|
||||
while (n--)
|
||||
*dst++ = xor;
|
||||
WRITE(dst++, xor);
|
||||
else
|
||||
while (n--)
|
||||
{
|
||||
*dst = FbDoRRop (*dst, and, xor);
|
||||
WRITE(dst, FbDoRRop (READ(dst), and, xor));
|
||||
dst++;
|
||||
}
|
||||
if (endmask)
|
||||
|
|
|
@ -95,6 +95,8 @@ fbAddTraps (PicturePtr pPicture,
|
|||
}
|
||||
traps++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pPicture->pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -142,6 +144,8 @@ fbRasterizeTrapezoid (PicturePtr pPicture,
|
|||
|
||||
fbRasterizeEdges (buf, bpp, width, stride, &l, &r, t, b);
|
||||
}
|
||||
|
||||
fbFinishAccess (pPicture->pDrawable);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -118,6 +118,9 @@ fbCopyWindowProc (DrawablePtr pSrcDrawable,
|
|||
upsidedown);
|
||||
pbox++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pDstDrawable);
|
||||
fbFinishAccess (pSrcDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -249,6 +252,8 @@ fbFillRegionSolid (DrawablePtr pDrawable,
|
|||
fbValidateDrawable (pDrawable);
|
||||
pbox++;
|
||||
}
|
||||
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
#ifdef PANORAMIX
|
||||
|
@ -311,6 +316,9 @@ fbFillRegionTiled (DrawablePtr pDrawable,
|
|||
yRot - (pbox->y1 + dstYoff));
|
||||
pbox++;
|
||||
}
|
||||
|
||||
fbFinishAccess (&pTile->drawable);
|
||||
fbFinishAccess (pDrawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
198
fb/wfbrename.h
Normal file
198
fb/wfbrename.h
Normal file
|
@ -0,0 +1,198 @@
|
|||
#define fb16Lane wfb16Lane
|
||||
#define fb24_32CopyMtoN wfb24_32CopyMtoN
|
||||
#define fb24_32CreateScreenResources wfb24_32CreateScreenResources
|
||||
#define fb24_32GetImage wfb24_32GetImage
|
||||
#define fb24_32GetSpans wfb24_32GetSpans
|
||||
#define fb24_32ModifyPixmapHeader wfb24_32ModifyPixmapHeader
|
||||
#define fb24_32PutZImage wfb24_32PutZImage
|
||||
#define fb24_32ReformatTile wfb24_32ReformatTile
|
||||
#define fb24_32SetSpans wfb24_32SetSpans
|
||||
#define fb32Lane wfb32Lane
|
||||
#define fb8Lane wfb8Lane
|
||||
#define fbAddTraps wfbAddTraps
|
||||
#define fbAddTriangles wfbAddTriangles
|
||||
#define fbAllocatePrivates wfbAllocatePrivates
|
||||
#define fbArc16 wfbArc16
|
||||
#define fbArc24 wfbArc24
|
||||
#define fbArc32 wfbArc32
|
||||
#define fbArc8 wfbArc8
|
||||
#define fbBlt wfbBlt
|
||||
#define fbBlt24 wfbBlt24
|
||||
#define fbBltOne wfbBltOne
|
||||
#define fbBltOne24 wfbBltOne24
|
||||
#define fbBltPlane wfbBltPlane
|
||||
#define fbBltStip wfbBltStip
|
||||
#define fbBres wfbBres
|
||||
#define fbBresDash wfbBresDash
|
||||
#define fbBresDash16 wfbBresDash16
|
||||
#define fbBresDash24 wfbBresDash24
|
||||
#define fbBresDash32 wfbBresDash32
|
||||
#define fbBresDash8 wfbBresDash8
|
||||
#define fbBresFill wfbBresFill
|
||||
#define fbBresFillDash wfbBresFillDash
|
||||
#define fbBresSolid wfbBresSolid
|
||||
#define fbBresSolid16 wfbBresSolid16
|
||||
#define fbBresSolid24 wfbBresSolid24
|
||||
#define fbBresSolid32 wfbBresSolid32
|
||||
#define fbBresSolid8 wfbBresSolid8
|
||||
#define fbChangeWindowAttributes wfbChangeWindowAttributes
|
||||
#define fbClearVisualTypes wfbClearVisualTypes
|
||||
#define fbCloseScreen wfbCloseScreen
|
||||
#define fbComposite wfbComposite
|
||||
#define fbCompositeGeneral wfbCompositeGeneral
|
||||
#define fbCompositeSolidMask_nx1xn wfbCompositeSolidMask_nx1xn
|
||||
#define fbCompositeSolidMask_nx8888x0565C wfbCompositeSolidMask_nx8888x0565C
|
||||
#define fbCompositeSolidMask_nx8888x8888C wfbCompositeSolidMask_nx8888x8888C
|
||||
#define fbCompositeSolidMask_nx8x0565 wfbCompositeSolidMask_nx8x0565
|
||||
#define fbCompositeSolidMask_nx8x0888 wfbCompositeSolidMask_nx8x0888
|
||||
#define fbCompositeSolidMask_nx8x8888 wfbCompositeSolidMask_nx8x8888
|
||||
#define fbCompositeSrc_0565x0565 wfbCompositeSrc_0565x0565
|
||||
#define fbCompositeSrc_8888x0565 wfbCompositeSrc_8888x0565
|
||||
#define fbCompositeSrc_8888x0888 wfbCompositeSrc_8888x0888
|
||||
#define fbCompositeSrc_8888x8888 wfbCompositeSrc_8888x8888
|
||||
#define fbCompositeSrcAdd_1000x1000 wfbCompositeSrcAdd_1000x1000
|
||||
#define fbCompositeSrcAdd_8000x8000 wfbCompositeSrcAdd_8000x8000
|
||||
#define fbCompositeSrcAdd_8888x8888 wfbCompositeSrcAdd_8888x8888
|
||||
#define fbCopy1toN wfbCopy1toN
|
||||
#define fbCopyArea wfbCopyArea
|
||||
#define fbCopyNto1 wfbCopyNto1
|
||||
#define fbCopyNtoN wfbCopyNtoN
|
||||
#define fbCopyPlane wfbCopyPlane
|
||||
#define fbCopyRegion wfbCopyRegion
|
||||
#define fbCopyWindow wfbCopyWindow
|
||||
#define fbCopyWindowProc wfbCopyWindowProc
|
||||
#define fbCreateDefColormap wfbCreateDefColormap
|
||||
#define fbCreateGC wfbCreateGC
|
||||
#define fbCreatePixmap wfbCreatePixmap
|
||||
#define fbCreatePixmapBpp wfbCreatePixmapBpp
|
||||
#define fbCreateWindow wfbCreateWindow
|
||||
#define fbDestroyPixmap wfbDestroyPixmap
|
||||
#define fbDestroyWindow wfbDestroyWindow
|
||||
#define fbDoCopy wfbDoCopy
|
||||
#define fbDots wfbDots
|
||||
#define fbDots16 wfbDots16
|
||||
#define fbDots24 wfbDots24
|
||||
#define fbDots32 wfbDots32
|
||||
#define fbDots8 wfbDots8
|
||||
#define fbEvenStipple wfbEvenStipple
|
||||
#define fbEvenTile wfbEvenTile
|
||||
#define fbExpandDirectColors wfbExpandDirectColors
|
||||
#define fbFill wfbFill
|
||||
#define fbFillRegionSolid wfbFillRegionSolid
|
||||
#define fbFillRegionTiled wfbFillRegionTiled
|
||||
#define fbFillSpans wfbFillSpans
|
||||
#define fbFixCoordModePrevious wfbFixCoordModePrevious
|
||||
#define fbGCFuncs wfbGCFuncs
|
||||
#define fbGCOps wfbGCOps
|
||||
#define fbGCPrivateIndex wfbGCPrivateIndex
|
||||
#define fbGeneration wfbGeneration
|
||||
#define fbGetGCPrivateIndex wfbGetGCPrivateIndex
|
||||
#define fbGetImage wfbGetImage
|
||||
#define fbGetScreenPrivateIndex wfbGetScreenPrivateIndex
|
||||
#define fbGetSpans wfbGetSpans
|
||||
#define _fbGetWindowPixmap _wfbGetWindowPixmap
|
||||
#define fbGetWinPrivateIndex wfbGetWinPrivateIndex
|
||||
#define fbGlyph16 wfbGlyph16
|
||||
#define fbGlyph24 wfbGlyph24
|
||||
#define fbGlyph32 wfbGlyph32
|
||||
#define fbGlyph8 wfbGlyph8
|
||||
#define fbGlyphIn wfbGlyphIn
|
||||
#define fbHasVisualTypes wfbHasVisualTypes
|
||||
#define fbImageGlyphBlt wfbImageGlyphBlt
|
||||
#define fbIn wfbIn
|
||||
#define fbInitializeColormap wfbInitializeColormap
|
||||
#define fbInitVisuals wfbInitVisuals
|
||||
#define fbInstallColormap wfbInstallColormap
|
||||
#define fbLaneTable wfbLaneTable
|
||||
#define fbListInstalledColormaps wfbListInstalledColormaps
|
||||
#define fbMapWindow wfbMapWindow
|
||||
#define FbMergeRopBits wFbMergeRopBits
|
||||
#define fbOddStipple wfbOddStipple
|
||||
#define fbOddTile wfbOddTile
|
||||
#define fbOver wfbOver
|
||||
#define fbOver24 wfbOver24
|
||||
#define fbOverlayCloseScreen wfbOverlayCloseScreen
|
||||
#define fbOverlayCopyWindow wfbOverlayCopyWindow
|
||||
#define fbOverlayCreateScreenResources wfbOverlayCreateScreenResources
|
||||
#define fbOverlayCreateWindow wfbOverlayCreateWindow
|
||||
#define fbOverlayFinishScreenInit wfbOverlayFinishScreenInit
|
||||
#define fbOverlayGeneration wfbOverlayGeneration
|
||||
#define fbOverlayGetScreenPrivateIndex wfbOverlayGetScreenPrivateIndex
|
||||
#define fbOverlayPaintKey wfbOverlayPaintKey
|
||||
#define fbOverlayPaintWindow wfbOverlayPaintWindow
|
||||
#define fbOverlayScreenPrivateIndex wfbOverlayScreenPrivateIndex
|
||||
#define fbOverlaySetupScreen wfbOverlaySetupScreen
|
||||
#define fbOverlayUpdateLayerRegion wfbOverlayUpdateLayerRegion
|
||||
#define fbOverlayWindowExposures wfbOverlayWindowExposures
|
||||
#define fbOverlayWindowLayer wfbOverlayWindowLayer
|
||||
#define fbPadPixmap wfbPadPixmap
|
||||
#define fbPaintWindow wfbPaintWindow
|
||||
#define fbPictureInit wfbPictureInit
|
||||
#define fbPixmapToRegion wfbPixmapToRegion
|
||||
#define fbPolyArc wfbPolyArc
|
||||
#define fbPolyFillRect wfbPolyFillRect
|
||||
#define fbPolyGlyphBlt wfbPolyGlyphBlt
|
||||
#define fbPolyLine wfbPolyLine
|
||||
#define fbPolyline16 wfbPolyline16
|
||||
#define fbPolyline24 wfbPolyline24
|
||||
#define fbPolyline32 wfbPolyline32
|
||||
#define fbPolyline8 wfbPolyline8
|
||||
#define fbPolyPoint wfbPolyPoint
|
||||
#define fbPolySegment wfbPolySegment
|
||||
#define fbPolySegment16 wfbPolySegment16
|
||||
#define fbPolySegment24 wfbPolySegment24
|
||||
#define fbPolySegment32 wfbPolySegment32
|
||||
#define fbPolySegment8 wfbPolySegment8
|
||||
#define fbPositionWindow wfbPositionWindow
|
||||
#define fbPushFill wfbPushFill
|
||||
#define fbPushImage wfbPushImage
|
||||
#define fbPushPattern wfbPushPattern
|
||||
#define fbPushPixels wfbPushPixels
|
||||
#define fbPutImage wfbPutImage
|
||||
#define fbPutXYImage wfbPutXYImage
|
||||
#define fbPutZImage wfbPutZImage
|
||||
#define fbQueryBestSize wfbQueryBestSize
|
||||
#define fbRasterizeEdges wfbRasterizeEdges
|
||||
#define fbRasterizeTrapezoid wfbRasterizeTrapezoid
|
||||
#define fbRealizeFont wfbRealizeFont
|
||||
#define fbReduceRasterOp wfbReduceRasterOp
|
||||
#define fbReplicatePixel wfbReplicatePixel
|
||||
#define fbResolveColor wfbResolveColor
|
||||
#define fbRestoreAreas wfbRestoreAreas
|
||||
#define fbSaveAreas wfbSaveAreas
|
||||
#define fbScreenPrivateIndex wfbScreenPrivateIndex
|
||||
#define fbSegment wfbSegment
|
||||
#define fbSelectBres wfbSelectBres
|
||||
#define fbSetSpans wfbSetSpans
|
||||
#define fbSetupScreen wfbSetupScreen
|
||||
#define fbSetVisualTypes wfbSetVisualTypes
|
||||
#define fbSetVisualTypesAndMasks wfbSetVisualTypesAndMasks
|
||||
#define _fbSetWindowPixmap _wfbSetWindowPixmap
|
||||
#define fbSolid wfbSolid
|
||||
#define fbSolid24 wfbSolid24
|
||||
#define fbSolidBoxClipped wfbSolidBoxClipped
|
||||
#define fbStipple wfbStipple
|
||||
#define fbStipple1Bits wfbStipple1Bits
|
||||
#define fbStipple24Bits wfbStipple24Bits
|
||||
#define fbStipple2Bits wfbStipple2Bits
|
||||
#define fbStipple4Bits wfbStipple4Bits
|
||||
#define fbStipple8Bits wfbStipple8Bits
|
||||
#define fbStippleTable wfbStippleTable
|
||||
#define fbTile wfbTile
|
||||
#define fbTransparentSpan wfbTransparentSpan
|
||||
#define fbUninstallColormap wfbUninstallColormap
|
||||
#define fbUnmapWindow wfbUnmapWindow
|
||||
#define fbUnrealizeFont wfbUnrealizeFont
|
||||
#define fbValidateGC wfbValidateGC
|
||||
#define fbWinPrivateIndex wfbWinPrivateIndex
|
||||
#define fbZeroLine wfbZeroLine
|
||||
#define fbZeroSegment wfbZeroSegment
|
||||
#define xxScrPrivateIndex wfbxxScrPrivateIndex
|
||||
#define xxGCPrivateIndex wfbxxGCPrivateIndex
|
||||
#define xxColormapPrivateIndex wfbxxColormapPrivateIndex
|
||||
#define xxGeneration wfbxxGeneration
|
||||
#define xxPrintVisuals wfbxxPrintVisuals
|
||||
#define xxGCFuncs wfbxxGCFuncs
|
||||
#define xxGCOps wfbxxGCOps
|
||||
#define xxSetup wfbxxSetup
|
||||
#define composeFunctions wfbComposeFunctions
|
|
@ -16,6 +16,9 @@ GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod \
|
|||
GLX_DEFS = @GL_CFLAGS@
|
||||
endif
|
||||
|
||||
# It's essential that fbcmap.c be compiled with this flag for DMX to work!!
|
||||
DMX_CFLAGS = -DXFree86Server=1
|
||||
|
||||
if BUILDDOCS
|
||||
SUBDIRS += doc
|
||||
endif
|
||||
|
@ -86,6 +89,7 @@ Xdmx_CFLAGS = \
|
|||
$(DIX_CFLAGS) \
|
||||
$(GLX_INCS) \
|
||||
$(GLX_DEFS) \
|
||||
$(DMX_CFLAGS) \
|
||||
@DMXMODULES_CFLAGS@
|
||||
|
||||
# Man page
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#endif
|
||||
|
||||
#include "dmx.h"
|
||||
#include "dmxlog.h"
|
||||
#include "dmxsync.h"
|
||||
#include "dmxcmap.h"
|
||||
#include "dmxvisual.h"
|
||||
|
@ -83,12 +84,18 @@ Bool dmxBECreateColormap(ColormapPtr pColormap)
|
|||
VisualPtr pVisual = pColormap->pVisual;
|
||||
Visual *visual = dmxLookupVisual(pScreen, pVisual);
|
||||
|
||||
pCmapPriv->cmap = XCreateColormap(dmxScreen->beDisplay,
|
||||
dmxScreen->scrnWin,
|
||||
visual,
|
||||
(pVisual->class & DynamicClass ?
|
||||
AllocAll : AllocNone));
|
||||
return (pCmapPriv->cmap != 0);
|
||||
if (visual) {
|
||||
pCmapPriv->cmap = XCreateColormap(dmxScreen->beDisplay,
|
||||
dmxScreen->scrnWin,
|
||||
visual,
|
||||
(pVisual->class & DynamicClass ?
|
||||
AllocAll : AllocNone));
|
||||
return (pCmapPriv->cmap != 0);
|
||||
}
|
||||
else {
|
||||
dmxLog(dmxWarning, "dmxBECreateColormap: No visual found\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/** Create colormap on back-end server associated with \a pColormap's
|
||||
|
|
|
@ -664,8 +664,8 @@ static Bool _dmxUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
|
|||
{
|
||||
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
|
||||
|
||||
DMXDBG3("_dmxUnrealizeCursor(%d,%p) %p\n",
|
||||
pScreen->myNum, pCursor, pCursorPriv);
|
||||
DMXDBG2("_dmxUnrealizeCursor(%d,%p)\n",
|
||||
pScreen->myNum, pCursor);
|
||||
|
||||
if (dmxScreen->beDisplay) {
|
||||
if (dmxBEFreeCursor(pScreen, pCursor))
|
||||
|
|
|
@ -2,12 +2,16 @@ if DRI
|
|||
DRI_SUBDIR = dri
|
||||
endif
|
||||
|
||||
if XF86UTILS
|
||||
XF86UTILS_SUBDIR = utils
|
||||
endif
|
||||
|
||||
DOC_SUBDIR = doc
|
||||
|
||||
SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser rac \
|
||||
ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp xf8_16bpp \
|
||||
xf8_32bpp loader scanpci dixmods exa \
|
||||
$(DRI_SUBDIR) utils $(DOC_SUBDIR)
|
||||
$(DRI_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR)
|
||||
|
||||
DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \
|
||||
parser rac ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp \
|
||||
|
|
|
@ -18,6 +18,7 @@ module_LTLIBRARIES = libafb.la \
|
|||
libcfb.la \
|
||||
libcfb32.la \
|
||||
libfb.la \
|
||||
libwfb.la \
|
||||
libmfb.la \
|
||||
libshadow.la
|
||||
|
||||
|
@ -66,6 +67,11 @@ libfb_la_LIBADD = $(top_builddir)/fb/libfb.la
|
|||
libfb_la_SOURCES = $(top_builddir)/fb/fbcmap.c fbmodule.c
|
||||
libfb_la_CFLAGS = -DXFree86Server $(AM_CFLAGS)
|
||||
|
||||
libwfb_la_LDFLAGS = -avoid-version
|
||||
libwfb_la_LIBADD = $(top_builddir)/fb/libwfb.la
|
||||
libwfb_la_SOURCES = $(top_builddir)/fb/fbcmap.c fbmodule.c
|
||||
libwfb_la_CFLAGS = -DXFree86Server $(AM_CFLAGS) -DFB_ACCESS_WRAPPER
|
||||
|
||||
libglx_la_LDFLAGS = -avoid-version
|
||||
if AIGLX
|
||||
GLXDRI_LIBRARY = $(top_builddir)/GL/glx/libglxdri.la
|
||||
|
|
|
@ -33,7 +33,11 @@
|
|||
|
||||
static XF86ModuleVersionInfo VersRec =
|
||||
{
|
||||
#ifdef FB_ACCESS_WRAPPER
|
||||
"wfb",
|
||||
#else
|
||||
"fb",
|
||||
#endif
|
||||
MODULEVENDORSTRING,
|
||||
MODINFOSTRING1,
|
||||
MODINFOSTRING2,
|
||||
|
@ -45,4 +49,4 @@ static XF86ModuleVersionInfo VersRec =
|
|||
{0,0,0,0} /* signature, to be patched into the file by a tool */
|
||||
};
|
||||
|
||||
_X_EXPORT XF86ModuleData fbModuleData = { &VersRec, NULL, NULL };
|
||||
_X_EXPORT XF86ModuleData FBPREFIX(ModuleData) = { &VersRec, NULL, NULL };
|
||||
|
|
|
@ -992,6 +992,10 @@ DRICreateDrawable(ScreenPtr pScreen, Drawable id,
|
|||
pWin = (WindowPtr)pDrawable;
|
||||
if ((pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin))) {
|
||||
pDRIDrawablePriv->refCount++;
|
||||
|
||||
if (!pDRIDrawablePriv->hwDrawable) {
|
||||
drmCreateDrawable(pDRIPriv->drmFD, &pDRIDrawablePriv->hwDrawable);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* allocate a DRI Window Private record */
|
||||
|
@ -1000,13 +1004,13 @@ DRICreateDrawable(ScreenPtr pScreen, Drawable id,
|
|||
}
|
||||
|
||||
/* Only create a drm_drawable_t once */
|
||||
if (drmCreateDrawable(pDRIPriv->drmFD, hHWDrawable)) {
|
||||
if (drmCreateDrawable(pDRIPriv->drmFD,
|
||||
&pDRIDrawablePriv->hwDrawable)) {
|
||||
xfree(pDRIDrawablePriv);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* add it to the list of DRI drawables for this screen */
|
||||
pDRIDrawablePriv->hwDrawable = *hHWDrawable;
|
||||
pDRIDrawablePriv->pScreen = pScreen;
|
||||
pDRIDrawablePriv->refCount = 1;
|
||||
pDRIDrawablePriv->drawableIndex = -1;
|
||||
|
@ -1029,6 +1033,15 @@ DRICreateDrawable(ScreenPtr pScreen, Drawable id,
|
|||
/* track this in case this window is destroyed */
|
||||
AddResource(id, DRIDrawablePrivResType, (pointer)pWin);
|
||||
}
|
||||
|
||||
if (pDRIDrawablePriv->hwDrawable) {
|
||||
drmUpdateDrawableInfo(pDRIPriv->drmFD,
|
||||
pDRIDrawablePriv->hwDrawable,
|
||||
DRM_DRAWABLE_CLIPRECTS,
|
||||
REGION_NUM_RECTS(&pWin->clipList),
|
||||
REGION_RECTS(&pWin->clipList));
|
||||
*hHWDrawable = pDRIDrawablePriv->hwDrawable;
|
||||
}
|
||||
}
|
||||
else { /* pixmap (or for GLX 1.3, a PBuffer) */
|
||||
/* NOT_DONE */
|
||||
|
@ -1813,6 +1826,11 @@ DRIClipNotify(WindowPtr pWin, int dx, int dy)
|
|||
|
||||
pDRIPriv->pSAREA->drawableTable[pDRIDrawablePriv->drawableIndex].stamp
|
||||
= DRIDrawableValidationStamp++;
|
||||
|
||||
drmUpdateDrawableInfo(pDRIPriv->drmFD, pDRIDrawablePriv->hwDrawable,
|
||||
DRM_DRAWABLE_CLIPRECTS,
|
||||
REGION_NUM_RECTS(&pWin->clipList),
|
||||
REGION_RECTS(&pWin->clipList));
|
||||
}
|
||||
|
||||
/* call lower wrapped functions */
|
||||
|
|
|
@ -85,7 +85,7 @@ static pciBusFuncs_t linuxFuncs0 = {
|
|||
/* pciAddrHostToBus */ pciAddrNOOP,
|
||||
/* linuxTransAddrBusToHost is busted on sparc64 but the PCI rework tree
|
||||
* makes it all moot, so we kludge it for now */
|
||||
#if defined(__sparc64__)
|
||||
#if defined(__sparc__)
|
||||
/* pciAddrBusToHost */ pciAddrNOOP,
|
||||
#else
|
||||
/* pciAddrBusToHost */ linuxTransAddrBusToHost,
|
||||
|
|
|
@ -1388,6 +1388,22 @@ int drmDestroyDrawable(int fd, drm_drawable_t handle)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int drmUpdateDrawableInfo(int fd, drm_drawable_t handle,
|
||||
drm_drawable_info_type_t type, unsigned int num,
|
||||
void *data)
|
||||
{
|
||||
drm_update_draw_t update;
|
||||
|
||||
update.handle = handle;
|
||||
update.type = type;
|
||||
update.num = num;
|
||||
update.data = (unsigned long long)(unsigned long)data;
|
||||
|
||||
if (ioctl(fd, DRM_IOCTL_UPDATE_DRAW, &update)) return -errno;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Acquire the AGP device.
|
||||
*
|
||||
|
|
|
@ -543,6 +543,9 @@ extern int drmSwitchToContext(int fd, drm_context_t context);
|
|||
extern int drmDestroyContext(int fd, drm_context_t handle);
|
||||
extern int drmCreateDrawable(int fd, drm_drawable_t * handle);
|
||||
extern int drmDestroyDrawable(int fd, drm_drawable_t handle);
|
||||
extern int drmUpdateDrawableInfo(int fd, drm_drawable_t handle,
|
||||
drm_drawable_info_type_t type,
|
||||
unsigned int num, void *data);
|
||||
extern int drmCtlInstHandler(int fd, int irq);
|
||||
extern int drmCtlUninstHandler(int fd);
|
||||
extern int drmInstallSIGIOHandler(int fd,
|
||||
|
|
|
@ -157,9 +157,128 @@ xf86strToUL (char *str)
|
|||
return (tot);
|
||||
}
|
||||
|
||||
/*
|
||||
* xf86getNextLine --
|
||||
*
|
||||
* read from the configFile FILE stream until we encounter a new
|
||||
* line; this is effectively just a big wrapper for fgets(3).
|
||||
*
|
||||
* xf86getToken() assumes that we will read up to the next
|
||||
* newline; we need to grow configBuf and configRBuf as needed to
|
||||
* support that.
|
||||
*/
|
||||
|
||||
static char*
|
||||
xf86getNextLine(void)
|
||||
{
|
||||
static int configBufLen = CONFIG_BUF_LEN;
|
||||
char *tmpConfigBuf, *tmpConfigRBuf;
|
||||
int c, i, pos = 0, eolFound = 0;
|
||||
char *ret = NULL;
|
||||
|
||||
/*
|
||||
* reallocate the string if it was grown last time (i.e., is no
|
||||
* longer CONFIG_BUF_LEN); we malloc the new strings first, so
|
||||
* that if either of the mallocs fail, we can fall back on the
|
||||
* existing buffer allocations
|
||||
*/
|
||||
|
||||
if (configBufLen != CONFIG_BUF_LEN) {
|
||||
|
||||
tmpConfigBuf = xf86confmalloc(CONFIG_BUF_LEN);
|
||||
tmpConfigRBuf = xf86confmalloc(CONFIG_BUF_LEN);
|
||||
|
||||
if (!tmpConfigBuf || !tmpConfigRBuf) {
|
||||
|
||||
/*
|
||||
* at least one of the mallocs failed; keep the old buffers
|
||||
* and free any partial allocations
|
||||
*/
|
||||
|
||||
xf86conffree(tmpConfigBuf);
|
||||
xf86conffree(tmpConfigRBuf);
|
||||
|
||||
} else {
|
||||
|
||||
/*
|
||||
* malloc succeeded; free the old buffers and use the new
|
||||
* buffers
|
||||
*/
|
||||
|
||||
configBufLen = CONFIG_BUF_LEN;
|
||||
|
||||
xf86conffree(configBuf);
|
||||
xf86conffree(configRBuf);
|
||||
|
||||
configBuf = tmpConfigBuf;
|
||||
configRBuf = tmpConfigRBuf;
|
||||
}
|
||||
}
|
||||
|
||||
/* read in another block of chars */
|
||||
|
||||
do {
|
||||
ret = fgets(configBuf + pos, configBufLen - pos - 1, configFile);
|
||||
|
||||
if (!ret) break;
|
||||
|
||||
/* search for EOL in the new block of chars */
|
||||
|
||||
for (i = pos; i < (configBufLen - 1); i++) {
|
||||
c = configBuf[i];
|
||||
|
||||
if (c == '\0') break;
|
||||
|
||||
if ((c == '\n') || (c == '\r')) {
|
||||
eolFound = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* if we didn't find EOL, then grow the string and
|
||||
* read in more
|
||||
*/
|
||||
|
||||
if (!eolFound) {
|
||||
|
||||
tmpConfigBuf = xf86confrealloc(configBuf, configBufLen + CONFIG_BUF_LEN);
|
||||
tmpConfigRBuf = xf86confrealloc(configRBuf, configBufLen + CONFIG_BUF_LEN);
|
||||
|
||||
if (!tmpConfigBuf || !tmpConfigRBuf) {
|
||||
|
||||
/*
|
||||
* at least one of the reallocations failed; use the
|
||||
* new allocation that succeeded, but we have to
|
||||
* fallback to the previous configBufLen size and use
|
||||
* the string we have, even though we don't have an
|
||||
* EOL
|
||||
*/
|
||||
|
||||
if (tmpConfigBuf) configBuf = tmpConfigBuf;
|
||||
if (tmpConfigRBuf) configRBuf = tmpConfigRBuf;
|
||||
|
||||
break;
|
||||
|
||||
} else {
|
||||
|
||||
/* reallocation succeeded */
|
||||
|
||||
configBuf = tmpConfigBuf;
|
||||
configRBuf = tmpConfigRBuf;
|
||||
pos = i;
|
||||
configBufLen += CONFIG_BUF_LEN;
|
||||
}
|
||||
}
|
||||
|
||||
} while (!eolFound);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* xf86getToken --
|
||||
* Read next Token form the config file. Handle the global variable
|
||||
* Read next Token from the config file. Handle the global variable
|
||||
* pushToken.
|
||||
*/
|
||||
int
|
||||
|
@ -193,7 +312,7 @@ again:
|
|||
{
|
||||
char *ret;
|
||||
if (configFile)
|
||||
ret = fgets (configBuf, CONFIG_BUF_LEN - 1, configFile);
|
||||
ret = xf86getNextLine();
|
||||
else {
|
||||
if (builtinConfig[builtinIndex] == NULL)
|
||||
ret = NULL;
|
||||
|
|
|
@ -11,11 +11,9 @@
|
|||
# specified for a device (see the syntax description below).
|
||||
#
|
||||
# Don't make gratuitous changes, and please send back
|
||||
# changes/additions that aren't XFree86-specific to the pciids
|
||||
# changes/additions that aren't X-specific to the pciids
|
||||
# project (http://pciids.sf.net/).
|
||||
#
|
||||
# $XdotOrg: xserver/xorg/hw/xfree86/scanpci/extrapci.ids,v 1.6 2005/09/19 18:54:05 alanc Exp $
|
||||
# $XFree86: xc/programs/Xserver/hw/xfree86/etc/extrapci.ids,v 1.11 2003/12/18 16:22:27 dawes Exp $
|
||||
#
|
||||
|
||||
# Vendors, devices and subsystems. Please keep sorted.
|
||||
|
@ -39,10 +37,7 @@
|
|||
|
||||
# Some NVIDIA cards that are not in the master pci.ids file yet.
|
||||
10de "
|
||||
0046 NV40 [GeForce 6800 GT]
|
||||
0048 GeForce 6800 XT
|
||||
0147 GeForce 6700 XL
|
||||
0160 GeForce 6500
|
||||
0163 GeForce 6200 LE
|
||||
0169 GeForce 6250
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -135,8 +135,7 @@ if ($infofile) {
|
|||
# Print out header information.
|
||||
|
||||
$proj = "XdotOrg";
|
||||
print "/* \$$proj\$ */
|
||||
|
||||
print "
|
||||
/*
|
||||
* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT
|
||||
*
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,19 +1,19 @@
|
|||
#!/bin/sh
|
||||
#####################################################################
|
||||
### File: 0018.xprint
|
||||
### File: 92xprint-xpserverlist
|
||||
###
|
||||
### Default Location: /usr/dt/config/Xsession.d/
|
||||
### Default Location: /etc/X11/Xsession.d/
|
||||
###
|
||||
### Purpose: Setup Xprint env vars
|
||||
###
|
||||
### Description: This script is invoked by means of the Xsession file
|
||||
### at user login.
|
||||
###
|
||||
### Invoked by: /usr/dt/bin/Xsession
|
||||
### Invoked by: /etc/X11/Xsession
|
||||
###
|
||||
### (c) Copyright 2003-2004 Roland Mainz <roland.mainz@nrubsig.org>
|
||||
###
|
||||
### please send bugfixes or comments to http://xprint.mozdev.org/
|
||||
### please send bugfixes or comments to https://bugs.freedesktop.org
|
||||
###
|
||||
#####################################################################
|
||||
|
|
@ -1 +1,2 @@
|
|||
EXTRA_DIST = cde_xsessiond_xprint.sh
|
||||
xpcdir = $(sysconfdir)/X11/Xsession.d
|
||||
dist_xpc_DATA = 92xprint-xpserverlist
|
||||
|
|
|
@ -269,7 +269,7 @@ char tmpname[PATH_MAX];
|
|||
#ifndef WIN32
|
||||
if (haveDir)
|
||||
fclose(in);
|
||||
else if ((rval=pclose(in))!=0) {
|
||||
else if ((rval=Pclose(in))!=0) {
|
||||
if (xkbDebugFlags)
|
||||
ErrorF("xkbcomp returned exit code %d\n",rval);
|
||||
}
|
||||
|
|
|
@ -754,12 +754,12 @@ unsigned char grp;
|
|||
|
||||
|
||||
grp= state->locked_group;
|
||||
if (grp>=ctrls->num_groups || grp < 0)
|
||||
state->locked_group= XkbAdjustGroup(grp,ctrls);
|
||||
if (grp>=ctrls->num_groups)
|
||||
state->locked_group= XkbAdjustGroup(XkbCharToInt(grp),ctrls);
|
||||
|
||||
grp= state->locked_group+state->base_group+state->latched_group;
|
||||
if (grp>=ctrls->num_groups || grp < 0)
|
||||
state->group= XkbAdjustGroup(grp,ctrls);
|
||||
if (grp>=ctrls->num_groups)
|
||||
state->group= XkbAdjustGroup(XkbCharToInt(grp),ctrls);
|
||||
else state->group= grp;
|
||||
XkbComputeCompatState(xkbi);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user