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

Unified Diff: ui/compositor/test/in_process_context_factory.cc

Issue 226423002: Merge 261120 "gpu: Lose context when BeginQueryEXT fails to allo..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1916/src/
Patch Set: 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
« no previous file with comments | « ppapi/shared_impl/ppb_graphics_3d_shared.cc ('k') | webkit/common/gpu/context_provider_in_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/in_process_context_factory.cc
===================================================================
--- ui/compositor/test/in_process_context_factory.cc (revision 261815)
+++ ui/compositor/test/in_process_context_factory.cc (working copy)
@@ -29,11 +29,12 @@
attrs.stencil = false;
attrs.antialias = false;
attrs.shareResources = true;
+ bool lose_context_when_out_of_memory = true;
using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl;
scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d(
WebGraphicsContext3DInProcessCommandBufferImpl::CreateViewContext(
- attrs, compositor->widget()));
+ attrs, lose_context_when_out_of_memory, compositor->widget()));
CHECK(context3d);
using webkit::gpu::ContextProviderInProcess;
@@ -56,8 +57,10 @@
InProcessContextFactory::OffscreenCompositorContextProvider() {
if (!offscreen_compositor_contexts_.get() ||
!offscreen_compositor_contexts_->DestroyedOnMainThread()) {
+ bool lose_context_when_out_of_memory = true;
offscreen_compositor_contexts_ =
- webkit::gpu::ContextProviderInProcess::CreateOffscreen();
+ webkit::gpu::ContextProviderInProcess::CreateOffscreen(
+ lose_context_when_out_of_memory);
}
return offscreen_compositor_contexts_;
}
@@ -69,8 +72,10 @@
return shared_main_thread_contexts_;
if (ui::Compositor::WasInitializedWithThread()) {
+ bool lose_context_when_out_of_memory = false;
shared_main_thread_contexts_ =
- webkit::gpu::ContextProviderInProcess::CreateOffscreen();
+ webkit::gpu::ContextProviderInProcess::CreateOffscreen(
+ lose_context_when_out_of_memory);
} else {
shared_main_thread_contexts_ =
static_cast<webkit::gpu::ContextProviderInProcess*>(
« no previous file with comments | « ppapi/shared_impl/ppb_graphics_3d_shared.cc ('k') | webkit/common/gpu/context_provider_in_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698