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

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 10695133: Improve GPU process URL crash reporting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 5 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
6 6
7 #include "third_party/khronos/GLES2/gl2.h" 7 #include "third_party/khronos/GLES2/gl2.h"
8 #ifndef GL_GLEXT_PROTOTYPES 8 #ifndef GL_GLEXT_PROTOTYPES
9 #define GL_GLEXT_PROTOTYPES 1 9 #define GL_GLEXT_PROTOTYPES 1
10 #endif 10 #endif
(...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 delete context; 1468 delete context;
1469 return NULL; 1469 return NULL;
1470 } 1470 }
1471 return context; 1471 return context;
1472 } 1472 }
1473 1473
1474 // static 1474 // static
1475 WebGraphicsContext3DCommandBufferImpl* 1475 WebGraphicsContext3DCommandBufferImpl*
1476 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( 1476 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
1477 GpuChannelHostFactory* factory, 1477 GpuChannelHostFactory* factory,
1478 const WebGraphicsContext3D::Attributes& attributes) { 1478 const WebGraphicsContext3D::Attributes& attributes,
1479 const GURL& active_url) {
1479 if (!factory) 1480 if (!factory)
1480 return NULL; 1481 return NULL;
1481 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> null_client; 1482 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> null_client;
1482 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( 1483 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(
1483 new WebGraphicsContext3DCommandBufferImpl( 1484 new WebGraphicsContext3DCommandBufferImpl(
1484 0, GURL(), factory, null_client)); 1485 0, active_url, factory, null_client));
1485 content::CauseForGpuLaunch cause = 1486 content::CauseForGpuLaunch cause =
1486 content::CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIA LIZE; 1487 content::CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIA LIZE;
1487 if (context->Initialize(attributes, false, cause)) 1488 if (context->Initialize(attributes, false, cause))
1488 return context.release(); 1489 return context.release();
1489 return NULL; 1490 return NULL;
1490 } 1491 }
1491 1492
1492 void WebGraphicsContext3DCommandBufferImpl:: 1493 void WebGraphicsContext3DCommandBufferImpl::
1493 setSwapBuffersCompleteCallbackCHROMIUM( 1494 setSwapBuffersCompleteCallbackCHROMIUM(
1494 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* cb) { 1495 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* cb) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 swap_client_->OnViewContextSwapBuffersAborted(); 1560 swap_client_->OnViewContextSwapBuffersAborted();
1560 } 1561 }
1561 1562
1562 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1563 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1563 const std::string& message, int id) { 1564 const std::string& message, int id) {
1564 if (error_message_callback_) { 1565 if (error_message_callback_) {
1565 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1566 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1566 error_message_callback_->onErrorMessage(str, id); 1567 error_message_callback_->onErrorMessage(str, id);
1567 } 1568 }
1568 } 1569 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698