Skip to content

Commit

Permalink
Name _x_color_space somewhat more appropriately.
Browse files Browse the repository at this point in the history
  • Loading branch information
waddlesplash committed Mar 21, 2022
1 parent 957f90f commit 8b70705
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion xlib/Color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern "C" {
static XID sDummy;

color_space
_x_color_space(Visual* v, int bits_per_pixel)
_x_color_space_for(Visual* v, int bits_per_pixel)
{
// We assume everything is little-endian at present.
static_assert(B_RGBA32 == B_RGBA32_LITTLE);
Expand Down
2 changes: 1 addition & 1 deletion xlib/Color.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ _x_pixel_to_rgb(unsigned long color, bool alpha = false)
return rgb;
}

color_space _x_color_space(Visual* v, int bits_per_pixel);
color_space _x_color_space_for(Visual* v, int bits_per_pixel);
2 changes: 1 addition & 1 deletion xlib/Drawables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ XPixmap::resize(BSize newSize)
delete _offscreen;
}

_offscreen = new BBitmap(Frame(), _x_color_space(NULL, _depth), true);
_offscreen = new BBitmap(Frame(), _x_color_space_for(NULL, _depth), true);
memset(_offscreen->Bits(), 0, _offscreen->BitsLength());
_offscreen->AddChild(this);
return true;
Expand Down
2 changes: 1 addition & 1 deletion xlib/Drawing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ XPutImage(Display *display, Drawable d, GC gc, XImage* image,

// TODO: Optimization: Import only the bits we are about to draw!
drawable->scratch_bitmap->ImportBits(image->data, image->height * image->bytes_per_line,
image->bytes_per_line, image->xoffset, _x_color_space(NULL, image->bits_per_pixel));
image->bytes_per_line, image->xoffset, _x_color_space_for(NULL, image->bits_per_pixel));

BView* view = drawable->view();
view->LockLooper();
Expand Down
2 changes: 1 addition & 1 deletion xlib/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ BBitmap*
_bbitmap_for_ximage(XImage *image, uint32 flags)
{
BBitmap* bitmap = new BBitmap(brect_from_xrect(make_xrect(0, 0, image->width, image->height)),
flags, _x_color_space(NULL, image->bits_per_pixel), image->bytes_per_line);
flags, _x_color_space_for(NULL, image->bits_per_pixel), image->bytes_per_line);
if (!bitmap || bitmap->InitCheck() != B_OK) {
fprintf(stderr, "libX11: Failed to create bitmap for XImage!\n");
debugger("X");
Expand Down

0 comments on commit 8b70705

Please sign in to comment.