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

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

Issue 12213066: Use base namespace for FilePath in content/browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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/gpu_data_manager_impl.h" 5 #include "content/browser/gpu/gpu_data_manager_impl.h"
6 6
7 #if defined(OS_MACOSX) 7 #if defined(OS_MACOSX)
8 #include <ApplicationServices/ApplicationServices.h> 8 #include <ApplicationServices/ApplicationServices.h>
9 #endif // OS_MACOSX 9 #endif // OS_MACOSX
10 10
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 GpuProcessHost::SendOnIO( 185 GpuProcessHost::SendOnIO(
186 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, 186 GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
187 CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH, 187 CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH,
188 new GpuMsg_GetVideoMemoryUsageStats()); 188 new GpuMsg_GetVideoMemoryUsageStats());
189 } 189 }
190 190
191 bool GpuDataManagerImpl::ShouldUseSoftwareRendering() const { 191 bool GpuDataManagerImpl::ShouldUseSoftwareRendering() const {
192 return software_rendering_; 192 return software_rendering_;
193 } 193 }
194 194
195 void GpuDataManagerImpl::RegisterSwiftShaderPath(const FilePath& path) { 195 void GpuDataManagerImpl::RegisterSwiftShaderPath(const base::FilePath& path) {
196 swiftshader_path_ = path; 196 swiftshader_path_ = path;
197 EnableSoftwareRenderingIfNecessary(); 197 EnableSoftwareRenderingIfNecessary();
198 } 198 }
199 199
200 void GpuDataManagerImpl::AddObserver(GpuDataManagerObserver* observer) { 200 void GpuDataManagerImpl::AddObserver(GpuDataManagerObserver* observer) {
201 observer_list_->AddObserver(observer); 201 observer_list_->AddObserver(observer);
202 } 202 }
203 203
204 void GpuDataManagerImpl::RemoveObserver(GpuDataManagerObserver* observer) { 204 void GpuDataManagerImpl::RemoveObserver(GpuDataManagerObserver* observer) {
205 observer_list_->RemoveObserver(observer); 205 observer_list_->RemoveObserver(observer);
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 if (ShouldUseSoftwareRendering()) 382 if (ShouldUseSoftwareRendering())
383 command_line->AppendSwitch(switches::kDisableFlashFullscreen3d); 383 command_line->AppendSwitch(switches::kDisableFlashFullscreen3d);
384 } 384 }
385 385
386 void GpuDataManagerImpl::AppendGpuCommandLine( 386 void GpuDataManagerImpl::AppendGpuCommandLine(
387 CommandLine* command_line) const { 387 CommandLine* command_line) const {
388 DCHECK(command_line); 388 DCHECK(command_line);
389 389
390 std::string use_gl = 390 std::string use_gl =
391 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kUseGL); 391 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kUseGL);
392 FilePath swiftshader_path = 392 base::FilePath swiftshader_path =
393 CommandLine::ForCurrentProcess()->GetSwitchValuePath( 393 CommandLine::ForCurrentProcess()->GetSwitchValuePath(
394 switches::kSwiftShaderPath); 394 switches::kSwiftShaderPath);
395 uint32 flags = GetBlacklistedFeatures(); 395 uint32 flags = GetBlacklistedFeatures();
396 if ((flags & GPU_FEATURE_TYPE_MULTISAMPLING) && 396 if ((flags & GPU_FEATURE_TYPE_MULTISAMPLING) &&
397 !command_line->HasSwitch(switches::kDisableGLMultisampling)) 397 !command_line->HasSwitch(switches::kDisableGLMultisampling))
398 command_line->AppendSwitch(switches::kDisableGLMultisampling); 398 command_line->AppendSwitch(switches::kDisableGLMultisampling);
399 if (flags & GPU_FEATURE_TYPE_TEXTURE_SHARING) 399 if (flags & GPU_FEATURE_TYPE_TEXTURE_SHARING)
400 command_line->AppendSwitch(switches::kDisableImageTransportSurface); 400 command_line->AppendSwitch(switches::kDisableImageTransportSurface);
401 401
402 if (software_rendering_) { 402 if (software_rendering_) {
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 BLOCK_STATUS_MAX); 776 BLOCK_STATUS_MAX);
777 777
778 return DOMAIN_BLOCK_STATUS_NOT_BLOCKED; 778 return DOMAIN_BLOCK_STATUS_NOT_BLOCKED;
779 } 779 }
780 780
781 int64 GpuDataManagerImpl::GetBlockAllDomainsDurationInMs() const { 781 int64 GpuDataManagerImpl::GetBlockAllDomainsDurationInMs() const {
782 return kBlockAllDomainsMs; 782 return kBlockAllDomainsMs;
783 } 783 }
784 784
785 } // namespace content 785 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl.h ('k') | content/browser/gpu/gpu_data_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698