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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 1095893002: gpu: Fix some context lost marking glitches+leaks and add UMA stats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kbr's comment Created 5 years, 7 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
« no previous file with comments | « content/renderer/pepper/ppb_graphics_3d_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 bool lose_context_when_out_of_memory = false; 1287 bool lose_context_when_out_of_memory = false;
1288 gpu_va_context_provider_ = ContextProviderCommandBuffer::Create( 1288 gpu_va_context_provider_ = ContextProviderCommandBuffer::Create(
1289 make_scoped_ptr( 1289 make_scoped_ptr(
1290 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( 1290 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
1291 gpu_channel_host.get(), 1291 gpu_channel_host.get(),
1292 attributes, 1292 attributes,
1293 lose_context_when_out_of_memory, 1293 lose_context_when_out_of_memory,
1294 GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D"), 1294 GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D"),
1295 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(), 1295 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(),
1296 NULL)), 1296 NULL)),
1297 "GPU-VideoAccelerator-Offscreen"); 1297 GPU_VIDEO_ACCELERATOR_CONTEXT);
1298 } 1298 }
1299 } 1299 }
1300 if (gpu_va_context_provider_.get()) { 1300 if (gpu_va_context_provider_.get()) {
1301 gpu_factories = RendererGpuVideoAcceleratorFactories::Create( 1301 gpu_factories = RendererGpuVideoAcceleratorFactories::Create(
1302 gpu_channel_host.get(), media_task_runner, gpu_va_context_provider_); 1302 gpu_channel_host.get(), media_task_runner, gpu_va_context_provider_);
1303 } 1303 }
1304 return gpu_factories; 1304 return gpu_factories;
1305 } 1305 }
1306 1306
1307 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> 1307 scoped_ptr<WebGraphicsContext3DCommandBufferImpl>
(...skipping 21 matching lines...) Expand all
1329 shared_main_thread_contexts_ = NULL; 1329 shared_main_thread_contexts_ = NULL;
1330 #if defined(OS_ANDROID) 1330 #if defined(OS_ANDROID)
1331 if (SynchronousCompositorFactory* factory = 1331 if (SynchronousCompositorFactory* factory =
1332 SynchronousCompositorFactory::GetInstance()) { 1332 SynchronousCompositorFactory::GetInstance()) {
1333 shared_main_thread_contexts_ = factory->CreateOffscreenContextProvider( 1333 shared_main_thread_contexts_ = factory->CreateOffscreenContextProvider(
1334 GetOffscreenAttribs(), "Offscreen-MainThread"); 1334 GetOffscreenAttribs(), "Offscreen-MainThread");
1335 } 1335 }
1336 #endif 1336 #endif
1337 if (!shared_main_thread_contexts_.get()) { 1337 if (!shared_main_thread_contexts_.get()) {
1338 shared_main_thread_contexts_ = ContextProviderCommandBuffer::Create( 1338 shared_main_thread_contexts_ = ContextProviderCommandBuffer::Create(
1339 CreateOffscreenContext3d(), "Offscreen-MainThread"); 1339 CreateOffscreenContext3d(), RENDERER_MAINTHREAD_CONTEXT);
1340 } 1340 }
1341 if (shared_main_thread_contexts_.get() && 1341 if (shared_main_thread_contexts_.get() &&
1342 !shared_main_thread_contexts_->BindToCurrentThread()) 1342 !shared_main_thread_contexts_->BindToCurrentThread())
1343 shared_main_thread_contexts_ = NULL; 1343 shared_main_thread_contexts_ = NULL;
1344 } 1344 }
1345 return shared_main_thread_contexts_; 1345 return shared_main_thread_contexts_;
1346 } 1346 }
1347 1347
1348 AudioRendererMixerManager* RenderThreadImpl::GetAudioRendererMixerManager() { 1348 AudioRendererMixerManager* RenderThreadImpl::GetAudioRendererMixerManager() {
1349 if (!audio_renderer_mixer_manager_) { 1349 if (!audio_renderer_mixer_manager_) {
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 } 1895 }
1896 1896
1897 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 1897 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
1898 size_t erased = 1898 size_t erased =
1899 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 1899 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
1900 routing_id_); 1900 routing_id_);
1901 DCHECK_EQ(1u, erased); 1901 DCHECK_EQ(1u, erased);
1902 } 1902 }
1903 1903
1904 } // namespace content 1904 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/ppb_graphics_3d_impl.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698