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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 2654993004: Move GPU blacklist calculation to GPU proc (Closed)
Patch Set: fix win clang build Created 3 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
« no previous file with comments | « content/renderer/gpu/compositor_dependencies.h ('k') | content/renderer/render_thread_impl.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 &max_untiled_layer_height); 306 &max_untiled_layer_height);
307 } 307 }
308 308
309 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, 309 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width,
310 max_untiled_layer_height); 310 max_untiled_layer_height);
311 311
312 settings.gpu_rasterization_msaa_sample_count = 312 settings.gpu_rasterization_msaa_sample_count =
313 compositor_deps->GetGpuRasterizationMSAASampleCount(); 313 compositor_deps->GetGpuRasterizationMSAASampleCount();
314 settings.gpu_rasterization_forced = 314 settings.gpu_rasterization_forced =
315 compositor_deps->IsGpuRasterizationForced(); 315 compositor_deps->IsGpuRasterizationForced();
316 settings.gpu_rasterization_enabled =
317 compositor_deps->IsGpuRasterizationEnabled();
318 settings.async_worker_context_enabled = 316 settings.async_worker_context_enabled =
319 compositor_deps->IsAsyncWorkerContextEnabled(); 317 compositor_deps->IsAsyncWorkerContextEnabled();
320 318
321 settings.can_use_lcd_text = compositor_deps->IsLcdTextEnabled(); 319 settings.can_use_lcd_text = compositor_deps->IsLcdTextEnabled();
322 settings.use_distance_field_text = 320 settings.use_distance_field_text =
323 compositor_deps->IsDistanceFieldTextEnabled(); 321 compositor_deps->IsDistanceFieldTextEnabled();
324 settings.use_zero_copy = compositor_deps->IsZeroCopyEnabled(); 322 settings.use_zero_copy = compositor_deps->IsZeroCopyEnabled();
325 settings.use_partial_raster = compositor_deps->IsPartialRasterEnabled(); 323 settings.use_partial_raster = compositor_deps->IsPartialRasterEnabled();
326 settings.enable_elastic_overscroll = 324 settings.enable_elastic_overscroll =
327 compositor_deps->IsElasticOverscrollEnabled(); 325 compositor_deps->IsElasticOverscrollEnabled();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 GetSwitchValueAsInt( 372 GetSwitchValueAsInt(
375 cmd, cc::switches::kSlowDownRasterScaleFactor, kMinSlowDownScaleFactor, 373 cmd, cc::switches::kSlowDownRasterScaleFactor, kMinSlowDownScaleFactor,
376 kMaxSlowDownScaleFactor, 374 kMaxSlowDownScaleFactor,
377 &settings.initial_debug_state.slow_down_raster_scale_factor); 375 &settings.initial_debug_state.slow_down_raster_scale_factor);
378 } 376 }
379 377
380 #if defined(OS_ANDROID) 378 #if defined(OS_ANDROID)
381 bool using_synchronous_compositor = 379 bool using_synchronous_compositor =
382 GetContentClient()->UsingSynchronousCompositing(); 380 GetContentClient()->UsingSynchronousCompositing();
383 381
384 // We can't use GPU rasterization on low-end devices, because the Ganesh
385 // cache would consume too much memory.
386 if (base::SysInfo::IsLowEndDevice())
387 settings.gpu_rasterization_enabled = false;
388 settings.using_synchronous_renderer_compositor = using_synchronous_compositor; 382 settings.using_synchronous_renderer_compositor = using_synchronous_compositor;
389 if (using_synchronous_compositor) { 383 if (using_synchronous_compositor) {
390 // Android WebView uses system scrollbars, so make ours invisible. 384 // Android WebView uses system scrollbars, so make ours invisible.
391 // http://crbug.com/677348: This can't be done using hide_scrollbars 385 // http://crbug.com/677348: This can't be done using hide_scrollbars
392 // setting because supporting -webkit custom scrollbars is still desired 386 // setting because supporting -webkit custom scrollbars is still desired
393 // on sublayers. 387 // on sublayers.
394 settings.scrollbar_animator = cc::LayerTreeSettings::NO_ANIMATOR; 388 settings.scrollbar_animator = cc::LayerTreeSettings::NO_ANIMATOR;
395 settings.solid_color_scrollbar_color = SK_ColorTRANSPARENT; 389 settings.solid_color_scrollbar_color = SK_ColorTRANSPARENT;
396 } else { 390 } else {
397 settings.scrollbar_animator = cc::LayerTreeSettings::LINEAR_FADE; 391 settings.scrollbar_animator = cc::LayerTreeSettings::LINEAR_FADE;
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 void RenderWidgetCompositor::SetDeviceColorSpace( 1124 void RenderWidgetCompositor::SetDeviceColorSpace(
1131 const gfx::ColorSpace& color_space) { 1125 const gfx::ColorSpace& color_space) {
1132 layer_tree_host_->SetDeviceColorSpace(color_space); 1126 layer_tree_host_->SetDeviceColorSpace(color_space);
1133 } 1127 }
1134 1128
1135 void RenderWidgetCompositor::SetIsForOopif(bool is_for_oopif) { 1129 void RenderWidgetCompositor::SetIsForOopif(bool is_for_oopif) {
1136 is_for_oopif_ = is_for_oopif; 1130 is_for_oopif_ = is_for_oopif;
1137 } 1131 }
1138 1132
1139 } // namespace content 1133 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/compositor_dependencies.h ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698