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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 199443004: gpu: Raise GL_OUT_OF_MEMORY when BeginQueryEXT fails to allocate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: checkmem: gles2impl-tests Created 6 years, 9 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
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 00aedb94d33c7551669db4c5363c17199fc15ba1..24d2e1ebe63a430ce76e3e730e9aa58502826c7a 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -992,11 +992,14 @@ RenderThreadImpl::GetGpuFactories() {
gpu_channel_host = EstablishGpuChannelSync(
CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE);
}
+ blink::WebGraphicsContext3D::Attributes attributes;
+ bool lose_context_when_out_of_memory = false;
gpu_va_context_provider_ = ContextProviderCommandBuffer::Create(
make_scoped_ptr(
WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
gpu_channel_host.get(),
- blink::WebGraphicsContext3D::Attributes(),
+ attributes,
+ lose_context_when_out_of_memory,
GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D"),
WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(),
NULL)),
@@ -1018,6 +1021,7 @@ RenderThreadImpl::CreateOffscreenContext3d() {
attributes.stencil = false;
attributes.antialias = false;
attributes.noAutomaticFlushes = true;
+ bool lose_context_when_out_of_memory = true;
scoped_refptr<GpuChannelHost> gpu_channel_host(EstablishGpuChannelSync(
CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE));
@@ -1025,6 +1029,7 @@ RenderThreadImpl::CreateOffscreenContext3d() {
WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
gpu_channel_host.get(),
attributes,
+ lose_context_when_out_of_memory,
GURL("chrome://gpu/RenderThreadImpl::CreateOffscreenContext3d"),
WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(),
NULL));

Powered by Google App Engine
This is Rietveld 408576698