NS_IMETHODIMP nsRenderingContextPh :: SelectOffScreenDrawingSurface(nsDrawingSurface aSurface) { PR_LOG(PhGfxLog, PR_LOG_DEBUG, ("nsRenderingContextPh::SelectOffScreenDrawingSurface this=<%p> sSurface=<%p>\n", this, aSurface));  if (nsnull==aSurface) { PR_LOG(PhGfxLog, PR_LOG_DEBUG, ("nsRenderingContextPh::SelectOffScreenDrawingSurface  selecting offscreen (private)\n")); mSurface = mOffscreenSurface; } else { PR_LOG(PhGfxLog, PR_LOG_DEBUG, ("nsRenderingContextPh::SelectOffScreenDrawingSurface  selecting passed-in (%p)\n", aSurface)); mSurface = (nsDrawingSurfacePh *) aSurface; }   mSurface->Select();   #if 1 PgSetClipping( 0, NULL ); PgSetMultiClip( 0, NULL ); PgSetFillColor(FillColorVal[cur_color]);  cur_color++; cur_color &= 0x7; #endif  mBufferIsEmpty = PR_TRUE;  return NS_OK; }
NS_IMETHODIMP SelectOffScreenDrawingSurface(nsDrawingSurface aSurface) { mSurface = ( nsnull==aSurface ) ? mOffscreenSurface : (nsDrawingSurfacePh *) aSurface; mSurfaceDC = mSurface->Select( ); return NS_OK; }
NS_IMETHODIMP nsRenderingContextPh :: SelectOffScreenDrawingSurface(nsDrawingSurface aSurface){  PR_LOG(PhGfxLog, PR_LOG_DEBUG, ("nsRenderingContextPh::SelectOffScreenDrawingSurface this=<%p> sSurface=<%p>\n", this, aSurface));  if (nsnull==aSurface)  {    PR_LOG(PhGfxLog, PR_LOG_DEBUG, ("nsRenderingContextPh::SelectOffScreenDrawingSurface  selecting offscreen (private)\n"));    mSurface = mOffscreenSurface;  }  else  {    PR_LOG(PhGfxLog, PR_LOG_DEBUG, ("nsRenderingContextPh::SelectOffScreenDrawingSurface  selecting passed-in (%p)\n", aSurface));    mSurface = (nsDrawingSurfacePh *) aSurface;  }//  printf ("kedl2: select pixmap %p\n", ((nsDrawingSurfacePh *)mSurface)->mPixmap);  mSurface->Select();// to clear the buffer to black to clean up transient rips during redraw....#if 1  PgSetClipping( 0, NULL );  PgSetMultiClip( 0, NULL );  PgSetFillColor(FillColorVal[cur_color]);  //PgDrawIRect( 0, 0, 1024,768, Pg_DRAW_FILL_STROKE );   cur_color++;  cur_color &= 0x7;#endif  mBufferIsEmpty = PR_TRUE;  return NS_OK;}