Lines Matching refs:p

67 static inline BOOL IsBoundX(DrawiCommon * p, int x)  in IsBoundX()  argument
69 return (x >= p->clip.o.x) && (x < p->clip.t.x); in IsBoundX()
71 static inline BOOL IsBoundY(DrawiCommon * p, int y) in IsBoundY() argument
73 return (y >= p->clip.o.y) && (y < p->clip.t.y); in IsBoundY()
76 static BOOL NormalizeRegion(Region * p) in NormalizeRegion() argument
79 if (p->pos.x >= pc->clip.t.x) in NormalizeRegion()
83 if (p->pos.x - pc->clip.o.x < 0) in NormalizeRegion()
84 p->wid.x += p->pos.x - pc->clip.o.x, p->pos.x = pc->clip.o.x; in NormalizeRegion()
85 if (p->wid.x <= 0) in NormalizeRegion()
87 else if (p->wid.x > pc->clip.t.x - p->pos.x) in NormalizeRegion()
88 p->wid.x = pc->clip.t.x - p->pos.x; in NormalizeRegion()
90 if (p->pos.y >= pc->clip.t.y) in NormalizeRegion()
94 if (p->pos.y - pc->clip.o.y < 0) in NormalizeRegion()
95 p->wid.y += p->pos.y - pc->clip.o.y, p->pos.y = pc->clip.o.y; in NormalizeRegion()
96 if (p->wid.y <= 0) in NormalizeRegion()
98 else if (p->wid.y > pc->clip.t.y - p->pos.y) in NormalizeRegion()
99 p->wid.y = pc->clip.t.y - p->pos.y; in NormalizeRegion()
106 DrawiCommon *const p = &drawi_common; in OnVBlank() local
107 if ((p->draw_flag & DEMO_DRAW_FLIPPING) != 0) in OnVBlank()
118 p->draw_flag &= ~DEMO_DRAW_FLIPPING; in OnVBlank()
119 p->draw_flag |= DEMO_DRAW_ENABLE; in OnVBlank()
120 OS_WakeupThread(p->flip_wait_q); in OnVBlank()
128 DrawiCommon *const p = &drawi_common; in InitDraw() local
130 if (!p->draw_flag) in InitDraw()
132 p->draw_flag |= DEMO_DRAW_INIT; in InitDraw()
139 OS_InitThreadQueue(p->flip_wait_q); in InitDraw()
147 p->draw_flag |= DEMO_DRAW_ENABLE; in InitDraw()
148 p->clip.o.x = 0; in InitDraw()
149 p->clip.o.y = 0; in InitDraw()
150 p->clip.t.x = GX_LCD_SIZE_X; in InitDraw()
151 p->clip.t.y = GX_LCD_SIZE_Y; in InitDraw()
157 p->next_surface = (RGB555 *) tmp_surface; in InitDraw()
170 DrawiCommon *const p = &drawi_common; in DrawBegin() local
172 while (!(p->draw_flag & DEMO_DRAW_ENABLE)) in DrawBegin()
173 OS_SleepThread(p->flip_wait_q); in DrawBegin()
179 DrawiCommon *const p = &drawi_common; in DrawEnd() local
186 p->draw_flag &= ~DEMO_DRAW_ENABLE; in DrawEnd()
187 p->draw_flag |= DEMO_DRAW_FLIPPING; in DrawEnd()
193 DrawiCommon *const p = &drawi_common; in ClipWindow() local
196 p_bak->o.x = p->clip.o.x; in ClipWindow()
197 p_bak->o.y = p->clip.o.y; in ClipWindow()
198 p_bak->t.x = p->clip.t.x; in ClipWindow()
199 p_bak->t.y = p->clip.t.y; in ClipWindow()
209 p->clip.o.x = ox; in ClipWindow()
210 p->clip.o.y = oy; in ClipWindow()
211 p->clip.t.x = tx; in ClipWindow()
212 p->clip.t.y = ty; in ClipWindow()
217 DrawiCommon *const p = &drawi_common; in RestoreClipWindow() local
220 p->clip.o.x = p_bak->o.x; in RestoreClipWindow()
221 p->clip.o.y = p_bak->o.y; in RestoreClipWindow()
222 p->clip.t.x = p_bak->t.x; in RestoreClipWindow()
223 p->clip.t.y = p_bak->t.y; in RestoreClipWindow()
229 DrawiCommon *const p = &drawi_common; in ClearFrame() local
230 MI_CpuFillFast(p->next_surface, in ClearFrame()
241 RGB555 *p = GetSurface(r.pos.x, r.pos.y); in FillRect() local
244 MI_CpuFill16(p, col, r.wid.x * sizeof(RGB555)); in FillRect()
245 p += GX_LCD_SIZE_X; in FillRect()
257 RGB555 *p = GetSurface(r.pos.x, r.pos.y); in BlitRect() local
260 MI_CpuCopy16(src, p, r.wid.x * sizeof(RGB555)); in BlitRect()
262 p += GX_LCD_SIZE_X; in BlitRect()
274 RGB555 *p = GetSurface(r.pos.x, r.pos.y); in TransRect() local
281 if (p[i] != trans) in TransRect()
282 p[i] = src[i]; in TransRect()
285 p += GX_LCD_SIZE_X; in TransRect()
294 RGB555 *p; in DrawLine() local
319 p = GetSurface(sx, sy); in DrawLine()
322 *p = col; in DrawLine()
323 p += GX_LCD_SIZE_X; in DrawLine()
337 p = GetSurface(sx, sy); in DrawLine()
338 MI_CpuFill16(p, col, wx * sizeof(RGB555)); in DrawLine()
352 p = GetSurface(sx, sy); in DrawLine()
359 moved = TRUE, dx = 0, ++sx, p += 1; in DrawLine()
361 moved = TRUE, dy = 0, sy += y_delta, p += y_ofs; in DrawLine()
363 *p = col; in DrawLine()
404 RGB555 *p = GetSurface(x, y); in DrawTextLen() local
426 p += GX_LCD_SIZE_X * 8; in DrawTextLen()
449 RGB555 *dst = p + px; in DrawTextLen()