OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 webAttributes.depth = attrs.depth; | 107 webAttributes.depth = attrs.depth; |
108 webAttributes.stencil = attrs.stencil; | 108 webAttributes.stencil = attrs.stencil; |
109 webAttributes.antialias = attrs.antialias; | 109 webAttributes.antialias = attrs.antialias; |
110 webAttributes.premultipliedAlpha = attrs.premultipliedAlpha; | 110 webAttributes.premultipliedAlpha = attrs.premultipliedAlpha; |
111 webAttributes.canRecoverFromContextLoss = attrs.canRecoverFromContextLoss; | 111 webAttributes.canRecoverFromContextLoss = attrs.canRecoverFromContextLoss; |
112 WebKit::WebGraphicsContext3D* webContext = WebKit::webKitClient()->createGra
phicsContext3D(); | 112 WebKit::WebGraphicsContext3D* webContext = WebKit::webKitClient()->createGra
phicsContext3D(); |
113 if (!webContext) | 113 if (!webContext) |
114 return false; | 114 return false; |
115 | 115 |
116 Chrome* chrome = static_cast<Chrome*>(hostWindow); | 116 Chrome* chrome = static_cast<Chrome*>(hostWindow); |
117 WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClien
tImpl*>(chrome->client()); | 117 m_webViewImpl = static_cast<WebKit::WebViewImpl*>(chrome->client()->webView(
)); |
118 | |
119 m_webViewImpl = chromeClientImpl->webView(); | |
120 | 118 |
121 if (!m_webViewImpl) | 119 if (!m_webViewImpl) |
122 return false; | 120 return false; |
123 if (!webContext->initialize(webAttributes, m_webViewImpl, renderDirectlyToHo
stWindow)) { | 121 if (!webContext->initialize(webAttributes, m_webViewImpl, renderDirectlyToHo
stWindow)) { |
124 delete webContext; | 122 delete webContext; |
125 return false; | 123 return false; |
126 } | 124 } |
127 m_impl.set(webContext); | 125 m_impl.set(webContext); |
128 | 126 |
129 #if USE(ACCELERATED_COMPOSITING) | 127 #if USE(ACCELERATED_COMPOSITING) |
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 } | 1177 } |
1180 | 1178 |
1181 bool GraphicsContext3D::isGLES2Compliant() const | 1179 bool GraphicsContext3D::isGLES2Compliant() const |
1182 { | 1180 { |
1183 return m_internal->isGLES2Compliant(); | 1181 return m_internal->isGLES2Compliant(); |
1184 } | 1182 } |
1185 | 1183 |
1186 } // namespace WebCore | 1184 } // namespace WebCore |
1187 | 1185 |
1188 #endif // ENABLE(WEBGL) | 1186 #endif // ENABLE(WEBGL) |
OLD | NEW |