[Webkit-unassigned] [Bug 97275] New: Duplicate code in GraphicsContext3D::validateAttributes() and GraphicsContext3D::validateDepthStencil()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 20 17:35:07 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=97275

           Summary: Duplicate code in
                    GraphicsContext3D::validateAttributes() and
                    GraphicsContext3D::validateDepthStencil()
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebGL
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: psolanki at apple.com
                CC: dino at apple.com


Both GraphicsContext3D::validateAttributes() and GraphicsContext3D::validateDepthStencil() have this code

    if (m_attrs.antialias) {
        bool isValidVendor = true;
        // Currently in Mac we only turn on antialias if vendor is NVIDIA,
        // or if ATI and on 10.7.2 and above.
        const char* vendor = reinterpret_cast<const char*>(::glGetString(GL_VENDOR));
        if (!vendor || (!std::strstr(vendor, "NVIDIA") && !(std::strstr(vendor, "ATI") && systemAllowsMultisamplingOnATICards())))
            isValidVendor = false;
        if (!isValidVendor || !extensions->supports("GL_ANGLE_framebuffer_multisample") || isGLES2Compliant())
            m_attrs.antialias = false;
        else
            extensions->ensureEnabled("GL_ANGLE_framebuffer_multisample");
    }

And validateAttributes() calls validateDepthStencil() so we are calling this twice? Can the code be shared? Or does on copy need to be deleted?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list