|
@@ -213,7 +213,7 @@ end_frame(FrameMode mode, Thread *current_thread) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
void TinyXGraphicsWindow::
|
|
void TinyXGraphicsWindow::
|
|
|
begin_flip() {
|
|
begin_flip() {
|
|
|
- if (_bytes_per_pixel == 4) {
|
|
|
|
|
|
|
+ if (_bytes_per_pixel == 4 && _pitch == _frame_buffer->linesize) {
|
|
|
// If we match the expected bpp, we don't need an intervening copy
|
|
// If we match the expected bpp, we don't need an intervening copy
|
|
|
// operation. Just point the XImage directly at the framebuffer
|
|
// operation. Just point the XImage directly at the framebuffer
|
|
|
// data.
|
|
// data.
|
|
@@ -227,6 +227,25 @@ begin_flip() {
|
|
|
XFlush(_display);
|
|
XFlush(_display);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
|
|
+// Function: TinyXGraphicsWindow::supports_pixel_zoom
|
|
|
|
|
+// Access: Published, Virtual
|
|
|
|
|
+// Description: Returns true if a call to set_pixel_zoom() will be
|
|
|
|
|
+// respected, false if it will be ignored. If this
|
|
|
|
|
+// returns false, then get_pixel_factor() will always
|
|
|
|
|
+// return 1.0, regardless of what value you specify for
|
|
|
|
|
+// set_pixel_zoom().
|
|
|
|
|
+//
|
|
|
|
|
+// This may return false if the underlying renderer
|
|
|
|
|
+// doesn't support pixel zooming, or if you have called
|
|
|
|
|
+// this on a DisplayRegion that doesn't have both
|
|
|
|
|
+// set_clear_color() and set_clear_depth() enabled.
|
|
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
|
|
+bool TinyXGraphicsWindow::
|
|
|
|
|
+supports_pixel_zoom() const {
|
|
|
|
|
+ return true;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: TinyXGraphicsWindow::process_events
|
|
// Function: TinyXGraphicsWindow::process_events
|
|
|
// Access: Public, Virtual
|
|
// Access: Public, Virtual
|