Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/x11/standalone/glxbackend.cpp
Show First 20 Lines • Show All 567 Lines • ▼ Show 20 Line(s) | 558 | { | |||
---|---|---|---|---|---|
568 | info->texture_targets = 0; | 568 | info->texture_targets = 0; | ||
569 | info->y_inverted = 0; | 569 | info->y_inverted = 0; | ||
570 | info->mipmap = 0; | 570 | info->mipmap = 0; | ||
571 | 571 | | |||
572 | const xcb_render_pictformat_t format = XRenderUtils::findPictFormat(visual); | 572 | const xcb_render_pictformat_t format = XRenderUtils::findPictFormat(visual); | ||
573 | const xcb_render_directformat_t *direct = XRenderUtils::findPictFormatInfo(format); | 573 | const xcb_render_directformat_t *direct = XRenderUtils::findPictFormatInfo(format); | ||
574 | 574 | | |||
575 | if (!direct) { | 575 | if (!direct) { | ||
576 | qCCritical(KWIN_X11STANDALONE).nospace() << "Could not find a picture format for visual 0x" << hex << visual; | 576 | qCCritical(KWIN_X11STANDALONE).nospace() << "Could not find a picture format for visual 0x" << Qt::hex << visual; | ||
577 | return info; | 577 | return info; | ||
578 | } | 578 | } | ||
579 | 579 | | |||
580 | const int red_bits = bitCount(direct->red_mask); | 580 | const int red_bits = bitCount(direct->red_mask); | ||
581 | const int green_bits = bitCount(direct->green_mask); | 581 | const int green_bits = bitCount(direct->green_mask); | ||
582 | const int blue_bits = bitCount(direct->blue_mask); | 582 | const int blue_bits = bitCount(direct->blue_mask); | ||
583 | const int alpha_bits = bitCount(direct->alpha_mask); | 583 | const int alpha_bits = bitCount(direct->alpha_mask); | ||
584 | 584 | | |||
Show All 17 Lines | 589 | const int attribs[] = { | |||
602 | GLX_DEPTH_SIZE, 0, | 602 | GLX_DEPTH_SIZE, 0, | ||
603 | 0 | 603 | 0 | ||
604 | }; | 604 | }; | ||
605 | 605 | | |||
606 | int count = 0; | 606 | int count = 0; | ||
607 | GLXFBConfig *configs = glXChooseFBConfig(display(), DefaultScreen(display()), attribs, &count); | 607 | GLXFBConfig *configs = glXChooseFBConfig(display(), DefaultScreen(display()), attribs, &count); | ||
608 | 608 | | |||
609 | if (count < 1) { | 609 | if (count < 1) { | ||
610 | qCCritical(KWIN_X11STANDALONE).nospace() << "Could not find a framebuffer configuration for visual 0x" << hex << visual; | 610 | qCCritical(KWIN_X11STANDALONE).nospace() << "Could not find a framebuffer configuration for visual 0x" << Qt::hex << visual; | ||
611 | return info; | 611 | return info; | ||
612 | } | 612 | } | ||
613 | 613 | | |||
614 | struct FBConfig { | 614 | struct FBConfig { | ||
615 | GLXFBConfig config; | 615 | GLXFBConfig config; | ||
616 | int depth; | 616 | int depth; | ||
617 | int stencil; | 617 | int stencil; | ||
618 | int format; | 618 | int format; | ||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | |||||
684 | 684 | | |||
685 | if (info->fbconfig) { | 685 | if (info->fbconfig) { | ||
686 | int fbc_id = 0; | 686 | int fbc_id = 0; | ||
687 | int visual_id = 0; | 687 | int visual_id = 0; | ||
688 | 688 | | |||
689 | glXGetFBConfigAttrib(display(), info->fbconfig, GLX_FBCONFIG_ID, &fbc_id); | 689 | glXGetFBConfigAttrib(display(), info->fbconfig, GLX_FBCONFIG_ID, &fbc_id); | ||
690 | glXGetFBConfigAttrib(display(), info->fbconfig, GLX_VISUAL_ID, &visual_id); | 690 | glXGetFBConfigAttrib(display(), info->fbconfig, GLX_VISUAL_ID, &visual_id); | ||
691 | 691 | | |||
692 | qCDebug(KWIN_X11STANDALONE).nospace() << "Using FBConfig 0x" << hex << fbc_id << " for visual 0x" << hex << visual_id; | 692 | qCDebug(KWIN_X11STANDALONE).nospace() << "Using FBConfig 0x" << Qt::hex << fbc_id << " for visual 0x" << Qt::hex << visual_id; | ||
693 | } | 693 | } | ||
694 | 694 | | |||
695 | return info; | 695 | return info; | ||
696 | } | 696 | } | ||
697 | 697 | | |||
698 | void GlxBackend::setSwapInterval(int interval) | 698 | void GlxBackend::setSwapInterval(int interval) | ||
699 | { | 699 | { | ||
700 | if (m_haveEXTSwapControl) | 700 | if (m_haveEXTSwapControl) | ||
▲ Show 20 Lines • Show All 272 Lines • Show Last 20 Lines |