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

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

Issue 1425533006: cc: Add flag to specify to ResourceProvider to always use GMBs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test and build Created 5 years, 1 month 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/compositor_util.h" 5 #include "content/browser/gpu/compositor_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 } 209 }
210 210
211 bool IsPartialRasterEnabled() { 211 bool IsPartialRasterEnabled() {
212 // Zero copy currently doesn't take advantage of partial raster. 212 // Zero copy currently doesn't take advantage of partial raster.
213 if (IsZeroCopyUploadEnabled()) 213 if (IsZeroCopyUploadEnabled())
214 return false; 214 return false;
215 const auto& command_line = *base::CommandLine::ForCurrentProcess(); 215 const auto& command_line = *base::CommandLine::ForCurrentProcess();
216 return command_line.HasSwitch(switches::kEnablePartialRaster); 216 return command_line.HasSwitch(switches::kEnablePartialRaster);
217 } 217 }
218 218
219 bool IsGpuMemoryBufferCompositorResourcesEnabled() {
220 const base::CommandLine& command_line =
221 *base::CommandLine::ForCurrentProcess();
222 return command_line.HasSwitch(
223 switches::kEnableGpuMemoryBufferCompositorResources);
224 }
225
219 bool IsGpuRasterizationEnabled() { 226 bool IsGpuRasterizationEnabled() {
220 const base::CommandLine& command_line = 227 const base::CommandLine& command_line =
221 *base::CommandLine::ForCurrentProcess(); 228 *base::CommandLine::ForCurrentProcess();
222 229
223 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) 230 if (command_line.HasSwitch(switches::kDisableGpuRasterization))
224 return false; 231 return false;
225 else if (command_line.HasSwitch(switches::kEnableGpuRasterization)) 232 else if (command_line.HasSwitch(switches::kEnableGpuRasterization))
226 return true; 233 return true;
227 234
228 if (IsGpuRasterizationBlacklisted()) { 235 if (IsGpuRasterizationBlacklisted()) {
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 388 }
382 } 389 }
383 return problem_list; 390 return problem_list;
384 } 391 }
385 392
386 std::vector<std::string> GetDriverBugWorkarounds() { 393 std::vector<std::string> GetDriverBugWorkarounds() {
387 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); 394 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds();
388 } 395 }
389 396
390 } // namespace content 397 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/compositor_util.h ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698