Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Unified Diff: Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp

Issue 7839014: Merge http://trac.webkit.org/changeset/93131 : GraphicsContext3D should allow its hostWindow to b... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: '' Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698