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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 #include "public/platform/Platform.h" | 63 #include "public/platform/Platform.h" |
64 | 64 |
65 namespace blink { | 65 namespace blink { |
66 | 66 |
67 PassOwnPtrWillBeRawPtr<CanvasRenderingContext> WebGLRenderingContext::Factory::c
reate(HTMLCanvasElement* canvas, const CanvasContextCreationAttributes& attrs, D
ocument&) | 67 PassOwnPtrWillBeRawPtr<CanvasRenderingContext> WebGLRenderingContext::Factory::c
reate(HTMLCanvasElement* canvas, const CanvasContextCreationAttributes& attrs, D
ocument&) |
68 { | 68 { |
69 WebGLContextAttributes attributes = toWebGLContextAttributes(attrs); | 69 WebGLContextAttributes attributes = toWebGLContextAttributes(attrs); |
70 OwnPtr<WebGraphicsContext3D> context(createWebGraphicsContext3D(canvas, attr
ibutes, 1)); | 70 OwnPtr<WebGraphicsContext3D> context(createWebGraphicsContext3D(canvas, attr
ibutes, 1)); |
71 if (!context) | 71 if (!context) |
72 return nullptr; | 72 return nullptr; |
73 OwnPtr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(context.g
et()); | 73 OwnPtr<Extensions3DUtil> extensionsUtil = Extensions3DUtil::create(context.g
et(), context->getGLES2Interface()); |
74 if (!extensionsUtil) | 74 if (!extensionsUtil) |
75 return nullptr; | 75 return nullptr; |
76 if (extensionsUtil->supportsExtension("GL_EXT_debug_marker")) { | 76 if (extensionsUtil->supportsExtension("GL_EXT_debug_marker")) { |
77 String contextLabel(String::format("WebGLRenderingContext-%p", context.g
et())); | 77 String contextLabel(String::format("WebGLRenderingContext-%p", context.g
et())); |
78 context->pushGroupMarkerEXT(contextLabel.ascii().data()); | 78 context->pushGroupMarkerEXT(contextLabel.ascii().data()); |
79 } | 79 } |
80 | 80 |
81 OwnPtrWillBeRawPtr<WebGLRenderingContext> renderingContext = adoptPtrWillBeN
oop(new WebGLRenderingContext(canvas, context.release(), attributes)); | 81 OwnPtrWillBeRawPtr<WebGLRenderingContext> renderingContext = adoptPtrWillBeN
oop(new WebGLRenderingContext(canvas, context.release(), attributes)); |
82 | 82 |
83 if (!renderingContext->drawingBuffer()) { | 83 if (!renderingContext->drawingBuffer()) { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 visitor->trace(m_webglCompressedTextureASTC); | 166 visitor->trace(m_webglCompressedTextureASTC); |
167 visitor->trace(m_webglCompressedTextureATC); | 167 visitor->trace(m_webglCompressedTextureATC); |
168 visitor->trace(m_webglCompressedTextureETC1); | 168 visitor->trace(m_webglCompressedTextureETC1); |
169 visitor->trace(m_webglCompressedTexturePVRTC); | 169 visitor->trace(m_webglCompressedTexturePVRTC); |
170 visitor->trace(m_webglCompressedTextureS3TC); | 170 visitor->trace(m_webglCompressedTextureS3TC); |
171 visitor->trace(m_webglDepthTexture); | 171 visitor->trace(m_webglDepthTexture); |
172 WebGLRenderingContextBase::trace(visitor); | 172 WebGLRenderingContextBase::trace(visitor); |
173 } | 173 } |
174 | 174 |
175 } // namespace blink | 175 } // namespace blink |
OLD | NEW |