Home
last modified time | relevance | path

Searched refs:surface (Results 1 – 10 of 10) sorted by relevance

/bootable/recovery/minui/
Dresources.cpp196 auto surface = GRSurface::Create(width, height, width * 4, 4); in res_create_display_surface() local
197 if (!surface) { in res_create_display_surface()
209 TransformRgbToDraw(p_row.data(), surface->data() + y * surface->row_bytes, in res_create_display_surface()
213 *pSurface = surface.release(); in res_create_display_surface()
247 GRSurface** surface = nullptr; in res_create_multi_display_surface() local
260 surface = static_cast<GRSurface**>(calloc(*frames, sizeof(GRSurface*))); in res_create_multi_display_surface()
261 if (!surface) { in res_create_multi_display_surface()
271 surface[i] = created_surface.release(); in res_create_multi_display_surface()
282 uint8_t* out_row = surface[frame]->data() + (y / *frames) * surface[frame]->row_bytes; in res_create_multi_display_surface()
286 *pSurface = surface; in res_create_multi_display_surface()
[all …]
Dgraphics.cpp124 static uint32_t* PixelAt(GRSurface* surface, int x, int y, int row_pixels) { in PixelAt() argument
127 return reinterpret_cast<uint32_t*>(surface->data()) + y * row_pixels + x; in PixelAt()
129 return reinterpret_cast<uint32_t*>(surface->data()) + x * row_pixels + (surface->width - y); in PixelAt()
131 return reinterpret_cast<uint32_t*>(surface->data()) + (surface->height - 1 - y) * row_pixels + in PixelAt()
132 (surface->width - 1 - x); in PixelAt()
134 return reinterpret_cast<uint32_t*>(surface->data()) + (surface->height - 1 - x) * row_pixels + in PixelAt()
303 unsigned int gr_get_width(const GRSurface* surface) { in gr_get_width() argument
304 if (surface == nullptr) { in gr_get_width()
307 return surface->width; in gr_get_width()
310 unsigned int gr_get_height(const GRSurface* surface) { in gr_get_height() argument
[all …]
Dgraphics_drm.cpp110 auto surface = std::unique_ptr<GRSurfaceDrm>(new GRSurfaceDrm( in Create() local
115 handles[0] = surface->handle; in Create()
118 if (drmModeAddFB2(drm_fd, width, height, format, handles, pitches, offsets, &surface->fb_id, 0) != in Create()
131 auto mmapped = mmap(nullptr, surface->height * surface->row_bytes, PROT_READ | PROT_WRITE, in Create()
137 surface->mmapped_buffer_ = static_cast<uint8_t*>(mmapped); in Create()
138 return surface; in Create()
153 const std::unique_ptr<GRSurfaceDrm>& surface) { in DrmEnableCrtc() argument
154 if (drmModeSetCrtc(drm_fd, crtc->crtc_id, surface->fb_id, 0, 0, // x,y in DrmEnableCrtc()
Dgraphics_drm.h65 bool DrmEnableCrtc(int drm_fd, drmModeCrtc* crtc, const std::unique_ptr<GRSurfaceDrm>& surface);
/bootable/recovery/tests/unit/
Dminui_test.cpp28 auto surface = GRSurface::Create(9, 11, 9, 1); in TEST() local
29 ASSERT_TRUE(surface); in TEST()
30 ASSERT_EQ(0, reinterpret_cast<uintptr_t>(surface->data()) % GRSurface::kSurfaceDataAlignment); in TEST()
32 ASSERT_EQ(0, surface->data_size() % GRSurface::kSurfaceDataAlignment); in TEST()
33 ASSERT_GE(surface->data_size(), 11 * 9); in TEST()
/bootable/recovery/recovery_ui/
Dvr_ui.cpp37 void VrRecoveryUI::DrawSurface(const GRSurface* surface, int sx, int sy, int w, int h, int dx, in DrawSurface() argument
39 gr_blit(surface, sx, sy, w, h, dx + stereo_offset_, dy); in DrawSurface()
40 gr_blit(surface, sx, sy, w, h, dx - stereo_offset_ + ScreenWidth(), dy); in DrawSurface()
43 void VrRecoveryUI::DrawTextIcon(int x, int y, const GRSurface* surface) const { in DrawTextIcon()
44 gr_texticon(x + stereo_offset_, y, surface); in DrawTextIcon()
45 gr_texticon(x - stereo_offset_ + ScreenWidth(), y, surface); in DrawTextIcon()
Dscreen_ui.cpp279 const GRSurface* surface) { in ValidateGraphicSurface() argument
280 if (!surface) { in ValidateGraphicSurface()
285 if (surface->pixel_bytes != 1 || surface->width != surface->row_bytes) { in ValidateGraphicSurface()
287 surface->pixel_bytes, surface->width, surface->row_bytes); in ValidateGraphicSurface()
291 if (surface->width > max_width || surface->height > max_height - y) { in ValidateGraphicSurface()
295 surface->width, surface->height, max_width, max_height, y); in ValidateGraphicSurface()
608 void ScreenRecoveryUI::DrawSurface(const GRSurface* surface, int sx, int sy, int w, int h, int dx, in DrawSurface() argument
610 gr_blit(surface, sx, sy, w, h, dx, dy); in DrawSurface()
626 void ScreenRecoveryUI::DrawTextIcon(int x, int y, const GRSurface* surface) const { in DrawTextIcon()
627 gr_texticon(x, y, surface); in DrawTextIcon()
[all …]
/bootable/recovery/recovery_ui/include/recovery_ui/
Dvr_ui.h36 void DrawSurface(const GRSurface* surface, int sx, int sy, int w, int h, int dx,
41 void DrawTextIcon(int x, int y, const GRSurface* surface) const override;
Dscreen_ui.h63 virtual void DrawSurface(const GRSurface* surface, int sx, int sy, int w, int h, int dx,
70 virtual void DrawTextIcon(int x, int y, const GRSurface* surface) const = 0;
184 const GRSurface* surface);
327 void DrawSurface(const GRSurface* surface, int sx, int sy, int w, int h, int dx,
330 void DrawTextIcon(int x, int y, const GRSurface* surface) const override;
/bootable/recovery/minui/include/minui/
Dminui.h138 unsigned int gr_get_width(const GRSurface* surface);
139 unsigned int gr_get_height(const GRSurface* surface);
216 void res_free_surface(GRSurface* surface);