OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
595 return nullptr; | 595 return nullptr; |
596 } | 596 } |
597 | 597 |
598 blink::WebGraphicsContext3D::Attributes wgc3dAttributes = toWebGraphicsConte xt3DAttributes(attributes, document.topDocument().url().string(), settings, webG LVersion); | 598 blink::WebGraphicsContext3D::Attributes wgc3dAttributes = toWebGraphicsConte xt3DAttributes(attributes, document.topDocument().url().string(), settings, webG LVersion); |
599 blink::WebGLInfo glInfo; | 599 blink::WebGLInfo glInfo; |
600 OwnPtr<blink::WebGraphicsContext3D> context = adoptPtr(blink::Platform::curr ent()->createOffscreenGraphicsContext3D(wgc3dAttributes, 0, &glInfo)); | 600 OwnPtr<blink::WebGraphicsContext3D> context = adoptPtr(blink::Platform::curr ent()->createOffscreenGraphicsContext3D(wgc3dAttributes, 0, &glInfo)); |
601 if (!context || shouldFailContextCreationForTesting) { | 601 if (!context || shouldFailContextCreationForTesting) { |
602 shouldFailContextCreationForTesting = false; | 602 shouldFailContextCreationForTesting = false; |
603 String statusMessage; | 603 String statusMessage; |
604 if (!glInfo.contextInfoCollectionFailure.isEmpty()) { | 604 if (!glInfo.contextInfoCollectionFailure.isEmpty()) { |
605 statusMessage.append("Could not create a WebGL context."); | 605 statusMessage.append("Could not create a WebGL context. "); |
606 statusMessage.append(glInfo.contextInfoCollectionFailure); | 606 statusMessage.append(glInfo.contextInfoCollectionFailure); |
607 statusMessage.append("VendorId = " + String::number(glInfo.vendorId) ); | |
608 statusMessage.append(", DriverId = " + String::number(glInfo.deviceI d)); | |
Ken Russell (switch to Gerrit)
2015/02/13 17:32:58
DeviceId, not DriverId
sivag
2015/02/16 15:00:18
Done.
| |
607 } else { | 609 } else { |
608 statusMessage.append("Could not create a WebGL context"); | 610 statusMessage.append("Could not create a WebGL context"); |
609 if (!glInfo.vendorInfo.isEmpty()) { | 611 if (!glInfo.vendorInfo.isEmpty()) { |
610 statusMessage.append(" VendorInfo = "); | 612 statusMessage.append(", VendorInfo = "); |
611 statusMessage.append(glInfo.vendorInfo); | 613 statusMessage.append(glInfo.vendorInfo); |
612 } else { | 614 } else { |
613 statusMessage.append(" VendorInfo = Not Available"); | 615 statusMessage.append(", VendorInfo = Not Available"); |
614 } | 616 } |
615 if (!glInfo.rendererInfo.isEmpty()) { | 617 if (!glInfo.rendererInfo.isEmpty()) { |
616 statusMessage.append(", RendererInfo = "); | 618 statusMessage.append(", RendererInfo = "); |
617 statusMessage.append(glInfo.rendererInfo); | 619 statusMessage.append(glInfo.rendererInfo); |
618 } else { | 620 } else { |
619 statusMessage.append(", RendererInfo = Not Available"); | 621 statusMessage.append(", RendererInfo = Not Available"); |
620 } | 622 } |
621 if (!glInfo.driverVersion.isEmpty()) { | 623 if (!glInfo.driverVersion.isEmpty()) { |
622 statusMessage.append(", DriverInfo = "); | 624 statusMessage.append(", DriverInfo = "); |
623 statusMessage.append(glInfo.driverVersion); | 625 statusMessage.append(glInfo.driverVersion); |
(...skipping 5413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6037 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB uffer() : 0; | 6039 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB uffer() : 0; |
6038 } | 6040 } |
6039 #else | 6041 #else |
6040 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 6042 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
6041 { | 6043 { |
6042 return m_drawingBuffer.get(); | 6044 return m_drawingBuffer.get(); |
6043 } | 6045 } |
6044 #endif | 6046 #endif |
6045 | 6047 |
6046 } // namespace blink | 6048 } // namespace blink |
OLD | NEW |