diff --git a/xlib/Color.cpp b/xlib/Color.cpp index d8c6467..3b7fa45 100644 --- a/xlib/Color.cpp +++ b/xlib/Color.cpp @@ -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); diff --git a/xlib/Color.h b/xlib/Color.h index aa24f3f..823af06 100644 --- a/xlib/Color.h +++ b/xlib/Color.h @@ -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); diff --git a/xlib/Drawables.cpp b/xlib/Drawables.cpp index e9e3214..263716a 100644 --- a/xlib/Drawables.cpp +++ b/xlib/Drawables.cpp @@ -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; diff --git a/xlib/Drawing.cpp b/xlib/Drawing.cpp index 85caf35..5f24b5c 100644 --- a/xlib/Drawing.cpp +++ b/xlib/Drawing.cpp @@ -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(); diff --git a/xlib/Image.cpp b/xlib/Image.cpp index 82d756d..502c3a0 100644 --- a/xlib/Image.cpp +++ b/xlib/Image.cpp @@ -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");