| 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*>(
|
|
|