📄 specialcase32.c
字号:
//
// Windows CE Software Graphics Library
// specialcase32.c
//
// Copyright (c) 2000 Microsoft Corporation. All rights reserved.
//
// This file contains the implementations of the special case blitting routines
// that target 32Bpp surfaces. This routines may also be used for 24Bpp
// targets as well, as 24Bpp formats generally contain 8 "dead" bits to insure
// that all pixels are 32-bit aligned.
//
// Currently, this file contains:
//
// SrcCopy0132
// SrcCopy0432
// SrcCopy0832
// SrcCopy3232
// SolidFill32
// SrcAnd0132
// SrcAnd0832
// SrcAnd1632
// SrcInvert0132
// SrcInvert0832
// SrcInvert3232
// SrcPaint0132
// SrcPaint0832
// SrcPaint3232
// Text32 (!TODO!)
// AlphaText32 (!TODO!)
// ClearTypeText32 (!TODO! Add?)
#include "pch.h"
#include "swg.h"
// Use the various templates to generate the blitting routines.
#define FUNCTION SrcCopy3232
#define BLOCK_OP(pD, pS, ByteCount) (memcpy((pD), (pS), (ByteCount)))
#include ".\templates\SD3232.h"
#undef FUNCTION
#undef BLOCK_OP
#define FUNCTION SrcAnd3232
#define DWORD_OP(D, S) ((D) & (S))
#include ".\templates\SD3232.h"
#undef FUNCTION
#undef DWORD_OP
#define FUNCTION SrcPaint3232
#define DWORD_OP(D, S) ((D) | (S))
#include ".\templates\SD3232.h"
#undef FUNCTION
#undef DWORD_OP
#define FUNCTION SrcInvert3232
#define DWORD_OP(D, S) ((D) ^ (S))
#include ".\templates\SD3232.h"
#undef FUNCTION
#undef DWORD_OP
// Use the SD 1Bpp -> 32Bpp template.
#define FUNCTION SrcCopy0132
#define DWORD_OP(D, S) (S)
#include ".\templates\SD0132.h"
#undef FUNCTION
#undef DWORD_OP
#define FUNCTION SrcAnd0132
#define DWORD_OP(D, S) ((D) & (S))
#include ".\templates\SD0132.h"
#undef FUNCTION
#undef DWORD_OP
#define FUNCTION SrcPaint0132
#define DWORD_OP(D, S) ((D) | (S))
#include ".\templates\SD0132.h"
#undef FUNCTION
#undef DWORD_OP
#define FUNCTION SrcInvert0132
#define DWORD_OP(D, S) ((D) ^ (S))
#include ".\templates\SD0132.h"
#undef FUNCTION
#undef DWORD_OP
// Use the SD 8Bpp -> 32Bpp template.
#define FUNCTION SrcCopy0832
#define DWORD_OP(D, S) (S)
#include ".\templates\SD0832.h"
#undef FUNCTION
#undef DWORD_OP
#define FUNCTION SrcAnd0832
#define DWORD_OP(D, S) ((D) & (S))
#include ".\templates\SD0832.h"
#undef FUNCTION
#undef DWORD_OP
#define FUNCTION SrcPaint0832
#define DWORD_OP(D, S) ((D) | (S))
#include ".\templates\SD0832.h"
#undef FUNCTION
#undef DWORD_OP
#define FUNCTION SrcInvert0832
#define DWORD_OP(D, S) ((D) ^ (S))
#include ".\templates\SD0832.h"
#undef FUNCTION
#undef DWORD_OP
// Yet another template: SD 4Bpp -> 32Bpp.
#define FUNCTION SrcCopy0432
#define DWORD_OP(D, S) (S)
#include ".\templates\SD0432.h"
#undef FUNCTION
#undef DWORD_OP
// Likewise, the special case 32Bpp PD blit template for PATFILL.
#define FUNCTION SolidFill32
#define BLOCK_OP(pD, P, ByteCount) (memset((pD), (P), (ByteCount)))
#include ".\templates\PDC32.h"
#undef FUNCTION
#undef BLOCK_OP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -