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

Side by Side Diff: content/browser/gpu/browser_gpu_channel_host_factory.cc

Issue 2686243002: content/ui[Android]: Remove ContextProviderFactory. (Closed)
Patch Set: more rebase Created 3 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 unified diff | Download patch
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/browser/gpu/browser_gpu_channel_host_factory.h" 5 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 &BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO, 246 &BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO,
247 gpu_client_id_, cache_dir)); 247 gpu_client_id_, cache_dir));
248 } 248 }
249 } 249 }
250 } 250 }
251 251
252 BrowserGpuChannelHostFactory::~BrowserGpuChannelHostFactory() { 252 BrowserGpuChannelHostFactory::~BrowserGpuChannelHostFactory() {
253 DCHECK(IsMainThread()); 253 DCHECK(IsMainThread());
254 if (pending_request_.get()) 254 if (pending_request_.get())
255 pending_request_->Cancel(); 255 pending_request_->Cancel();
256 for (size_t n = 0; n < established_callbacks_.size(); n++)
257 established_callbacks_[n].Run(nullptr);
258 shutdown_event_->Signal(); 256 shutdown_event_->Signal();
259 if (gpu_channel_) { 257 if (gpu_channel_) {
260 gpu_channel_->DestroyChannel(); 258 gpu_channel_->DestroyChannel();
261 gpu_channel_ = NULL; 259 gpu_channel_ = NULL;
262 } 260 }
263 } 261 }
264 262
265 bool BrowserGpuChannelHostFactory::IsMainThread() { 263 bool BrowserGpuChannelHostFactory::IsMainThread() {
266 return BrowserThread::CurrentlyOn(BrowserThread::UI); 264 return BrowserThread::CurrentlyOn(BrowserThread::UI);
267 } 265 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 374 }
377 375
378 // static 376 // static
379 void BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO( 377 void BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO(
380 int gpu_client_id, 378 int gpu_client_id,
381 const base::FilePath& cache_dir) { 379 const base::FilePath& cache_dir) {
382 GetShaderCacheFactorySingleton()->SetCacheInfo(gpu_client_id, cache_dir); 380 GetShaderCacheFactorySingleton()->SetCacheInfo(gpu_client_id, cache_dir);
383 } 381 }
384 382
385 } // namespace content 383 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_guest_unittest.cc ('k') | content/browser/gpu/gpu_ipc_browsertests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698