Skip to content

Commit

Permalink
- don't reject non-default DirectColor visuals, seems ok on modern X11
Browse files Browse the repository at this point in the history
  • Loading branch information
dk committed Jul 5, 2011
1 parent 238f1e2 commit d3293a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
7 changes: 2 additions & 5 deletions pod/Prima/X11.pod
Original file line number Diff line number Diff line change
Expand Up @@ -412,17 +412,14 @@ display modes. This visual class is the best in terms of visual quality.
Same as I<TrueColor>, but additionally each pixel value can be reprogrammed.
Not all hardware support this visual, and usually by default it is not set.
Prima supports this mode in exactly same way as I<TrueColor> without additional
features. During testing, it appeared that non-default I<DirectColor> visuals
require explicit assignment of each pixel used, which is inappropriate for
color-rich images, and therefore Prima refuses to work on a non-default
I<DirectColor> visual.
features.

=back

=head1 Images

As described in the previous section, X does not standardize pixel memory
format for I<TrueColor> and C<DirectColor> visuals, so there is a chance that
format for I<TrueColor> and I<DirectColor> visuals, so there is a chance that
Prima wouldn't work on some bizarre hardware. Currently, Prima knows how to
compose pixels of 15, 16, 24, and 32 bit depth, of contiguous ( not
interspersed ) red-green-blue memory layout. Any other pixel memory layout
Expand Down
6 changes: 0 additions & 6 deletions unix/color.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,12 +589,6 @@ class;
return false;
}

if ( id >= 0 && guts. visualClass == DirectColor) {
warn("warning: non-default DirectColor visuals are not supported.\n");
id = -1;
goto FALLBACK_TO_DEFAULT_VISUAL;
}

guts. useDithering = true;
guts. dynamicColors = false;
guts. grayScale = false;
Expand Down

0 comments on commit d3293a0

Please sign in to comment.