| Index: webkit/gpu/webgraphicscontext3d_in_process_impl.cc
|
| ===================================================================
|
| --- webkit/gpu/webgraphicscontext3d_in_process_impl.cc (revision 96767)
|
| +++ webkit/gpu/webgraphicscontext3d_in_process_impl.cc (working copy)
|
| @@ -114,7 +114,8 @@
|
|
|
| if (!render_directly_to_web_view) {
|
| // Pick up the compositor's context to share resources with.
|
| - WebGraphicsContext3D* view_context = webView->graphicsContext3D();
|
| + WebGraphicsContext3D* view_context = webView ?
|
| + webView->graphicsContext3D() : NULL;
|
| if (view_context) {
|
| WebGraphicsContext3DInProcessImpl* contextImpl =
|
| static_cast<WebGraphicsContext3DInProcessImpl*>(view_context);
|
| @@ -148,7 +149,7 @@
|
| // a page unload event, iterate down any live WebGraphicsContext3D instances
|
| // and force them to drop their contexts, sending a context lost event if
|
| // necessary.
|
| - webView->mainFrame()->collectGarbage();
|
| + if (webView) webView->mainFrame()->collectGarbage();
|
|
|
| gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(false,
|
| gfx::Size(1, 1));
|
| @@ -169,7 +170,7 @@
|
| // a page unload event, iterate down any live WebGraphicsContext3D instances
|
| // and force them to drop their contexts, sending a context lost event if
|
| // necessary.
|
| - webView->mainFrame()->collectGarbage();
|
| + if (webView) webView->mainFrame()->collectGarbage();
|
|
|
| gl_context_ = gfx::GLContext::CreateGLContext(share_group,
|
| gl_surface_.get());
|
| @@ -1329,10 +1330,6 @@
|
| WGC3Denum target, WGC3Dint level, WGC3Denum internalFormat,
|
| WGC3Dsizei width, WGC3Dsizei height, WGC3Dint border,
|
| WGC3Denum format, WGC3Denum type, const void* pixels) {
|
| - if (width && height && !pixels) {
|
| - synthesizeGLError(GL_INVALID_VALUE);
|
| - return;
|
| - }
|
| makeContextCurrent();
|
| glTexImage2D(target, level, internalFormat,
|
| width, height, border, format, type, pixels);
|
|
|