Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions | Variables
nsX11AlphaBlend.cpp File Reference
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "gfx-config.h"
#include "nsCRT.h"
#include "nspr.h"
#include "nsAntiAliasedGlyph.h"
#include "nsX11AlphaBlend.h"
#include <stdio.h>

Go to the source code of this file.

Defines

#define ENABLE_X11ALPHA_BLEND_PRINTF   1
#define NS_X11_ALPHA_BLEND_DEBUG   0x01
#define DEBUG_PRINTF_MACRO(x, type)
#define X11ALPHA_BLEND_PRINTF(x)   DEBUG_PRINTF_MACRO(x, NS_X11_ALPHA_BLEND_DEBUG)
#define nsBlendPixel555   dummy_BlendPixel
#define nsBlendPixel555_br   dummy_BlendPixel
#define nsBlendPixel565   dummy_BlendPixel
#define nsBlendPixel565_br   dummy_BlendPixel
#define nsBlendPixel888_lsb   dummy_BlendPixel
#define nsBlendPixel888_msb   dummy_BlendPixel
#define nsBlendPixel0888   dummy_BlendPixel
#define nsBlendPixel0888_br   dummy_BlendPixel

Functions

static void dummy_BlendPixel (XImage *, int x, int y, nscolor color, int a)
static void nsBlendMonoImage555 (XImage *, nsAntiAliasedGlyph *, PRUint8 *, nscolor, int, int)
static void nsBlendMonoImage555_br (XImage *, nsAntiAliasedGlyph *, PRUint8 *, nscolor, int, int)
static void nsBlendMonoImage565 (XImage *, nsAntiAliasedGlyph *, PRUint8 *, nscolor, int, int)
static void nsBlendMonoImage565_br (XImage *, nsAntiAliasedGlyph *, PRUint8 *, nscolor, int, int)
static void nsBlendMonoImage888_lsb (XImage *, nsAntiAliasedGlyph *, PRUint8 *, nscolor, int, int)
static void nsBlendMonoImage888_msb (XImage *, nsAntiAliasedGlyph *, PRUint8 *, nscolor, int, int)
static void nsBlendMonoImage0888 (XImage *, nsAntiAliasedGlyph *, PRUint8 *, nscolor, int, int)
static void nsBlendMonoImage0888_br (XImage *, nsAntiAliasedGlyph *, PRUint8 *, nscolor, int, int)
static nscolor nsPixelToNscolor555 (unsigned long aPixel)
static nscolor nsPixelToNscolor565 (unsigned long aPixel)
static nscolor nsPixelToNscolor888_lsb (unsigned long aPixel)
static nscolor nsPixelToNscolor888_msb (unsigned long aPixel)
static void dummy_BlendMonoImage (XImage *, nsAntiAliasedGlyph *, PRUint8 *, nscolor, int, int)
static nscolor dummy_PixelToNSColor (unsigned long)
void nsX11AlphaBlendFreeGlobals ()
nsresult nsX11AlphaBlendInitGlobals (Display *aDisplay)

Variables

static PRUint32 gX11AlphaBlendDebug

Define Documentation

Value:
PR_BEGIN_MACRO \
              if (gX11AlphaBlendDebug & (type)) { \
                printf x ; \
                printf(", %s %d\n", __FILE__, __LINE__); \
              } \
            PR_END_MACRO

Definition at line 58 of file nsX11AlphaBlend.cpp.

Definition at line 51 of file nsX11AlphaBlend.cpp.

Definition at line 56 of file nsX11AlphaBlend.cpp.

Definition at line 94 of file nsX11AlphaBlend.cpp.

Definition at line 95 of file nsX11AlphaBlend.cpp.

Definition at line 88 of file nsX11AlphaBlend.cpp.

Definition at line 89 of file nsX11AlphaBlend.cpp.

Definition at line 90 of file nsX11AlphaBlend.cpp.

Definition at line 91 of file nsX11AlphaBlend.cpp.

Definition at line 92 of file nsX11AlphaBlend.cpp.

Definition at line 93 of file nsX11AlphaBlend.cpp.

Definition at line 74 of file nsX11AlphaBlend.cpp.


Function Documentation

static void dummy_BlendMonoImage ( XImage *  ,
nsAntiAliasedGlyph ,
PRUint8 ,
nscolor  ,
int  ,
int   
) [static]

Definition at line 368 of file nsX11AlphaBlend.cpp.

{
}

Here is the caller graph for this function:

static void dummy_BlendPixel ( XImage *  ,
int  x,
int  y,
nscolor  color,
int  a 
) [static]

Definition at line 363 of file nsX11AlphaBlend.cpp.

{
}

Here is the caller graph for this function:

static nscolor dummy_PixelToNSColor ( unsigned long  color) [static]

Definition at line 374 of file nsX11AlphaBlend.cpp.

{
  return 0;
}

Here is the caller graph for this function:

static void nsBlendMonoImage0888 ( XImage *  ximage,
nsAntiAliasedGlyph glyph,
PRUint8 aWeightTable,
nscolor  color,
int  xOff,
int  yOff 
) [static]

Definition at line 477 of file nsX11AlphaBlend.cpp.

{
  PRUint32 src_a, dst_a;

  int xfer_width  = MIN((int)glyph->GetWidth(),  ximage->width-xOff);
  int xfer_height = MIN((int)glyph->GetHeight(), ximage->height-yOff);
  NS_ASSERTION(xfer_width==(int)glyph->GetWidth(), "image not wide enough");
  NS_ASSERTION(xfer_height==(int)glyph->GetHeight(), "image not tall enough");
  PRUint16 r = NS_GET_R(color);
  PRUint16 g = NS_GET_G(color);
  PRUint16 b = NS_GET_B(color);

  NS_ASSERTION(((ximage->data-(char*)0)&3)==0,"possible alignment error");
  NS_ASSERTION((ximage->bytes_per_line&3)==0,"possible alignment error");
  PRUint8 *glyph_p = glyph->GetBuffer();
  PRUint8 *imageLineStart = (PRUint8 *)ximage->data
                             + 4*xOff + (yOff * ximage->bytes_per_line);

  for (int row=0; row<xfer_height; row++) {
    PRUint32 *image_p = (PRUint32 *)imageLineStart;
    for (int j=0; j<xfer_width; j++,image_p++,glyph_p++) {
      src_a = *glyph_p;
      if (src_a == 0)
        continue;
      src_a = aWeightTable[src_a]; // weight the image
      PRUint32 dst_pixel = *image_p;
      PRUint32 hibits = dst_pixel & 0xFF000000;
      if (src_a == 255) {
        *image_p = hibits | (r << 16) | (g << 8) + b;
        continue;
      }
      dst_a = 255 - src_a;

      PRUint32 red   = ((r*src_a) + (((dst_pixel>>16)&0xFF) * dst_a)) >> 8;
      PRUint32 green = ((g*src_a) + (((dst_pixel>>8) &0xFF) * dst_a)) >> 8;
      PRUint32 blue  = ((b*src_a) + (( dst_pixel     &0xFF) * dst_a)) >> 8;
      *image_p = hibits | (red << 16) | (green << 8) | blue;
    }
    glyph_p += -xfer_width + glyph->GetBufferWidth();
    imageLineStart += ximage->bytes_per_line;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void nsBlendMonoImage0888_br ( XImage *  ximage,
nsAntiAliasedGlyph glyph,
PRUint8 aWeightTable,
nscolor  color,
int  xOff,
int  yOff 
) [static]

Definition at line 525 of file nsX11AlphaBlend.cpp.

{
  PRUint32 src_a, dst_a;

  int xfer_width  = MIN((int)glyph->GetWidth(),  ximage->width-xOff);
  int xfer_height = MIN((int)glyph->GetHeight(), ximage->height-yOff);
  NS_ASSERTION(xfer_width==(int)glyph->GetWidth(), "image not wide enough");
  NS_ASSERTION(xfer_height==(int)glyph->GetHeight(), "image not tall enough");
  PRUint16 r = NS_GET_R(color);
  PRUint16 g = NS_GET_G(color);
  PRUint16 b = NS_GET_B(color);

  PRUint8 *glyph_p = glyph->GetBuffer();
  PRUint8 *imageLineStart = (PRUint8 *)ximage->data
                             + 4*xOff + (yOff * ximage->bytes_per_line);

  for (int row=0; row<xfer_height; row++) {
    PRUint32 *image_p = (PRUint32 *)imageLineStart;
    for (int j=0; j<xfer_width; j++,image_p++,glyph_p++) {
      src_a = *glyph_p;
      if (src_a == 0)
        continue;
      src_a = aWeightTable[src_a]; // weight the image
      PRUint32 dst_pixel = *image_p;
      PRUint32 lowbits = dst_pixel & 0x000000FF;
      if (src_a == 255) {
        *image_p = (b << 24) | (g << 16) + (r << 8) | lowbits;
        continue;
      }
      dst_a = 255 - src_a;

      PRUint32 red   = ((r*src_a) + (((dst_pixel>> 8) &0xFF) * dst_a)) >> 8;
      PRUint32 green = ((g*src_a) + (((dst_pixel>>16) &0xFF) * dst_a)) >> 8;
      PRUint32 blue  = ((b*src_a) + (((dst_pixel>>24) &0xFF) * dst_a)) >> 8;
      *image_p = (blue << 24) | (green << 16) + (red << 8) | lowbits;
    }
    glyph_p += -xfer_width + glyph->GetBufferWidth();
    imageLineStart += ximage->bytes_per_line;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void nsBlendMonoImage555 ( XImage *  ximage,
nsAntiAliasedGlyph glyph,
PRUint8 aWeightTable,
nscolor  color,
int  xOff,
int  yOff 
) [static]

Definition at line 571 of file nsX11AlphaBlend.cpp.

{
  PRUint16 src_a, dst_a;

  int xfer_width  = MIN((int)glyph->GetWidth(),  ximage->width-xOff);
  int xfer_height = MIN((int)glyph->GetHeight(), ximage->height-yOff);
  NS_ASSERTION(xfer_width==(int)glyph->GetWidth(), "image not wide enough");
  NS_ASSERTION(xfer_height==(int)glyph->GetHeight(), "image not tall enough");
  PRUint16 r = NS_GET_R(color);
  PRUint16 g = NS_GET_G(color);
  PRUint16 b = NS_GET_B(color);

  PRUint8 *glyph_p = glyph->GetBuffer();
  PRUint8 *imageLineStart = (PRUint8 *)ximage->data
                             + 2*xOff + (yOff * ximage->bytes_per_line);

  for (int row=0; row<xfer_height; row++) {
    PRUint16 *image_p = (PRUint16 *)imageLineStart;
    for (int j=0; j<xfer_width; j++,image_p++,glyph_p++) {
      src_a = *glyph_p;
      if (src_a == 0)
        continue;
      src_a = aWeightTable[src_a]; // weight the image

      if (src_a == 255) {
        *image_p = ((r&0xF8)<<7) | ((g&0xF8)<<2) | ((b) >> 3);
                   // the long version
                   //(((r>>3)&0x1F)<<10) | (((g>>3)&0x1F)<<5) | (((b>>3)&0x1F));
        continue;
      }
      dst_a = 255 - src_a;

      PRUint16 dst_pixel = *image_p;
      PRUint16 red   = ((r*src_a) + (((dst_pixel>>7)&0xF8) * dst_a)) >> 8;
      PRUint16 green = ((g*src_a) + (((dst_pixel>>2)&0xF8) * dst_a)) >> 8;
      PRUint16 blue  = ((b*src_a) + (((dst_pixel<<3)&0xF8) * dst_a)) >> 8;
      *image_p = ((red&0xF8)<<7) | ((green&0xF8)<<2) | ((blue) >> 3);
    }
    glyph_p += -xfer_width + glyph->GetBufferWidth();
    imageLineStart += ximage->bytes_per_line;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void nsBlendMonoImage555_br ( XImage *  ximage,
nsAntiAliasedGlyph glyph,
PRUint8 aWeightTable,
nscolor  color,
int  xOff,
int  yOff 
) [static]

Definition at line 619 of file nsX11AlphaBlend.cpp.

{
  PRUint16 src_a, dst_a;

  int xfer_width  = MIN((int)glyph->GetWidth(),  ximage->width-xOff);
  int xfer_height = MIN((int)glyph->GetHeight(), ximage->height-yOff);
  NS_ASSERTION(xfer_width==(int)glyph->GetWidth(), "image not wide enough");
  NS_ASSERTION(xfer_height==(int)glyph->GetHeight(), "image not tall enough");
  PRUint16 r = NS_GET_R(color);
  PRUint16 g = NS_GET_G(color);
  PRUint16 b = NS_GET_B(color);

  PRUint8 *glyph_p = glyph->GetBuffer();
  PRUint8 *imageLineStart = (PRUint8 *)ximage->data
                             + 2*xOff + (yOff * ximage->bytes_per_line);

  for (int row=0; row<xfer_height; row++) {
    PRUint16 *image_p = (PRUint16 *)imageLineStart;
    for (int j=0; j<xfer_width; j++,image_p++,glyph_p++) {
      src_a = *glyph_p;
      if (src_a == 0)
        continue;
      src_a = aWeightTable[src_a]; // weight the image

      if (src_a == 255) {
        *image_p =  ((r&0xF8)   >> 1) |
                    ((g&0xC0)>> 6) | ((g&0x38)<<10) |
                    ((b&0xF8)<< 5);
        continue;
      }
      dst_a = 255 - src_a;

      PRUint16 dst_pixel = *image_p;
      // unreversed: --:R7:R6:R5:R4:R3:G7:G6  G5:G4:G3:B7:B6:B5:B4:B3
      //   reversed: G5:G4:G3:B7:B6:B5:B4:B3  --:R7:R6:R5:R4:R3:G7:G6
      PRUint16 pixel_r =  (dst_pixel>>1) & 0xF8;
      PRUint16 pixel_g = ((dst_pixel<<6) & 0xC0) | ((dst_pixel>>10) & 0x38);
      PRUint16 pixel_b =  (dst_pixel>>5) & 0xF8;

      PRUint16 red   = ((r*src_a) + (pixel_r * dst_a)) >> 8;
      PRUint16 green = ((g*src_a) + (pixel_g * dst_a)) >> 8;
      PRUint16 blue  = ((b*src_a) + (pixel_b * dst_a)) >> 8;
      *image_p = ((red  &0xF8)>> 1) |
                 ((green&0xC0)>> 6) | ((green&0x38)<<10) |
                 ((blue &0xF8)<< 5);
    }
    glyph_p += -xfer_width + glyph->GetBufferWidth();
    imageLineStart += ximage->bytes_per_line;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void nsBlendMonoImage565 ( XImage *  ximage,
nsAntiAliasedGlyph glyph,
PRUint8 aWeightTable,
nscolor  color,
int  xOff,
int  yOff 
) [static]

Definition at line 675 of file nsX11AlphaBlend.cpp.

{
  PRUint16 src_a, dst_a;

  int xfer_width  = MIN((int)glyph->GetWidth(),  ximage->width-xOff);
  int xfer_height = MIN((int)glyph->GetHeight(), ximage->height-yOff);
  NS_ASSERTION(xfer_width==(int)glyph->GetWidth(), "image not wide enough");
  NS_ASSERTION(xfer_height==(int)glyph->GetHeight(), "image not tall enough");
  PRUint16 r = NS_GET_R(color);
  PRUint16 g = NS_GET_G(color);
  PRUint16 b = NS_GET_B(color);

  PRUint8 *glyph_p = glyph->GetBuffer();
  PRUint8 *imageLineStart = (PRUint8 *)ximage->data
                             + 2*xOff + (yOff * ximage->bytes_per_line);

  for (int row=0; row<xfer_height; row++) {
    PRUint16 *image_p = (PRUint16 *)imageLineStart;
    for (int j=0; j<xfer_width; j++,image_p++,glyph_p++) {
      src_a = *glyph_p;
      if (src_a == 0)
        continue;
      src_a = aWeightTable[src_a]; // weight the image

      if (src_a == 255) {
        *image_p = ((r&0xF8)<<8) | ((g&0xFC)<<3) | ((b) >> 3);
        continue;
      }
      dst_a = 255 - src_a;

      PRUint32 dst_pixel = *image_p;
      PRUint16 red   = ((r*src_a) + (((dst_pixel>>8)&0xF8) * dst_a)) >> 8;
      PRUint16 green = ((g*src_a) + (((dst_pixel>>3)&0xFC) * dst_a)) >> 8;
      PRUint16 blue  = ((b*src_a) + (((dst_pixel<<3)&0xF8) * dst_a)) >> 8;
      *image_p = ((red&0xF8)<<8) | ((green&0xFC)<<3) | ((blue) >> 3);
    }
    glyph_p += -xfer_width + glyph->GetBufferWidth();
    imageLineStart += ximage->bytes_per_line;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void nsBlendMonoImage565_br ( XImage *  ximage,
nsAntiAliasedGlyph glyph,
PRUint8 aWeightTable,
nscolor  color,
int  xOff,
int  yOff 
) [static]

Definition at line 721 of file nsX11AlphaBlend.cpp.

{
  PRUint16 src_a, dst_a;

  int xfer_width  = MIN((int)glyph->GetWidth(),  ximage->width-xOff);
  int xfer_height = MIN((int)glyph->GetHeight(), ximage->height-yOff);
  NS_ASSERTION(xfer_width==(int)glyph->GetWidth(), "image not wide enough");
  NS_ASSERTION(xfer_height==(int)glyph->GetHeight(), "image not tall enough");
  PRUint16 r = NS_GET_R(color);
  PRUint16 g = NS_GET_G(color);
  PRUint16 b = NS_GET_B(color);

  PRUint8 *glyph_p = glyph->GetBuffer();
  PRUint8 *imageLineStart = (PRUint8 *)ximage->data
                             + 2*xOff + (yOff * ximage->bytes_per_line);

  for (int row=0; row<xfer_height; row++) {
    PRUint16 *image_p = (PRUint16 *)imageLineStart;
    for (int j=0; j<xfer_width; j++,image_p++,glyph_p++) {
      src_a = *glyph_p;
      if (src_a == 0)
        continue;
      src_a = aWeightTable[src_a]; // weight the image
      if (src_a == 255) {
        *image_p =   (r&0xF8) |
                    ((g&0xE0)>> 5) | ((g&0x1C)<<11) |
                    ((b&0xF8)<< 5);
        continue;
      }
      dst_a = 255 - src_a;

      PRUint16 dst_pixel = *image_p;
      // unreversed: R7:R6:R5:R4:R3:G7:G6:G5  G4:G3:G2:B7:B6:B5:B4:B3
      //   reversed: G4:G3:G2:B7:B6:B5:B4:B3  R7:R6:R5:R4:R3:G7:G6:G5
      PRUint16 pixel_r =  (dst_pixel)    & 0xF8;
      PRUint16 pixel_g = ((dst_pixel<<5) & 0xE0) | ((dst_pixel>>11) & 0x1C);
      PRUint16 pixel_b =  (dst_pixel>>5) & 0xF8;

      PRUint16 red   = ((r*src_a) + (pixel_r * dst_a)) >> 8;
      PRUint16 green = ((g*src_a) + (pixel_g * dst_a)) >> 8;
      PRUint16 blue  = ((b*src_a) + (pixel_b * dst_a)) >> 8;
      *image_p =  (red  &0xF8) |
                 ((green&0xE0)>> 5) | ((green&0x1C)<<11) |
                 ((blue &0xF8)<< 5);
    }
    glyph_p += -xfer_width + glyph->GetBufferWidth();
    imageLineStart += ximage->bytes_per_line;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void nsBlendMonoImage888_lsb ( XImage *  ximage,
nsAntiAliasedGlyph glyph,
PRUint8 aWeightTable,
nscolor  color,
int  xOff,
int  yOff 
) [static]

Definition at line 776 of file nsX11AlphaBlend.cpp.

{
  PRUint32 src_a, dst_a;

  int xfer_width  = MIN((int)glyph->GetWidth(),  ximage->width-xOff);
  int xfer_height = MIN((int)glyph->GetHeight(), ximage->height-yOff);
  NS_ASSERTION(xfer_width==(int)glyph->GetWidth(), "image not wide enough");
  NS_ASSERTION(xfer_height==(int)glyph->GetHeight(), "image not tall enough");
  PRUint16 r = NS_GET_R(color);
  PRUint16 g = NS_GET_G(color);
  PRUint16 b = NS_GET_B(color);

  PRUint8 *glyph_p = glyph->GetBuffer();
  PRUint8 *imageLineStart = (PRUint8 *)ximage->data
                             + 3*xOff + (yOff * ximage->bytes_per_line);

  for (int row=0; row<xfer_height; row++) {
    PRUint8 *image_p = (PRUint8 *)imageLineStart;
    for (int j=0; j<xfer_width; j++,image_p+=3,glyph_p++) {
      src_a = *glyph_p;
      if (src_a == 0)
        continue;
      src_a = aWeightTable[src_a]; // weight the image

      if (src_a == 255) {
        image_p[2] = r;
        image_p[1] = g;
        image_p[0] = b;
        continue;
      }
      dst_a = 255 - src_a;
      image_p[2] = ((r*src_a) + (image_p[2]*dst_a)) >> 8;
      image_p[1] = ((g*src_a) + (image_p[1]*dst_a)) >> 8;
      image_p[0] = ((b*src_a) + (image_p[0]*dst_a)) >> 8;
    }
    glyph_p += -xfer_width + glyph->GetBufferWidth();
    imageLineStart += ximage->bytes_per_line;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void nsBlendMonoImage888_msb ( XImage *  ximage,
nsAntiAliasedGlyph glyph,
PRUint8 aWeightTable,
nscolor  color,
int  xOff,
int  yOff 
) [static]

Definition at line 821 of file nsX11AlphaBlend.cpp.

{
  PRUint32 src_a, dst_a;

  int xfer_width  = MIN((int)glyph->GetWidth(),  ximage->width-xOff);
  int xfer_height = MIN((int)glyph->GetHeight(), ximage->height-yOff);
  NS_ASSERTION(xfer_width==(int)glyph->GetWidth(), "image not wide enough");
  NS_ASSERTION(xfer_height==(int)glyph->GetHeight(), "image not tall enough");
  PRUint16 r = NS_GET_R(color);
  PRUint16 g = NS_GET_G(color);
  PRUint16 b = NS_GET_B(color);

  PRUint8 *glyph_p = glyph->GetBuffer();
  PRUint8 *imageLineStart = (PRUint8 *)ximage->data
                             + 3*xOff + (yOff * ximage->bytes_per_line);

  for (int row=0; row<xfer_height; row++) {
    PRUint8 *image_p = (PRUint8 *)imageLineStart;
    for (int j=0; j<xfer_width; j++,image_p+=3,glyph_p++) {
      src_a = *glyph_p;
      if (src_a == 0)
        continue;
      src_a = aWeightTable[src_a]; // weight the image

      if (src_a == 255) {
        image_p[0] = r;
        image_p[1] = g;
        image_p[2] = b;
        continue;
      }
      dst_a = 255 - src_a;

      image_p[0] = ((r*src_a) + (image_p[2]*dst_a)) >> 8;
      image_p[1] = ((g*src_a) + (image_p[1]*dst_a)) >> 8;
      image_p[2] = ((b*src_a) + (image_p[0]*dst_a)) >> 8;
    }
    glyph_p += -xfer_width + glyph->GetBufferWidth();
    imageLineStart += ximage->bytes_per_line;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

nscolor nsPixelToNscolor555 ( unsigned long  aPixel) [static]

Definition at line 1131 of file nsX11AlphaBlend.cpp.

{
  int r = (aPixel>>7)&0xF8;
  int g = (aPixel>>2)&0xF8;
  int b = (aPixel<<3)&0xF8;
  nscolor color = NS_RGB(r,g,b);
  return color;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nscolor nsPixelToNscolor565 ( unsigned long  aPixel) [static]

Definition at line 1141 of file nsX11AlphaBlend.cpp.

{
  int r = (aPixel>>8)&0xF8;
  int g = (aPixel>>3)&0xFC;
  int b = (aPixel<<3)&0xF8;
  nscolor color = NS_RGB(r,g,b);
  return color;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nscolor nsPixelToNscolor888_lsb ( unsigned long  aPixel) [static]

Definition at line 1151 of file nsX11AlphaBlend.cpp.

{
  int r = (aPixel>>16)&0xFF;
  int g = (aPixel>> 8)&0xFF;
  int b = (aPixel    )&0xFF;
  nscolor color = NS_RGB(r,g,b);
  return color;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nscolor nsPixelToNscolor888_msb ( unsigned long  aPixel) [static]

Definition at line 1161 of file nsX11AlphaBlend.cpp.

{
  int r = (aPixel    )&0xFF;
  int g = (aPixel>> 8)&0xFF;
  int b = (aPixel>>16)&0xFF;
  nscolor color = NS_RGB(r,g,b);
  return color;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 152 of file nsX11AlphaBlend.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 164 of file nsX11AlphaBlend.cpp.

{
  X11ALPHA_BLEND_PRINTF(("initialize X11AlphaBlend"));

  nsresult rv = nsX11AlphaBlend::InitGlobals(aDisplay);

  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 54 of file nsX11AlphaBlend.cpp.