| Index: Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp
|
| ===================================================================
|
| --- Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp (revision 94600)
|
| +++ Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp (working copy)
|
| @@ -51,6 +51,7 @@
|
| #include "WebViewImpl.h"
|
|
|
| #include <stdio.h>
|
| +#include <wtf/Assertions.h>
|
| #include <wtf/FastMalloc.h>
|
| #include <wtf/text/CString.h>
|
|
|
| @@ -122,10 +123,8 @@
|
| return false;
|
|
|
| Chrome* chrome = static_cast<Chrome*>(hostWindow);
|
| - m_webViewImpl = static_cast<WebKit::WebViewImpl*>(chrome->client()->webView());
|
| + m_webViewImpl = chrome ? static_cast<WebKit::WebViewImpl*>(chrome->client()->webView()) : 0;
|
|
|
| - if (!m_webViewImpl)
|
| - return false;
|
| if (!webContext->initialize(webAttributes, m_webViewImpl, renderDirectlyToHostWindow))
|
| return false;
|
| m_impl = webContext.release();
|
| @@ -150,6 +149,7 @@
|
|
|
| Platform3DObject GraphicsContext3DInternal::platformTexture() const
|
| {
|
| + ASSERT(m_webViewImpl);
|
| m_impl->setParentContext(m_webViewImpl->graphicsContext3D());
|
| return m_impl->getPlatformTextureId();
|
| }
|
| @@ -303,6 +303,7 @@
|
| bool GraphicsContext3DInternal::paintsIntoCanvasBuffer() const
|
| {
|
| // If the gpu compositor is on then skip the readback and software rendering path.
|
| + ASSERT(m_webViewImpl);
|
| return !m_webViewImpl->isAcceleratedCompositingActive();
|
| }
|
|
|
|
|